Tink-Rust: Digital Signatures

Docs MSRV

This crate provides digital signature functionality, as described in the upstream Tink documentation.

Usage

```Rust fn main() -> Result<(), Box> { tinksignature::init(); // Other key templates can also be used. let kh = tinkcore::keyset::Handle::new(&tinksignature::ecdsap256keytemplate())?; let s = tinksignature::newsigner(&kh)?;

let pt = b"this data needs to be signed";
let a = s.sign(pt)?;
println!("'{}' => {}", String::from_utf8_lossy(pt), hex::encode(&a));

let pubkh = kh.public()?;
let v = tink_signature::new_verifier(&pubkh)?;
assert!(v.verify(&a, b"this data needs to be signed").is_ok());
println!("Signature verified.");
Ok(())

} ```

License

Apache License, Version 2.0

Disclaimer

This is not an officially supported Google product.