Skip to content

Commit dc2128c

Browse files
alexclaude
andauthored
Rename mldsa _key_from_pkey functions to include variant name (#14590)
Rename private_key_from_pkey -> mldsa65_private_key_from_pkey and public_key_from_pkey -> mldsa65_public_key_from_pkey to match the naming convention established for other mldsa barrier functions. https://claude.ai/code/session_014t7oCq48f3U1MDG1rBzmcU Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0f838b6 commit dc2128c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/rust/src/backend/keys.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ fn private_key_from_pkey<'p>(
174174
pub_len,
175175
cryptography_openssl::mldsa::MlDsaVariant::MlDsa65.public_key_bytes()
176176
);
177-
Ok(crate::backend::mldsa::private_key_from_pkey(pkey)
177+
Ok(crate::backend::mldsa::mldsa65_private_key_from_pkey(pkey)
178178
.into_pyobject(py)?
179179
.into_any())
180180
}
@@ -312,7 +312,7 @@ fn public_key_from_pkey<'p>(
312312
pub_len,
313313
cryptography_openssl::mldsa::MlDsaVariant::MlDsa65.public_key_bytes()
314314
);
315-
Ok(crate::backend::mldsa::public_key_from_pkey(pkey)
315+
Ok(crate::backend::mldsa::mldsa65_public_key_from_pkey(pkey)
316316
.into_pyobject(py)?
317317
.into_any())
318318
}

src/rust/src/backend/mldsa.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ pub(crate) struct MlDsa65PublicKey {
2222
pkey: openssl::pkey::PKey<openssl::pkey::Public>,
2323
}
2424

25-
pub(crate) fn private_key_from_pkey(
25+
pub(crate) fn mldsa65_private_key_from_pkey(
2626
pkey: &openssl::pkey::PKeyRef<openssl::pkey::Private>,
2727
) -> MlDsa65PrivateKey {
2828
MlDsa65PrivateKey {
2929
pkey: pkey.to_owned(),
3030
}
3131
}
3232

33-
pub(crate) fn public_key_from_pkey(
33+
pub(crate) fn mldsa65_public_key_from_pkey(
3434
pkey: &openssl::pkey::PKeyRef<openssl::pkey::Public>,
3535
) -> MlDsa65PublicKey {
3636
MlDsa65PublicKey {

0 commit comments

Comments
 (0)