@agora-protocol/crypto
v0.3.3
Published
ACP cryptographic primitives: Ed25519, X25519, ChaCha20-Poly1305, SHA-256
Maintainers
Readme
@agora-protocol/crypto
Cryptographic primitives for the ACP Protocol. Thin wrappers around @noble/{curves,ciphers,hashes} — deterministic, audited, browser-compatible.
Install
npm install @agora-protocol/cryptoWhat's inside
- Ed25519 —
generateEd25519KeyPair,signMessage,verifyMessage. - X25519 —
deriveSharedSecret(ECDH for handshake). - ChaCha20-Poly1305 —
encrypt,decrypt(wire AEAD + at-rest sealing). - SHA-256 hash chain —
computeMessageHash,verifyChain,GENESIS_HASH,canonicalizeForHashing(dropsundefinedkeys soaudit_rootis stable across schema evolution). - Key ratcheting — helper primitives for forward secrecy.
Every message in the ACP chain is signed with Ed25519 and hash-linked to its predecessor; the canonicalizer is what makes the chain reproducible across implementations.
License
MIT
