crypto-primitives

Solid

Implementation and secure usage of cryptographic primitives including ECDSA, BLS, Schnorr signatures, key derivation, secret sharing, and constant-time operations. Provides guidance for secure cryptographic implementations in blockchain applications.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills