Rivellum

Rivellum Portal

Download Wallet (Chrome)
Checking...
mainnet

Post-Quantum Account Authentication

Rivellum uses CRYSTALS-Dilithium3 (ML-DSA-65, FIPS 204) as its sole signature scheme. All accounts are post-quantum secure by default.

Key Scheme

PropertyValue
AlgorithmCRYSTALS-Dilithium3 (NIST Level 3)
Public key size1,952 bytes
Signature size3,309 bytes
Security levelPost-quantum (NIST Level 3)
Classical fallbackNone — Dilithium only

There is no hybrid mode or classical fallback. Every signature on Rivellum is post-quantum.

Single-Key Accounts

The default account type uses a single Dilithium keypair:

AccountAuth {
    scheme: KeyScheme::Dilithium,
    public_keys: vec![dilithium_pubkey],
    threshold: None,
    session_keys: vec![],
}

Multi-Signature Accounts

Multi-sig accounts require M-of-N Dilithium signatures:

AccountAuth {
    scheme: KeyScheme::DilithiumMultiSig { threshold: 2 },
    public_keys: vec![key_a, key_b, key_c],  // 2-of-3
    threshold: Some(2),
    session_keys: vec![],
}
  • Threshold range: 1 to N (where N = number of keys)
  • All keys must be valid Dilithium public keys (1,952 bytes each)
  • Intents require at least threshold valid signatures

Session Keys

Session keys provide delegated signing authority with fine-grained policies:

SessionKey {
    public_key: PublicKey::Dilithium(key_bytes),
    policy: SessionKeyPolicy {
        allowed_contracts: vec![contract_addr],  // restrict to specific contracts
        max_gas_per_intent: 1_000_000,           // gas cap per intent
        expiration_ms: 1700000000000,            // absolute expiry timestamp
        max_calls: 100,                          // total invocations allowed
    },
    created_at_ms: 1699000000000,
    calls_used: 0,
    revoked: false,
}

Session Key Operations

OperationDescription
AddRegister a new session key with a policy
RevokePermanently disable a session key
UseSign an intent (increments calls_used)

Session keys are checked against their policy on every use:

  • Must not be revoked
  • Must not exceed max_calls
  • Must not be past expiration_ms
  • Target contract must be in allowed_contracts
  • Gas must not exceed max_gas_per_intent

SDK Usage

import { RivellumClient } from '@rivellum/sdk';
const client = new RivellumClient({ nodeUrl: 'https://rpc.rivellum.network' });

// Get account auth configuration
const auth = await client.getAccountAuth('0x1234...');
console.log(`Key Scheme: ${auth.key_scheme}`);

if (auth.key_scheme === 'multi_sig') {
    console.log(`Threshold: ${auth.threshold}/${auth.public_keys.length}`);
}

// List session keys
auth.session_keys.forEach(sk => {
    console.log(`Key: ${sk.public_key}, Calls: ${sk.calls_used}/${sk.policy.max_calls}`);
});

Security Considerations

  • Dilithium3 is a NIST-standardized post-quantum signature scheme resistant to attacks from both classical and quantum computers
  • Key sizes are larger than classical schemes (Ed25519), but security guarantees are significantly stronger
  • Session keys limit blast radius: even if compromised, damage is bounded by policy constraints
  • Multi-sig adds organizational security without sacrificing post-quantum properties