Cryptographic Primitives
Platus uses Baby Jubjub for elliptic curve operations, Poseidon for in-circuit hashing, and hybrid post-quantum encryption combining ECDH with ML-KEM-1024.
Reference: Baby Jubjub Curve Specification
Elliptic Curve
Baby Jubjub Curve
Baby Jubjub is a twisted Edwards curve defined over a prime field by the equation:
Parameters:
- Curve order: (cofactor h = 8)
Baby Jubjub is optimized for zk-SNARKs over BN254. See EIP-2494 for specification.
Point Operations
Points are validated to ensure:
- They lie on the curve
- They're in the prime-order subgroup
Serialization is little-endian: 64 bytes = x (32 bytes) || y (32 bytes).
Hash Functions
Poseidon
Used for all in-circuit hashing (commitments, nullifiers).
Constraint cost:
- ~200 constraints per hash
- Compare to ~40,000 for SHA-256
Outputs are field elements in .
SHA-256 / SHA-512
Used outside circuits for:
- Key derivation (HKDF-SHA256)
- Nonce generation (SHA-512)
- Classical cryptographic operations
Authenticated Encryption
Platus uses a Diffie–Hellman–based construction over Baby Jubjub:
- Root shared key derivation: HKDF-SHA256
- Authenticated encryption with associated data (AEAD): ChaCha20-Poly1305
For complete details: refer to Post-Quantum Security
Signatures
Schnorr-style signatures over Baby Jubjub with Poseidon challenge
Sign
-
Derive scalar:
-
Generate nonce: where and ( v ) is random.
-
Compute commitment:
-
Challenge:
-
Response:
Signature:
Verify
-
Compute:
-
Check:
Security Considerations
-
Nonce generation: Each signature uses a fresh nonce derived from SHA-512(x || v || m) where x is deterministic per-key entropy and v is random. This prevents nonce reuse while avoiding pure deterministic schemes vulnerable to fault attacks.
-
Challenge binding: The Poseidon challenge includes the public key, preventing signature reuse across different keys.
-
Scalar field operations: All arithmetic is performed modulo r (scalar field order), not the curve order.
-
Security: The signatures are secure under the assumption that discrete log problems are infeasible in the underlying elliptic curve.