Crate minisign_verify

source ·
Expand description

A small crate to verify Minisign signatures.

§Example

use minisign_verify::{PublicKey, Signature};

let public_key =
    PublicKey::from_base64("RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3")
        .expect("Unable to decode the public key");

let signature = Signature::decode(
    "untrusted comment: signature from minisign secret key
RUQf6LRCGA9i559r3g7V1qNyJDApGip8MfqcadIgT9CuhV3EMhHoN1mGTkUidF/\
     z7SrlQgXdy8ofjb7bNJJylDOocrCo8KLzZwo=
trusted comment: timestamp:1633700835\tfile:test\tprehashed
wLMDjy9FLAuxZ3q4NlEvkgtyhrr0gtTu6KC4KBJdITbbOeAi1zBIYo0v4iTgt8jJpIidRJnp94ABQkJAgAooBQ==",
)
.expect("Unable to decode the signature");

let bin = b"test";
public_key
    .verify(&bin[..], &signature, false)
    .expect("Signature didn't verify");

Structs§

  • A Minisign public key
  • A Minisign signature
  • A StreamVerifier to verify a signature against a data stream NOTE: this mode of operation does not support the legacy signature model

Enums§