#sign #signature #verify #crypto

mini-sign

A crate for minisign in rust

2 releases

0.1.1 Jan 17, 2025
0.1.0 Nov 27, 2024

#513 in Cryptography

Download history 123/week @ 2024-11-26 6/week @ 2024-12-03 3/week @ 2024-12-10 114/week @ 2025-01-14 10/week @ 2025-01-21 4/week @ 2025-02-04 54/week @ 2025-02-11

76 downloads per month

MIT license

41KB
1K SLoC

CI status Last version Documentation

minisign-rs

A Rust implementation lib of the Minisign.

Low-level library for the minisign system, designed to be used in CI/CD pipelines, or embedded into other processes (rather than manual command line).

!!! This library not support legacy signature format !!!

Example

let KeyPairBox {
    public_key_box,
    secret_key_box,
} = KeyPairBox::generate(
    Some(b"password"),
    Some("pk untrusted comment"),
    Some("sk untrusted comment"),
)
.unwrap();
let msg = "test";
let sig_box = sign(
    Some(&public_key_box),
    &secret_key_box,
    Some(b"password"),
    msg.as_bytes(),
    Some("trusted comment"),
    Some("untrusted comment"),
)
.unwrap();
let v = verify(&public_key_box, &sig_box, msg.as_bytes()).unwrap();
assert_eq!(v, true);

Dependencies

~2.6–4MB
~82K SLoC