Expand description
Copyright © 2025-2026 Wenze Wei. All Rights Reserved.
This file is part of Ri. The Ri project belongs to the Dunimd Team.
Licensed under the Apache License, Version 2.0 (the “License”); You may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
§Dilithium Signature
This module implements the Dilithium digital signature algorithm using liboqs. Dilithium is EUF-CMA secure and is based on the hardness of the Module-LWE (Learning With Errors over Modules) problem.
§Security Level
- Dilithium2: NIST Level 2 ≈ AES-128
- Dilithium3: NIST Level 3 ≈ AES-192
- Dilithium5: NIST Level 5 ≈ AES-256
§Usage
use ri::protocol::dilithium::DilithiumSigner;
let signer = DilithiumSigner::new();
let (public_key, secret_key) = signer.keygen()?;
let message = b"Hello, Post-Quantum World!";
let signature = signer.sign(&secret_key, message)?;
assert!(signer.verify(&public_key, message, &signature)?);