Skip to main content

verify_binary_signature_with_key

Function verify_binary_signature_with_key 

Source
pub fn verify_binary_signature_with_key(
    binary_path: &Path,
    signature: &[u8],
    public_key: &MlDsaPublicKey,
) -> Result<()>
Expand description

Verify signature with an explicit public key.

This function is useful for testing and for cases where the public key is provided externally rather than embedded in the binary.

§Arguments

  • binary_path - Path to the binary to verify
  • signature - The ML-DSA-65 signature bytes
  • public_key - The public key to verify against

§Errors

Returns an error if:

  • The binary file cannot be read
  • The signature has an invalid size
  • The signature format is invalid
  • The signature verification fails