port lost docstring from deleted C code
What changed, and why it matters
This commit only adds a comment explaining that a function behaves like Python's HMAC-SHA256. No code behavior changed, and there is no security issue.
No action required; this is a documentation-only change with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A single-line docstring/comment was added to the Rust function kdf_hmac in src/rust/bitbox-securechip/src/optiga.rs to document that it is equivalent to Python’s hmac.new(key, msg, hashlib.sha256).digest(). The underlying call to ops::crypt_hmac is unchanged. This is a non-functional documentation-only change.
Changed components
src/rust/bitbox-securechip/src/optiga.rsInspect captured patch +1 / −0
diff --git a/src/rust/bitbox-securechip/src/optiga.rs b/src/rust/bitbox-securechip/src/optiga.rs
index 438b2a1..095464e 100644
--- a/src/rust/bitbox-securechip/src/optiga.rs
+++ b/src/rust/bitbox-securechip/src/optiga.rs
@@ -77,6 +77,7 @@ async fn kdf_hmac(
msg: &[u8; KDF_LEN],
mac_out: &mut [u8; KDF_LEN],
) -> Result<(), Error> {
+ // Equivalent to Python: `hmac.new(key, msg, hashlib.sha256).digest()`.
ops::crypt_hmac(OPTIGA_HMAC_SHA_256, optiga_oid, msg, mac_out).await
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.