Digital signatures

Dilithium2-AES-R3

The Round 3 submission of Dilithium, predecessor of the ML-DSA standard

unverified Root API only Post-quantum
Unverified tier.

Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About Dilithium2-AES-R3

Dilithium2-AES-R3 is one of 12 CRYSTALS-Dilithium (Round 3) variants in the NextSSL registry, a digital signature scheme. It uses a 1,312-byte public key, a 2,544-byte secret key and a 1–2,420-byte signature. It is designed to resist attacks by large quantum computers. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

CRYSTALS-Dilithium is the lattice-based signature scheme NIST selected in 2022 and later standardised, with changes, as ML-DSA in FIPS 204. This family preserves the third-round specification, including its AES-based and randomised variants.

Dilithium uses the Fiat-Shamir with aborts technique over module lattices: a commitment to a masked vector is hashed with the message into a sparse challenge, and the response is released only if it falls within bounds that make it statistically independent of the secret key. Public keys are compressed by publishing only the high bits of the key vector, with hints in the signature letting the verifier compensate.

ML-DSA is not byte-compatible with Round 3 Dilithium. FIPS 204 lengthened the public-key hash tr to 64 bytes, changed how the message representative and signing randomness are derived, added domain separation with context strings, and tightened hint encoding checks. Round 3 signatures do not verify under ML-DSA. Within each security level, the AES and SHAKE variants have identical key and signature sizes.

Twelve variants are present: Dilithium2, Dilithium3 and Dilithium5 (security categories 2, 3 and 5), each in deterministic and randomised (-r) signing modes, and each with an AES variant that expands the matrix and secrets with AES-256 in counter mode rather than SHAKE. The AES variants were not carried forward into ML-DSA. Signature and key sizes match those of the corresponding ML-DSA parameter sets, so size alone does not distinguish them.

History

2016–2025
  1. NIST calls for post-quantum KEMs and signatures

    NIST Post-Quantum Cryptography standardisation
  2. CRYSTALS-Dilithium published

  3. 69 complete round-1 submissions published

    NIST Post-Quantum Cryptography standardisation
  4. 26 candidates advance to round 2

    NIST Post-Quantum Cryptography standardisation
  5. Round 3 finalists and alternates announced

    NIST Post-Quantum Cryptography standardisation
  6. Kyber, Dilithium, Falcon and SPHINCS+ selected; round 4 opens

    NIST Post-Quantum Cryptography standardisation
  7. FIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA) published

    NIST Post-Quantum Cryptography standardisation
  8. HQC selected as a second KEM

    NIST Post-Quantum Cryptography standardisation

How it works

  1. A public matrix is expanded from a seed with SHAKE-128, or AES-256-CTR in the AES variants.
  2. Signing commits to a masked vector, hashes it with the message into a challenge, and computes a response.
  3. Responses that exceed norm bounds are rejected and the loop restarts.
  4. Randomised (-r) variants draw fresh randomness for the mask; the default variants derive it deterministically.

Security notes

Superseded by ML-DSA; new systems should implement FIPS 204. Round 3 Dilithium remains cryptographically sound but is not interoperable with ML-DSA, and the deterministic mode is more exposed to fault attacks than hedged signing.

Typical uses

Verifying signatures from deployments that predate FIPS 204Reproducing Round 3 known-answer testsComparing AES-based and SHAKE-based expansion

Sizes

FieldBytesMeaning
pk1,312Public key
sk2,544Secret key
sig1 – 2,420Signature
seed0Seed
ctx0Context string

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
pk, sk = root.call("sign_keygen", "dilithium2-aes-r3", None, outs=2)
sig = root.call("sign_detached", "dilithium2-aes-r3", None, sk, b"message", b"")[0]
ok  = root.check("verify_detached", "dilithium2-aes-r3", None, pk, b"message", b"", sig)

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Frequently asked questions

What is Dilithium2-AES-R3?

Dilithium2-AES-R3 is a signature in the CRYSTALS-Dilithium (Round 3) family. CRYSTALS-Dilithium is the lattice-based signature scheme NIST selected in 2022 and later standardised, with changes, as ML-DSA in FIPS 204.

What are the Dilithium2-AES-R3 sizes?

In NextSSL, Dilithium2-AES-R3 uses: public key 1,312 bytes, signature 1 to 2,420 bytes.

Is Dilithium2-AES-R3 post-quantum?

Yes. Dilithium2-AES-R3 is a post-quantum signature: it is designed to resist attacks by large quantum computers. Its tier in NextSSL is unverified.

Who designed Dilithium2-AES-R3 and when?

Dilithium2-AES-R3 belongs to the CRYSTALS-Dilithium (Round 3) family, first published in 2017 by Léo Ducas, Eike Kiltz, Tancrède Lepoint, Vadim Lyubashevsky, Peter Schwabe, Gregor Seiler, Damien Stehlé. Its origin: NIST PQC Round 3 selection, superseded by ML-DSA (FIPS 204).

Is Dilithium2-AES-R3 safe to use?

Dilithium2-AES-R3 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).

What other CRYSTALS-Dilithium (Round 3) variants are there?

NextSSL also registers dilithium2-aes-r-r3, dilithium2-r-r3, dilithium2-r3, dilithium3-aes-r-r3, dilithium3-aes-r3, dilithium3-r-r3 and more in the CRYSTALS-Dilithium (Round 3) family.