> For the complete documentation index, see [llms.txt](https://polarischain-1.gitbook.io/polarischain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://polarischain-1.gitbook.io/polarischain/4.-cryptographic-foundations-and-compliance-framework/4.2-crystals-dilithium-ml-dsa-44-implementation.md).

# 4.2 - CRYSTALS-Dilithium (ML-DSA-44) Implementation

All digital signatures in Polarischain use **CRYSTALS-Dilithium2**, standardized by NIST as **ML-DSA-44** in FIPS 204 (2024). Dilithium is a lattice-based signature scheme whose security rests on the **Module Learning With Errors (M-LWE)** and **Module Short Integer Solution (M-SIS)** problems — mathematical foundations with no known efficient quantum algorithms.

**Parameters (Dilithium2 / ML-DSA-44)**

| NIST Security Level | Level 2 (\~128-bit post-quantum) |
| ------------------- | -------------------------------- |
| Public key size     | 1,312 bytes                      |
| Signature size      | 2,420 bytes                      |
| Secret key size     | 2,528 bytes                      |
| Signing speed       | \~100,000 ops/sec (single core)  |
| Verification speed  | \~200,000 ops/sec (single core)  |

**Network Usage**

| Consensus blocks    | Block digest (BLAKE2b-256 hash of block contents) | Validator keypair        |
| ------------------- | ------------------------------------------------- | ------------------------ |
| Wallet transactions | Transaction payload hash                          | User/Institution keypair |
| P2P envelopes       | Inter-validator message content                   | Validator keypair        |
| Identity claims     | Claim data hash (for ERC-3643 compliance)         | Trusted issuer keypair   |

**Implementation Architecture**

Polarischain includes a **pure Rust** implementation of CRYSTALS-Dilithium, ported from the NIST reference C implementation to eliminate FFI dependencies and guarantee memory safety via the Rust compiler. The crate supports Dilithium2, Dilithium3, and Dilithium5 security levels, with **Dilithium2 selected as the default** for its optimal balance of security, bandwidth efficiency, and verification throughput.The consensus layer wraps this implementation behind a typed signing and verification API: validator keypairs sign block digests, and validators verify peer signatures against the committee’s published public keys before accepting any block into the DAG.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://polarischain-1.gitbook.io/polarischain/4.-cryptographic-foundations-and-compliance-framework/4.2-crystals-dilithium-ml-dsa-44-implementation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
