crypto-primitiveslisted
Install: claude install-skill a5c-ai/babysitter
# Cryptographic Primitives Skill
Expert implementation and usage of cryptographic primitives for blockchain and security applications.
## Capabilities
- **Digital Signatures**: ECDSA, BLS, Schnorr signature implementation and verification
- **Key Derivation**: BIP-32/39/44 hierarchical deterministic key generation
- **Threshold Cryptography**: Shamir secret sharing, threshold signatures
- **Hash Functions**: Secure usage of Keccak, Poseidon, MiMC, Pedersen
- **Commitments**: Pedersen commitments, hash commitments
- **Secure Randomness**: CSPRNG usage, VRF integration
- **Constant-Time Operations**: Side-channel resistant implementations
## Signature Schemes
### ECDSA (secp256k1)
Standard Ethereum signature scheme:
```javascript
import { secp256k1 } from '@noble/curves/secp256k1';
import { keccak_256 } from '@noble/hashes/sha3';
// Sign message
const messageHash = keccak_256(message);
const signature = secp256k1.sign(messageHash, privateKey);
// Verify signature
const isValid = secp256k1.verify(signature, messageHash, publicKey);
// Recover public key from signature (Ethereum style)
const recoveredPubKey = signature.recoverPublicKey(messageHash);
```
### BLS Signatures (BLS12-381)
Aggregatable signatures for validator sets:
```javascript
import { bls12_381 } from '@noble/curves/bls12-381';
// Sign with BLS
const signature = bls12_381.sign(message, privateKey);
// Verify
const isValid = bls12_381.verify(signature, message, publicKey);
// Aggregate signatures
con