cryptography-fundamentals
Skill4 starsChanged 3 months agoMITView on GitHub
Build and maintain deep cryptography knowledge for Hermes, covering foundations,
In this repository80 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/security-agent-skills.mdcCursor rule
- ai-mcp-securitySkill
- modern-attack-surfacesSkill
- offensive-toolkitSkill
- security-and-hardeningSkill
- security-auditSkill
- security-code-reviewSkill
- ctf-jail-escapeSkill
- ctf-kernel-exploitationSkill
- ctf-misc-toolkitSkill
- ctf-orchestratorSkill
- ctf-playbookSkill
- ctf-technique-atlasSkill
- ctf-training-loopSkill
- ctf-web-exploitationSkill
- ctf-writeup-disciplineSkill
- ctf-writeup-screenshotsSkill
- binary-exploitationSkill
- crypto-attack-patternsSkill
- crypto-ctf-attacksSkill
- crypto-toolkitSkill
- encoding-realignmentSkill
- exploit-developmentSkill
- exploit-poc-builderSkill
- kernel-exploitationSkill
- zero-day-huntingSkill
- bluetooth-jammer-sweepSkill
- esp32-serial-diagSkill
- flipper-zero-backupSkill
- flipper-zero-firmwareSkill
- hardware-iot-hackingSkill
- nrf24-bitbang-spiSkill
- rf-jammer-firmware-portSkill
- rf-multi-protocol-jammerSkill
- smart-card-driver-debugSkill
- smart-card-usb-directSkill
- wifi-deauth-jammerSkill
- wifi-dualband-jammerSkill
- advanced-pentestSkill
- network-pentestSkill
- pentest-quick-checklistSkill
- pentest-tool-referenceSkill
- pentest-tool-setupSkill
- pentest-workflowSkill
- advanced-attack-chainsSkill
- autonomous-pentest-scannerSkill
- intranet-pentest-advancedSkill
- pentest-report-generatorSkill
- post-exploitation-opsSkill
- professional-pentest-guideSkill
- chatgpt-web-relaySkill
- darkweb-researchSkill
- email-osint-investigationSkill
- local-network-reconSkill
- network-device-reconSkill
- osint-frameworkSkill
- osint-recon-modelSkill
- parallel-intel-gatheringSkill
- reconnaissance-opsSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 14 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Use this skill when the user asks about:
- Distinctive: line 45
Do not use this skill for purely legal/policy crypto questions unless technical mechanism selection is involved.
- Distinctive: line 49
Always answer crypto questions in this order:
- Distinctive: line 81
Read and cite from these first:
- Distinctive: line 95
When deepening Hermes knowledge on any crypto topic:
- Distinctive: line 128
Prefer TLS 1.3 with modern library defaults.
- Distinctive: line 129
Avoid inventing new secure-channel protocols.
- Distinctive: line 133
Default shortlist: AES-256-GCM, ChaCha20-Poly1305.
- Distinctive: line 134
Consider misuse-resistant variants like AES-GCM-SIV when nonce management is risky.
- Distinctive: line 139
Use PBKDF2 mainly for compatibility constraints, not as first choice.
- Distinctive: line 142
Prefer protocol/ecosystem defaults.
- Distinctive: line 151
Never design your own RNG.
- Distinctive: line 155
When reviewing a design, explicitly answer:
- Distinctive: line 170
Using raw primitives directly: Prefer complete constructions/protocols like AEAD, HPKE, TLS, age, Signal, libsodium sealed boxes.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cryptography
Overview
Use this skill to answer cryptography questions rigorously and to keep Hermes' cryptography knowledge durable instead of ad hoc. The skill turns broad crypto requests into a structured workflow: classify the problem, anchor on authoritative standards and textbooks, explain the security goal and threat model, and distinguish mathematical soundness from engineering safety.
This skill is for real cryptography, not vague "military-grade encryption" language. It prefers precise statements like confidentiality, integrity, authenticity, key establishment, forward secrecy, misuse resistance, side-channel resistance, and post-quantum migration readiness.
When to Use
Use this skill when the user asks about:
- symmetric encryption, AEAD, MACs, hashes, KDFs, RNGs
- public-key encryption, signatures, PKI, certificates, key exchange
- TLS, JOSE/JWT/JWE/JWS, password storage, secret management
- elliptic-curve crypto, lattice crypto, hash-based signatures
- zero-knowledge, threshold crypto, MPC, FHE/HE
- long-term crypto knowledge-base expansion and standards-anchored research curation
- cryptographic standards selection, algorithm migration, or crypto review
- post-quantum cryptography and transition planning
- building or solidifying long-term cryptography knowledge inside Hermes
Do not use this skill for purely legal/policy crypto questions unless technical mechanism selection is involved.
Core Principle
Always answer crypto questions in this order:
- Goal — what property is required: confidentiality, integrity, authenticity, non-repudiation, key establishment, privacy, anonymity, verifiability, or availability?
- Threat model — attacker capabilities, deployment constraints, data lifetime, performance, hardware assumptions.
- Primitive/protocol class — AEAD vs signature vs KEM vs PAKE vs ZK proof, etc.
- Standard/authority — NIST, RFC/IETF, CFRG, textbook, or well-established library guidance.
- Engineering risks — key lifecycle, randomness, nonce reuse, side channels, downgrade risks, metadata leakage, implementation maturity.
Fast Taxonomy
1. Secret-key primitives
- Block ciphers: AES
- Stream ciphers: ChaCha20
- Authenticated encryption: AES-GCM, ChaCha20-Poly1305, AES-GCM-SIV, XChaCha20-Poly1305
- MACs: HMAC, CMAC, Poly1305
- Hashes/XOFs: SHA-2, SHA-3, SHAKE, BLAKE2/3
- KDFs: HKDF, scrypt, Argon2, PBKDF2
- RNG/DRBG: system CSPRNG, NIST DRBG families
2. Public-key primitives
- Key establishment: (EC)DH, X25519/X448, ML-KEM
- Encryption/KEM: RSA-OAEP, ECIES-family, HPKE, ML-KEM
- Signatures: Ed25519/Ed448, ECDSA, RSA-PSS, ML-DSA, SLH-DSA
- PKI: X.509, certificate validation, revocation, trust stores
3. Advanced cryptography
- ZK: Sigma protocols, SNARKs, STARKs, Bulletproofs
- Threshold / MPC: DKG, threshold signatures, garbled circuits, secret sharing
- Privacy tech: PIR, anonymous credentials, mixnets, group signatures
- Homomorphic encryption: Paillier, BFV, BGV, CKKS, TFHE
Recommended Canon by Priority
Read and cite from these first:
- Boneh & Shoup, A Graduate Course in Applied Cryptography — broad modern foundation; browser-verified table of contents includes secret-key crypto, public-key crypto, signatures, elliptic curves, lattice/post-quantum crypto, zero-knowledge, AKE, threshold crypto, and MPC.
- NIST Cryptographic Standards and Guidelines — standards hub covering block ciphers, signatures, hashes, key management, randomness, lightweight crypto, threshold crypto, privacy-enhancing crypto, and post-quantum crypto.
- NIST SP 800-175B Rev.1 — high-level mechanism-selection guidance for using cryptographic standards.
- NIST PQC standards (2024):
- FIPS 203 — ML-KEM
- FIPS 204 — ML-DSA
- FIPS 205 — SLH-DSA
- Core protocol RFCs — TLS 1.3 and related RFCs when protocol-level guidance is needed.
Detailed study notes live in the reference files bundled with this skill.
Default Research Workflow
When deepening Hermes knowledge on any crypto topic:
- Classify the topic using the taxonomy above.
- Anchor on authority:
- theory → Boneh & Shoup
- U.S. standards / implementation guidance → NIST
- Internet protocol behavior → RFC / IETF / CFRG
- Capture exact claims with publication name, year, and what it standardizes.
- Separate levels:
- primitive security claim
- protocol composition claim
- operational deployment guidance
- Write reusable notes, not one-off answers. Prefer:
- definition
- what problem it solves
- what it does not solve
- standard choices
- failure modes / misuse traps
- migration / interoperability notes
- If comparing algorithms, score along:
- security assumption
- quantum vulnerability
- misuse resistance
- performance / ciphertext size / key size
- standardization status
- library maturity
- If giving implementation guidance, always recommend vetted libraries and protocols over custom crypto.
- When possible, prove behavior with runnable labs in
references/practical-labs.mdand the bundledscripts/tools instead of only describing expected outcomes. - For protocol or product reviews, load
references/modern-protocol-design.mdandreferences/key-management-and-secrets.md, then runscripts/crypto_design_review.pyon any available design text to catch common red flags before writing the final assessment.
Default Applied Guidance
For data in transit
- Prefer TLS 1.3 with modern library defaults.
- Avoid inventing new secure-channel protocols.
For application payload encryption
- Prefer AEAD.
- Default shortlist: AES-256-GCM, ChaCha20-Poly1305.
- Consider misuse-resistant variants like AES-GCM-SIV when nonce management is risky.
For password storage
- Prefer Argon2id.
- Accept scrypt if Argon2id unavailable.
- Use PBKDF2 mainly for compatibility constraints, not as first choice.
For signatures
- Prefer protocol/ecosystem defaults.
- Modern app-level default shortlist: Ed25519 or RSA-PSS depending on interoperability requirements.
- For PQ migration, track ML-DSA and hybrid deployments.
For key agreement / KEM
- Current default shortlist: X25519 for classical ecosystems, ML-KEM for PQ migration planning, often in hybrid combinations during transition.
For randomness
- Use OS CSPRNGs.
- Never design your own RNG.
Common Crypto Review Questions
When reviewing a design, explicitly answer:
- What are the assets and attacker goals?
- Are confidentiality and authenticity both required?
- Is nonce uniqueness guaranteed?
- How are keys generated, stored, rotated, revoked, and destroyed?
- Is the design relying on unauthenticated encryption anywhere?
- Does metadata remain exposed even if payload is encrypted?
- Are passwords hashed with a memory-hard KDF?
- Are certificates and hostnames validated correctly?
- Is there a post-quantum migration requirement due to long-lived secrets or harvest-now-decrypt-later risk?
- Is any custom cryptographic construction being proposed that should be rejected in favor of standards?
Common Pitfalls
- Confusing encryption with authentication. Encryption alone does not prove who sent the message or whether it was modified.
- Using raw primitives directly. Prefer complete constructions/protocols like AEAD, HPKE, TLS, age, Signal, libsodium sealed boxes.
- Nonce/IV misuse. Reuse can catastrophically break schemes like GCM.
- Weak password storage. Fast hashes like SHA-256 are not password hash functions.
- Rolling custom crypto. Novel constructions are almost always a red flag.
- Ignoring side channels and key lifecycle. Sound math is not enough.
- Treating PQC as optional for long-lived secrets. Harvest-now-decrypt-later matters.
- Using cryptography to solve authorization problems. Crypto protects data; it does not replace access-control design.
Reference Files
references/core-canon.md— authoritative study canon and reading orderreferences/topic-map.md— concept graph / roadmap of the fieldreferences/pqc-and-standards.md— NIST standards snapshot and migration viewreferences/applied-checklists.md— practical selection and review checklistsreferences/standards-and-protocol-anchors.md— browser/terminal-verified standards and RFC anchors for applied crypto answersreferences/domain-deep-dives.md— durable topic coverage across encryption, PKI, password hashing, ZK, MPC, HE, and migrationreferences/advanced-comparison-maps.md— decision tables for ZK, MPC, threshold crypto, HE, and PQ transition tradeoffsreferences/crypto-engineering-playbooks.md— reusable applied playbooks for password storage, PKI review, protocol composition, PQ migration, and privacy tech selectionreferences/modern-protocol-design.md— protocol design hierarchy, composition rules, HPKE/TLS guidance, replay resistance, and review templatereferences/key-management-and-secrets.md— key lifecycle, envelope encryption, multi-tenant keying, secret storage, JWT/JWKS pitfalls, and incident response questionsreferences/practical-labs.md— executable local labs for AEAD, signatures (Ed25519 + RSA-PSS), HKDF, password KDF (scrypt + Argon2id), X25519 key exchange, certificate-chain validation, and HPKE-style compositionreferences/research-program.md— ongoing agenda for continuously deepening Hermes cryptography knowledge
Scripts
scripts/crypto_design_review.py— lightweight text scanner for crypto-design smells such as ECB/CBC-without-MAC, raw RSA, SHA password hashing, naive MACs, weak RNGs, and JWT validation pitfalls
Verification Checklist
- Identified the exact security property needed
- Named the primitive/protocol class correctly
- Anchored advice to a standard, RFC, or textbook
- Distinguished theory from deployment guidance
- Called out misuse and side-channel risks
- Avoided recommending custom cryptography unless the task is research
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

