Skip to content

Commit 3f9a6c8

Browse files
committed
ML-DSA-44: pass seed by value in pkcs8 serialization
Remove the unnecessary & reference when constructing MlDsa44PrivateKeyValue::Seed. Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
1 parent 034cbc4 commit 3f9a6c8

File tree

1 file changed

+1
-1
lines changed
  • src/rust/cryptography-key-parsing/src

1 file changed

+1
-1
lines changed

src/rust/cryptography-key-parsing/src/pkcs8.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ pub fn serialize_private_key(
515515
// RFC 9881 Section 6: Use seed-only format (recommended for storage efficiency)
516516
// Encode as [0] IMPLICIT OCTET STRING (SIZE (32))
517517
let seed = ml_dsa_params.private_key_seed()?;
518-
let key_value = MlDsa44PrivateKeyValue::Seed(&seed);
518+
let key_value = MlDsa44PrivateKeyValue::Seed(seed);
519519
let private_key_der = asn1::write_single(&key_value)?;
520520
(AlgorithmParameters::Mldsa44, private_key_der)
521521
} else {

0 commit comments

Comments
 (0)