Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

feal-differential-cryptanalysis真实差分密码分析

Agent Skill

feal-differential-cryptanalysis 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

873

周安装

36

GitHub Stars

93

下载量

285
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:feal-differential-cryptanalysis(真实差分密码分析)
来源仓库:https://github.com/letta-ai/skills
仓库路径:skills/feal-differential-cryptanalysis
安装命令:
npx skills add https://github.com/letta-ai/skills --skill feal-differential-cryptanalysis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill feal-differential-cryptanalysis

简介

feal-differential-cryptanalysis 提供 FEAL 密码结构的差分密码分析指导,适合研究 Feistel 网络类加密算法的安全性。

  • 适用于密码学研究人员或安全工程师分析特定分组密码的弱点。
  • 使用时需先理解 FEAL 轮函数特性,再根据任务描述判断是否需要实施攻击代码。
  • 建议在安装前确认项目是否涉及敏感算法研究,避免误用或越权操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

FEAL Differential Cryptanalysis

Overview

This skill provides structured guidance for implementing differential cryptanalysis attacks on FEAL and similar Feistel-network block ciphers. Differential cryptanalysis exploits how specific input differences propagate through cipher rounds with predictable probabilities, enabling key recovery.

Core Principles

Theory Before Implementation

Before writing any attack code:

  1. Understand the cipher structure - Identify the Feistel network layout, round function (F-function), key schedule, and number of rounds
  2. Study the F-function's differential properties - Determine which input differences produce which output differences with high probability
  3. Identify differential characteristics - Find high-probability differential trails through the cipher rounds
  4. Formulate the attack equations - Understand how key bits relate to observable output differences

What Makes Differential Cryptanalysis Work

The attack exploits that for the correct key, decrypted intermediate values represent actual cipher states that satisfy the round function equations. For incorrect keys, these values are essentially random garbage that won't satisfy the differential relationships.

The distinguishing property is consistency with the Feistel structure, not statistical measures like entropy, variance, or Hamming weight.

Approach

Step 1: Analyze the Cipher

  1. Map out the complete cipher structure (rounds, key mixing, F-function)
  2. Identify which key bits affect which intermediate computations
  3. Determine what intermediate values can be computed given partial key guesses
  4. Document dependencies between plaintext, ciphertext, and key bits

Step 2: Study Differential Properties

  1. Analyze the F-function for differential characteristics
  2. Find input XOR differences that produce predictable output XOR differences
  3. Calculate probabilities for each differential characteristic
  4. Identify high-probability multi-round differential trails

Step 3: Design Chosen Plaintexts

  1. Select plaintext pairs with specific XOR differences that exploit identified differentials
  2. Ensure plaintext differences align with high-probability characteristics
  3. Document the theoretical basis for each plaintext choice
  4. Avoid arbitrary plaintexts without theoretical justification

Step 4: Implement the Key Recovery

  1. For each key candidate, compute the intermediate value using partial decryption
  2. Check if the computed values satisfy the expected differential relationships
  3. Count how many plaintext pairs "vote" for each key candidate
  4. The correct key will have significantly more consistent pairs

Step 5: Validate Incrementally

  1. Verify each component independently before combining
  2. For known test cases, confirm intermediate values match expected states
  3. Compare behavior of correct vs incorrect keys directly
  4. Build confidence in each attack stage before proceeding

Verification Strategies

Direct Comparison Method

When debugging, compute intermediate values for both correct and incorrect keys:

  1. Use a known key to generate test cases
  2. Compute intermediate states for the correct key
  3. Compute intermediate states for several incorrect keys
  4. Identify the distinguishing property empirically

Equation Verification

For each plaintext pair and key guess:

  1. Compute the alleged intermediate state
  2. Check if state satisfies the expected differential equation
  3. Track pass/fail counts per key candidate
  4. Correct key should have near-100% pass rate for good differentials

Sanity Checks

  1. With random keys, attack should fail (return wrong answer)
  2. With oracle access, intermediate computations should match actual cipher states
  3. Reducing to fewer rounds should make attack easier
  4. Using more plaintext pairs should improve reliability

Common Pitfalls

Pitfall 1: Statistical Heuristics Instead of Differential Equations

Wrong approach: Using entropy, Hamming weight variance, collision counting, or other statistical measures to distinguish correct from incorrect keys.

Why it fails: These measures often show similar values for correct and incorrect keys. The distinguishing property is structural (satisfying differential equations), not statistical.

Correct approach: Check whether computed intermediate values satisfy the expected differential relationships derived from the cipher's structure.

Pitfall 2: Arbitrary Plaintext Selection

Wrong approach: Using plaintexts like i * 0x0101010101010101 or random values without theoretical basis.

Why it fails: Differential attacks require specific plaintext XOR differences that create useful differentials through the cipher.

Correct approach: Choose plaintext pairs where the XOR difference matches high-probability differential characteristics of the F-function.

Pitfall 3: Repeated Heuristic Cycling

Wrong approach: Trying many different scoring functions (entropy, variance, min/max, collisions) hoping one works.

Why it fails: Without understanding why each approach fails, new attempts are equally likely to fail.

Correct approach: When an approach fails, analyze why. Compare correct vs incorrect key behavior directly. Build understanding incrementally.

Pitfall 4: Ignoring Cipher-Specific Literature

Wrong approach: Implementing a generic "differential attack" without studying FEAL's specific weaknesses.

Why it fails: FEAL has well-documented differential characteristics. Ignoring this domain knowledge means reinventing the wheel poorly.

Correct approach: Research existing differential attacks on the specific cipher. Understand which differentials have been proven effective.

Pitfall 5: Incomplete Partial Decrypt Verification

Wrong approach: Assuming partial decryption code is correct without verification against known intermediate states.

Why it fails: Bugs in partial decryption produce meaningless intermediate values, making the attack impossible regardless of the distinguisher.

Correct approach: For a known key, verify that computed intermediate values match the actual cipher's internal states at each round.

Key Insights for FEAL-Specific Attacks

  1. Round key independence: Different round keys may affect different intermediate values. Identify which computations depend on the target key bits.
  2. Seed constraints: If key generation uses a small seed space (e.g., 16-bit), exhaustive search is feasible but still requires a reliable distinguisher.
  3. L/R state separation: In Feistel networks, the left and right halves have different dependencies. Exploit this to isolate key bit effects.
  4. F-function weaknesses: FEAL's F-function has known differential weaknesses. Input difference 0x80800000 through the F-function has specific high-probability output differences.

Debugging Checklist

When the attack returns incorrect results:

  • Verify partial decryption computes correct intermediate values for known keys
  • Confirm plaintext pairs have the intended XOR differences
  • Check that differential equations correctly model the round structure
  • Compare voting counts between correct and incorrect keys with debug output
  • Verify F-function implementation matches the cipher specification
  • Test with reduced rounds to isolate where the attack breaks down

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.66%
按下载量换算87

Gemini CLI

24.56%
按下载量换算70

Codex

15.69%
按下载量换算45

Antigravity

13.14%
按下载量换算37

OpenCode

6.7%
按下载量换算19

Cursor

3.02%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills