Lux Docs
Crypto

Signature Algorithms

ECDSA, Ed25519, BLS12-381, ML-DSA, and ring signature implementations

Classical and post-quantum signature algorithms for the Lux blockchain.

Classical Signatures

ECDSA (secp256k1)

Ethereum-compatible signatures for transaction signing on all EVM chains.

import "github.com/luxfi/crypto/secp256k1"

privKey, err := secp256k1.GenerateKey()
sig, err := secp256k1.Sign(hash[:], privKey)
pubKey, err := secp256k1.RecoverPubkey(hash[:], sig)

BLS12-381

Aggregatable signatures for Lux consensus. Multiple signatures combine into one.

import "github.com/luxfi/crypto/bls"

sk, err := bls.NewSecretKey()
pk := bls.PublicFromSecretKey(sk)
sig := bls.Sign(sk, msg)
ok := bls.Verify(pk, sig, msg)

aggSig := bls.AggregateSignatures(sigs)
ok := bls.AggregateVerify(aggSig, pks, msgs)

Post-Quantum Signatures

ML-DSA-65 (FIPS 204)

Lattice-based signatures with 192-bit security (NIST Level 3).

import "github.com/luxfi/crypto/mldsa"

pub, priv, err := mldsa.GenerateKey()
sig, err := mldsa.Sign(priv, msg)
ok := mldsa.Verify(pub, msg, sig)
PropertyML-DSA-65SLH-DSA-128f
Public key1,952 bytes32 bytes
Signature3,309 bytes17,088 bytes
SecurityNIST Level 3NIST Level 1
BasisLatticeHash-only

Ring Signatures

Anonymous group signatures where the verifier cannot identify the signer.

SchemeSecurityKey Type
LSAGClassicalsecp256k1
LatticeLSAGPost-quantumML-DSA-65
import "github.com/luxfi/crypto/ring"

signer, _ := ring.NewSigner(ring.LSAG)
sig, _ := signer.Sign(message, ringMembers, signerIndex)
ok := sig.Verify(message, ringMembers)

// Double-spend detection
store := ring.NewMemoryKeyImageStore()
err := ring.VerifyAndRecord(sig, message, ringMembers, store)

On this page