Skip to content

Commit 0c027fe

Browse files
committed
fixed mldsa docs (again, hopefully for the last time)
1 parent 28c645b commit 0c027fe

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

crypto/mldsa/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
#![forbid(unsafe_code)]
9494
#![allow(incomplete_features)] // needed because currently generic_const_exprs is experimental
9595
#![feature(generic_const_exprs)]
96-
#![feature(int_roundings)]
97-
#![feature(inherent_associated_types)]
96+
// #![feature(int_roundings)]
97+
// #![feature(inherent_associated_types)]
9898
#![feature(adt_const_params)]
9999

100100
// These are because I'm matching variable names exactly against FIPS 204, for example both 'K' and 'k',

crypto/mldsa/src/mldsa.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ impl<
14271427
/// Input: Signature 𝜎 ∈ 𝔹𝜆/4+ℓ⋅32⋅(1+bitlen (𝛾1−1))+𝜔+𝑘.
14281428
fn verify_mu_internal(
14291429
pk: &PK,
1430-
mu: &[u8; MU_LEN],
1430+
mu: &[u8; 64],
14311431
sig: &[u8; SIG_LEN],
14321432
) -> bool {
14331433
// 1: (𝜌, 𝐭1) ← pkDecode(𝑝𝑘)
@@ -1678,7 +1678,7 @@ pub trait MLDSATrait<
16781678
/// Input: Signature 𝜎 ∈ 𝔹𝜆/4+ℓ⋅32⋅(1+bitlen (𝛾1−1))+𝜔+𝑘.
16791679
fn verify_mu_internal(
16801680
pk: &PK,
1681-
mu: &[u8; MU_LEN],
1681+
mu: &[u8; 64],
16821682
sig: &[u8; SIG_LEN],
16831683
) -> bool;
16841684
}

crypto/mldsa/tests/bc_test_data.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ use bouncycastle_sha3::SHAKE256;
88

99
#[cfg(test)]
1010
mod bc_test_data {
11+
#![allow(dead_code)]
12+
1113
use std::{fs};
1214
use bouncycastle_core_interface::errors::SignatureError;
1315
use bouncycastle_hex as hex;
1416
use bouncycastle_core_interface::key_material::{KeyMaterial, KeyMaterial256, KeyType};
15-
use bouncycastle_core_interface::traits::{Hash, PHSignature, SecurityStrength, Signature, SignaturePrivateKey, SignaturePublicKey};
17+
use bouncycastle_core_interface::traits::{Hash, SecurityStrength, Signature, SignaturePrivateKey, SignaturePublicKey};
1618
use bouncycastle_mldsa::{HashMLDSA44_with_SHA512, HashMLDSA65_with_SHA512, HashMLDSA87_with_SHA512, MLDSA44PrivateKey, MLDSA44PublicKey, MLDSA65PrivateKey, MLDSA65PublicKey, MLDSA87PrivateKey, MLDSA87PublicKey, MLDSAPrivateKeyTrait, MLDSATrait, MLDSA44, MLDSA65, MLDSA87};
1719
use bouncycastle_sha2::SHA512;
1820
use crate::BustedMuBuilder;

crypto/mldsa/tests/hash_mldsa_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ mod hash_mldsa_tests {
88
use bouncycastle_hex as hex;
99
use bouncycastle_core_interface::key_material::{KeyMaterial256, KeyType};
1010
use bouncycastle_core_interface::traits::{Hash};
11-
use bouncycastle_core_test_framework::DUMMY_SEED_1024;
1211
use bouncycastle_core_test_framework::signature::TestFrameworkSignature;
1312
use bouncycastle_mldsa::{HashMLDSA44_with_SHA256, HashMLDSA44_with_SHA512, HashMLDSA65_with_SHA256, HashMLDSA65_with_SHA512, HashMLDSA87_with_SHA256, HashMLDSA87_with_SHA512, MLDSA44PrivateKey, MLDSA44PublicKey, MLDSA65PrivateKey, MLDSA65PublicKey, MLDSA87PrivateKey, MLDSA87PublicKey, MLDSATrait, MLDSA44, MLDSA65, MLDSA87};
1413
use bouncycastle_mldsa::{MLDSA44_SIG_LEN, MLDSA65_SIG_LEN, MLDSA87_SIG_LEN};

0 commit comments

Comments
 (0)