Expand description
Cryptographic verification: Ed25519 detached signatures and SHA-256 checksums.
§Signature formats
Two on-wire formats are supported, distinguished by the signature file’s extension:
.sig— 64 raw bytes, the Ed25519 signature itself..minisig— minisign’s text format. Two base64-encoded lines after theuntrusted comment:andtrusted comment:headers; the first decodes to the Ed25519 key-id + signature (74 bytes), the second is the per-signature trust comment (not used). Only the “Ed” (pure Ed25519) algorithm is supported — the “ED” (prehashedBLAKE2b) variant is rejected with a clear error.
§Public key policy
ToolMetadata::update_public_keys is a Vec<[u8; 32]> — any one
of the keys verifying is accepted. This enables key rotation
without breaking already-deployed binaries.
Functions§
- checksums
- Verify
asset_bytesagainst a checksums-file body. The body is in thesha256sumformat — one"<hex> <filename>"per line. Matches by theasset_filename’s basename. - ed25519
- Verify
asset_bytesagainst the detached-signaturesig_bytesunder any key intrusted_keys. ReturnsOkiff at least one key verifies; otherwiseUpdateError::BadSignature. - sha256_
hex - Compute the SHA-256 of
bytes, lower-case hex-encoded.