sharpie

github crates.io docs.rs build status

This is a Rust library that ...

Dependency

toml [dependencies] sharpie = "0.1.0"

For most recent version see crates.io

Usage

Run the example:

rust $ cargo run -p sharpie --example sign

For Ed25519, use the sharpie::ed module.

rust use sharpie::ed::{sign, verify, PrivateKey, PublicKey};

Optionally, generate your keys with OpenSSL:

$ openssl genpkey -algorithm ED25519 -out ed.private.pem $ openssl pkey -in private-key-ed.pem -pubout -out ed.public.pem

And then sign:

rust let privkey = PrivateKey::PEM(fs::read_to_string("fixtures/ed.private.pem")?); let sig = sign(b"hello world", &privkey)?;

Or, verify:

```rust let pubkey = PublicKey::PEM(fs::readtostring("fixtures/ed.public.pem")?);

// sig is Vec verify(b"hello world", &sig, pubkey)?; ```

Copyright

Copyright (c) 2022 @jondot. See LICENSE for further details.