Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ed448-goldilocks/src/sign/verifying_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@ impl VerifyingKey {
return Err(SigningError::InvalidSignatureSComponent.into());
}

// RFC 8032 mandates context length <= 255 bytes. Enforce consistently with signing path.
if ctx.len() > 255 {
return Err(SigningError::PrehashedContextLength.into());
}

// SHAKE256(dom4(F, C) || R || A || PH(M), 114) -> scalar k
let mut bytes = WideEdwardsScalarBytes::default();
let ctx_len = ctx.len() as u8;
Expand Down