cryptography
Skill2 starsChanged 10 months agoMITView on GitHub
Applies multi-algorithm cryptography (ED25519, P-256, RSA-4096) using Sorcha.Cryptography. Use when: implementing signing, verification, encryption, key generation, HD wallets, or address encoding.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- transilienceai/communitytoolstheir own version, first seen Mar 30, 2026
- ffsshhttiikk/opencode-agents-skillstheir own version, first seen Feb 28, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- transilienceai/communitytools★ 555same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository79 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- docs/llms-full.txtllms.txt
- llms.txtllms.txt
- aspireSkill
- aspnet-coreSkill
- blazorSkill
- blueprint-builderSkill
- configuring-opentelemetry-dotnetSkill
- coverage-analysisSkill
- coverletSkill
- database-expertSkill
- dockerSkill
- dotnetSkill
- entity-framework-coreSkill
- entity-frameworkSkill
- fluent-assertionsSkill
- frontend-designSkill
- grpcSkill
- jwtSkill
- mcpSkill
- microsoft-extensionsSkill
- migrate-xunit-to-xunit-v3Skill
- minimal-api-file-uploadSkill
- minimal-apisSkill
- mongodbSkill
- moqSkill
- nbitcoinSkill
- network-bootstrapSkill
- nunitSkill
- optimizing-ef-core-queriesSkill
- playwrightSkill
- postgresqlSkill
- prodexecSkill
- redisSkill
- scalarSkill
- signalrSkill
- sorcha-appSkill
- sorcha-architectureSkill
- sorcha-cliSkill
- sorcha-uiSkill
- speckit-agent-context-updateSkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-git-commitSkill
- speckit-git-featureSkill
- speckit-git-initializeSkill
- speckit-git-remoteSkill
- speckit-git-validateSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- verifiable-credentialsSkill
- walkthrough-builderSkill
- worker-servicesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 106
Use mcp__context7__resolve-library-id to search for "libsodium" or "System.Security.Cryptography"
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 Skill
Sorcha.Cryptography provides multi-algorithm support (ED25519, P-256, RSA-4096), symmetric encryption (AES, ChaCha20), and BIP39/44 HD wallet derivation. All operations return CryptoResult<T> for explicit error handling—no exceptions for crypto failures.
secp256k1 / ES256K lives in a SEPARATE project — Sorcha.Cryptography.Secp256k1 (Feature 177, verify-only). Pure-managed (BouncyCastle only): ISecp256k1Verifier (JOSE ES256K), Secp256k1Jwk (parse/build/decompress), Keccak256, EthereumAddress (EIP-55). It is deliberately NOT folded into Sorcha.Cryptography — Sorcha.Verifier.Engine is consumed by the Blazor WASM PWA, so it must stay native-dependency-free and cannot reference Sorcha.Cryptography (native Sodium/Mcl); both verification paths need secp256k1. And .NET's built-in ECDsa does NOT reliably support secp256k1 on Windows/WASM — BouncyCastle is required. Verify-only: no signing, no new WalletNetworks member (recoverable signing is Phase 3). Consumed by SdJwtService.Verify (alg:ES256K, SEC1-uncompressed pubkey bytes) and VerifiablePresentationValidator.VerifyEs256k. Design: docs/superpowers/specs/2026-07-09-ethereum-verify-phase1-design.md.
Feature 178 (Phase 2) added ecrecover to the same primitive — still verify-only. Secp256k1Recovery.TryRecover(message, joseSignature) recovers the candidate secp256k1 public keys from a JOSE ES256K signature (64-byte r‖s, no recid → tries recid 0 and 1; SEC1 §4.1.6 Q = r⁻¹(sR − eG) via BouncyCastle). Secp256k1Verifier.VerifyByAddress composes recover → EthereumAddress.FromPublicKey (the Phase-1 keccak/EIP-55) → case-insensitive match, tolerating a CAIP-10 eip155:{chain}:0x… input. This is what verifies address-only issuer DIDs (did:pkh / address-form did:ethr) where no key is published — see the verifiable-credentials skill. Recovery is not signing: no private-key op, no WalletNetworks member. Design: docs/superpowers/specs/2026-07-09-ethereum-verify-phase2-design.md.
Feature 180 (Phase 3) added secp256k1 SIGNING to the same primitive — prove-control only, no transactions. Secp256k1Signer.SignRecoverable(digest32, privateKey32) produces a recoverable Ethereum signature (RFC-6979 deterministic k via BouncyCastle HMacDsaKCalculator, low-s canonical, 65-byte r‖s‖v, v = recoveryId + 27). Eip191.PersonalSignDigest = keccak256("\x19Ethereum Signed Message:\n" + len + message) — Ethereum ECDSA hashes with keccak, not SHA-256, so Secp256k1Recovery was refactored to a shared RecoverCore with RecoverFromDigest(digest, r, s, recId) (Ethereum, digest-direct) beside the unchanged TryRecover(message, joseSig) (ES256K, SHA-256). Siwe/ (message model + SiweFormatter format/parse + SiweVerifier) implements EIP-4361 produce and verify (Sorcha as relying party). All pure-managed (WASM-safe — the PWA wallet signs on-device). Security: used only for EIP-191/SIWE prove-control; no arbitrary-digest signing API; the wallet-side IEthereumIdentityService (derive-on-demand from the encrypted seed, tx-guard, no key export) is the Phase-3 part-2 follow-up. No new WalletNetworks member (auxiliary m/44'/60'/0'/0/x identity). Design: docs/superpowers/specs/2026-07-10-ethereum-verify-phase3-design.md.
Feature 182 (Phase 4) added native ETH TRANSACTING to the same primitive — still no Nethereum, still pure-managed. Rlp (minimal RLP encoder: byte-string / list / minimal big-endian scalar — zero → 0x80, leading zeros stripped) + EthereumTransaction (EIP-1559 type-2): BuildSigningPayload() = 0x02 ‖ rlp([chainId,nonce,maxPriorityFee,maxFee,gasLimit,to,value,data,accessList=[]]), SigningHash() = its keccak, AssembleSigned(sig65) = 0x02 ‖ rlp([…,yParity,r,s]) + tx hash (typed-tx signatures carry parity, so yParity = v − 27 — reuses the unchanged Secp256k1Signer). Anchored by a hand-derived byte-exact signing-payload vector + a sign→Secp256k1Recovery→address round-trip (no external tool needed). The data field is empty this phase (native transfers only; contract-write calldata is a later seam via AbiCodec). Custody/layering: the value-moving signer is the server-side IEthereumTransactionSigner in Sorcha.Wallet.Core (a SEPARATE interface from the WASM-safe IEthereumIdentityService prove-control surface — the prove-control tx-guard is untouched), it takes no IEvmRpcClient dependency, and the orchestrator/policy/endpoints live in Sorcha.Wallet.Service (gated, testnet-first, server-side only). IEvmRpcClient gained write/query methods (eth_sendRawTransaction, getTransactionCount pending, estimateGas, maxPriorityFeePerGas, base fee via getBlockByNumber, getTransactionReceipt, chainId). Design: docs/superpowers/specs/2026-07-11-ethereum-verify-phase4-design.md.
Quick Start
Key Generation
// Inject ICryptoModule
var keySetResult = await _cryptoModule.GenerateKeySetAsync(WalletNetworks.ED25519);
if (!keySetResult.IsSuccess)
throw new InvalidOperationException($"Key generation failed: {keySetResult.Status}");
var keySet = keySetResult.Value!;
// keySet.PrivateKey.Key = 64 bytes (ED25519)
// keySet.PublicKey.Key = 32 bytes (ED25519)Signing & Verification
// Hash then sign
byte[] hash = SHA256.HashData(transactionData);
var signResult = await _cryptoModule.SignAsync(
hash,
(byte)WalletNetworks.ED25519,
keySet.PrivateKey.Key!);
// Verify
var status = await _cryptoModule.VerifyAsync(
signResult.Value!,
hash,
(byte)WalletNetworks.ED25519,
keySet.PublicKey.Key!);
bool isValid = status == CryptoStatus.Success;HD Wallet Creation
var keyRing = await _keyManager.CreateMasterKeyRingAsync(WalletNetworks.ED25519, password: null);
// keyRing.Mnemonic = "word1 word2 ... word12" — user must backup
// keyRing.MasterKeySet contains derived keysKey Concepts
| Concept | Usage | Example |
WalletNetworks | Algorithm selection | ED25519, NISTP256, RSA4096 |
CryptoResult<T> | Error handling | .IsSuccess, .Status, .Value |
KeySet | Public/private pair | .PrivateKey.Key, .PublicKey.Key |
KeyRing | Full wallet with mnemonic | .Mnemonic, .MasterKeySet |
.Zeroize() | Secure memory clearing | Call when done with keys |
Common Patterns
Platform-Specific Key Storage
// Encryption provider abstraction handles platform differences
var encrypted = await _encryptionProvider.EncryptAsync(privateKey, "wallet-key-id");
// Windows: DPAPI, Linux: Secret Service, Dev: AES-GCMAddress Generation
var address = _walletUtilities.PublicKeyToWallet(publicKey, (byte)WalletNetworks.ED25519);
// Returns: "ws1q8tuvvdykly8n0fy5jkuu8cjw0fu0p6jl5rp9g..."See Also
- patterns - Algorithm selection, signing workflows, key management
- workflows - Wallet creation, transaction signing, encryption
Related Skills
- See the nbitcoin skill for HD wallet derivation paths (BIP32/39/44)
- See the postgresql skill for encrypted key storage patterns
- See the xunit and fluent-assertions skills for testing crypto code
Documentation Resources
Fetch latest cryptography documentation with Context7.
How to use Context7:
- Use
mcp__context7__resolve-library-idto search for "libsodium" or "System.Security.Cryptography" - Query with
mcp__context7__query-docsusing the resolved library ID
Recommended Queries:
- "ED25519 signing verification"
- "AES-GCM authenticated encryption"
- "BIP39 mnemonic seed derivation"
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.

