Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问clear审计异常

feal-linear-cryptanalysisfeal Linear cryptanalysis 搜索

Agent Skill

用于处理 Linear 项目、Issue、团队、周期和产品开发任务流。它适合让 Agent 辅助查询任务状态、整理需求队列、创建缺陷或汇总迭代进展。使用时需要确认 workspace、team、label、assignee 和状态流转规则;涉及批量创建或修改任务时,应先核对字段和目标团队,避免把草稿需求直接写入正式项目。

总安装

832

周安装

34

GitHub Stars

93

下载量

269
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

feal-linear-cryptanalysis 提供 FEAL 密码的线性密码分析框架,帮助识别非线性的近似路径以恢复密钥。

  • 适用于密码分析场景,特别是针对 Feistel 结构的分组密码实现攻击。
  • 使用前应明确任务是否指向线性攻击,并完成前置分析步骤。
  • 建议仅在授权环境下使用,避免对生产系统造成意外影响。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

FEAL Linear Cryptanalysis

Overview

This skill provides structured guidance for performing linear cryptanalysis on FEAL (Fast Data Encipherment Algorithm) and similar Feistel-based ciphers. Linear cryptanalysis exploits linear approximations of the cipher's non-linear components to recover key bits with far fewer operations than brute force.

Critical Pre-Implementation Analysis

Before writing any code, complete these analysis steps:

1. Identify the Attack Type from Task Description

When a task explicitly mentions "linear attack" or "linear cryptanalysis":

  • This is a strong hint about the intended solution approach
  • Do NOT ignore this hint in favor of brute-force methods
  • Linear cryptanalysis is likely the only feasible approach

2. Complexity Feasibility Check

Before implementing any approach, calculate its feasibility:

Key SpaceOperationsTime at 10^9 ops/secFeasible?
2^20~1 million< 1 secondYes
2^40~1 trillion~18 minutesMaybe
2^64~10^19~292 yearsNo
2^80~10^24~38 million yearsNo

If the combined key space exceeds 2^40, brute force is infeasible. Linear cryptanalysis is required.

3. Analyze the Cipher Structure

Before implementing, thoroughly understand:

  1. Round function (F-function): Identify the non-linear components (S-boxes, G-function)
  2. Key schedule: Understand how round keys derive from the master key
  3. Number of rounds: Fewer rounds = easier linear approximations
  4. Known pairs available: Linear cryptanalysis effectiveness scales with available pairs

Linear Cryptanalysis Approach

Step 1: Study the Non-Linear Components

For FEAL-type ciphers, analyze the G-function:

  • Identify rotation operations
  • Locate addition operations (mod 256)
  • Find the one-byte truncation points

These operations have known linear approximations with varying biases.

Step 2: Find Linear Approximations

Linear approximations relate input bits, output bits, and key bits with a probability ≠ 0.5:

P[input_mask · plaintext ⊕ output_mask · ciphertext ⊕ key_mask · key = 0] = 0.5 + ε

Where ε (bias) determines attack effectiveness. Larger |ε| = fewer pairs needed.

For FEAL specifically:

  • The G-function addition has exploitable linear properties
  • Carry propagation in addition creates predictable bit relationships
  • Common approximation: MSB of (a + b) ≈ MSB(a) ⊕ MSB(b) with bias ~0.25

Step 3: Chain Approximations Across Rounds

Use the piling-up lemma to combine approximations:

  • If individual rounds have biases ε₁, ε₂,..., εₙ
  • Combined bias: ε_total = 2^(n-1) × ε₁ × ε₂ ×... × εₙ

Step 4: Key Recovery Process

  1. For each candidate key (or key portion):

- Count how many pairs satisfy the linear approximation - The correct key produces a count significantly different from N/2

  1. Use multiple approximations to recover different key bits
  2. Verify recovered key bits against all available pairs

Verification Strategies

Incremental Verification

  1. Verify understanding first: Manually trace the cipher with a known pair
  2. Test approximations: Confirm linear approximations hold with expected bias
  3. Partial key verification: As key bits are recovered, verify against all pairs
  4. Full decryption test: Only after complete key recovery, decrypt all ciphertexts

Statistical Validation

  • With N pairs, expect count deviation of ~N × |ε| for correct key
  • Wrong keys produce counts near N/2
  • Use chi-squared or similar statistical tests for confidence

Common Pitfalls to Avoid

1. Ignoring Explicit Hints

Wrong: Task says "linear attack" but agent implements brute force Right: Follow the explicit methodology hint in the task description

2. Implementing Before Analysis

Wrong: Jump into coding brute-force approaches immediately Right: First analyze cipher structure, calculate complexities, design algorithm

3. Memory-Intensive Meet-in-the-Middle

Wrong: Attempt to store 2^40 entries in memory (requires terabytes) Right: Calculate memory requirements before implementation:

  • 2^20 entries × 16 bytes = ~16 MB (feasible)
  • 2^30 entries × 16 bytes = ~16 GB (problematic)
  • 2^40 entries × 16 bytes = ~16 TB (infeasible)

4. Repeated Failed Approaches

Wrong: Try brute force variant 1, fail, try variant 2, fail, try variant 3... Right: After one approach fails, analyze WHY before trying alternatives

5. Time Mismanagement

Wrong: Spend all available time on infeasible brute-force implementations Right: Allocate time for: analysis (30%), algorithm design (30%), implementation (30%), testing (10%)

6. Not Using All Available Pairs

Wrong: Use pairs only for final verification Right: Linear cryptanalysis uses ALL pairs simultaneously to statistically recover key bits

Implementation Checklist

Before starting implementation:

  • Read and understand the complete cipher implementation
  • Identify the key schedule and total key space
  • Calculate brute-force complexity (is it feasible?)
  • If brute force infeasible, identify linear approximations
  • Estimate required number of pairs vs. available pairs
  • Design the attack algorithm on paper before coding
  • Implement with progress output to monitor execution

During implementation:

  • Test each component independently
  • Verify linear approximations hold on known pairs
  • Include flush statements for output visibility
  • Set reasonable timeouts for each phase

After key recovery:

  • Verify recovered key decrypts all ciphertexts correctly
  • Create the required output file in the correct format
  • Double-check output matches expected format

Debugging Tips

  1. Output buffering: Use explicit flush after print statements
  2. Progress indicators: Print progress every N iterations for long computations
  3. Intermediate verification: Check partial results against known values
  4. Memory monitoring: Watch process memory usage for large operations

Resources

This skill does not require external scripts or assets. The approach relies on understanding and applying linear cryptanalysis principles to the specific cipher implementation provided in each task.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Claude Code

25.26%
按下载量换算68

Gemini CLI

24.4%
按下载量换算66

Antigravity

16.74%
按下载量换算45

Codex

12.69%
按下载量换算34

OpenCode

7.28%
按下载量换算20

windsurf

3%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills