Skip to main content

Module falcon

Module falcon 

Source
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.0

Unless 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.

§Falcon Signature

This module implements the Falcon digital signature algorithm using liboqs. Falcon is EUF-CMA secure and is based on the hardness of the Shortest Integer Solution (SIS) problem over NTRU lattices.

§Security Level

  • Falcon512: NIST Level 1 ≈ AES-128 (compact signatures)
  • Falcon1024: NIST Level 5 ≈ AES-256 (compact signatures)

§Advantages

Falcon provides the smallest signature sizes among NIST PQC finalists, making it ideal for bandwidth-constrained scenarios.

§Usage

use ri::protocol::falcon::FalconSigner;

let signer = FalconSigner::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)?);

Structs§

FalconPublicKey
FalconSecretKey
FalconSignature
FalconSigner