Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/yoraexe-ctf-crypto-advanced-math
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/ctf-crypto-advanced-math
What's inside
- Skill name
ctf-crypto-advanced-math- Description
- CTF advanced math crypto. LLL lattice attacks, Coppersmith method, Pohlig-Hellman on smooth curves, isogeny graph traversal, quaternion RSA factoring, LWE via CVP, Manger padding oracle, non-permutation S-box collision, polynomial CRT in GF(2). Triggers: 'lll attack', 'lattice crypto', 'coppersmith', 'pohlig-hellman', 'isogeny', 'lwe', 'lattice', 'manger oracle', 'quaternion rsa', 'gf2 polynomial'.
- License
- MIT
- Instructions
- 304 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# CTF Crypto — Advanced Mathematical Attacks
LLL, Coppersmith, isogenies, quaternion RSA, LWE, Manger oracle.
## Install
```bash
sage # SageMath for lattice/number theory
pip install fpylll z3-solver --break-system-packages
```
---
## Phase 1: LLL Lattice Attack
```python
# Pattern: hints h_i = flag * p_i + noise (noise is small)
# LLL finds short vector → reveals p_i values
from sage.all import *
# Collect 3 server hints:
h1, h2, h3 = (hint1, hint2, hint3) # from server
M = matrix(ZZ, [
[1, 0, 0, h1],
[0, 1, 0, h2],
[0, 0, 1, h3],
[0, 0, 0, -1]
])
reduced = M.LLL()
# Short vector: contains p1, p2, p3
# Recover flag: (h1 - noise) // p1
```
---
## Phase 2: Merkle-Hellman Knapsack via LLL
```python
from sage.all import *
def crack_knapsack(pubKey, encoded):
"""Crack Merkle-Hellman knapsack encryption via LLL."""
nbit = len(pubKey)
A = Matrix(ZZ, nbit + 1, nbit + 1)
for i in range(nbit):
A[i, i] = 1
A[i, nbit] = pubKey[i]
A[nbit, nbit] = -int(encoded)
res = A.LLL()
for row in res:
if row[-1] == 0 and all(b in (0, 1) for b in row[:-1]):
plaintext_bits = list(row[:-1])
return bytes(int(''.join(map(str, plaintext_bits[i:i+8])), 2)
for i in range(0, len(plaintext_bits)-7, 8))
return None
# Usage:
flag = crack_knapsack(server_pubkey, server_ciphertext)
```
---
## Phase 3: Coppersmith — Partially Known Prime
```python
from sage.all import *
# Pattern: p = base + 10^k * x where base is known, x is small
# Condition: x < N^(1/e) ≈ N^0.25 for linear polynomial
def coppersmith_known_prefix(N, base, k):
"""Find small x where p = base + 10^k * x divides N."""
R = PolynomialRing(Zmod(N), 'x')
x = R.gen()
inv_10k = int(pow(10**k, -1, N))
f = x + int(base * inv_10k % N) # Must be monic
roots = f.small_roots(X=2**70, beta=0.5)
if roots:
x_val = int(roots[0])
p = base + 10**k * x_val
q = N // p
if p * q == N:
return p, q
return None, None
p, q = coppersmith_known_prefix(N, known_base, k_value)
if p:
phi = (p-1)*(q-1)
d = pow(e, -1, phi)
m = pow(ct, d, N)
```
---
## Phase 4: Pohlig-Hellman (Smooth Curve Order)
```python
from sage.all import *
# ECC with smooth order → Pohlig-Hellman DLP
def pohlig_hellman_ecc(G, P, E, n):
"""Solve discrete log P = d*G where E.order() is smooth."""
factors = factor(n)
partial_logs = []
for (prime, exp) in factors:
cofactor = n // (prime ** exp)
G_sub = cofactor * G
P_sub = cofactor * P
d_sub = discrete_log(P_sub, G_sub, ord=prime**exp)From Yoraexe/ceobe, MIT.
More from Yoraexe/ceobe
- 0.502score
codex-qa
Yoraexe
QA the omo Codex Light edition (lazycodex / packages/omop-codex) itself, in strict isolation so ONLY our plugin is exercised, never the user's real ~/.codex.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-android
Yoraexe
CTF Android challenge analysis.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-classic
Yoraexe
CTF classic cipher attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-ecc
Yoraexe
CTF ECC attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-exotic
Yoraexe
CTF exotic cryptography attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-prng
Yoraexe
CTF PRNG attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-rsa
Yoraexe
CTF RSA cryptography attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ad-attacks
Yoraexe
Active Directory credential attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-modern
Yoraexe
CTF modern cipher attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
ctf-crypto-historical
Yoraexe
CTF historical cipher attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
blue-detect
Yoraexe
Blue team detection skill.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
blue-forensics
Yoraexe
Blue team forensics skill.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jul 17, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Yoraexe/ceobe
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Yoraexe
- 0.502score
codex-qa
Yoraexe
QA the omo Codex Light edition (lazycodex / packages/omop-codex) itself, in strict isolation so ONLY our plugin is exercised, never the user's real ~/.codex.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-ecc
Yoraexe
CTF ECC attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-classic
Yoraexe
CTF classic cipher attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-android
Yoraexe
CTF Android challenge analysis.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ad-attacks
Yoraexe
Active Directory credential attacks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
ctf-crypto-exotic
Yoraexe
CTF exotic cryptography attacks.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
ctf-crypto-advanced-math skill. Agent Mart. https://agentmart.dev/skills/yoraexe-ctf-crypto-advanced-math (last updated 2026-10-24)