Skip to content

withoutboats/pbp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

pbp - Pretty Bad Protocol

This crate lets you generate OpenPGP datagrams from ed25519 keys and signatures; it is intended to bridge from a non-PGP system to a transport medium that expects PGP data.

fn print_key(keypair: KeyPair) {
    let pgp_key = PgpKey::new(&keypair.public[..], "user id string", |data| {
        keypair.sign(data).to_bytes()
    });
    println!("{}", pgp_key);
}

It's agnostic about what library you use to implement ed25519, but it has a feature which integrates with ed25519-dalek

Thanks to isis lovecruft and Henry de Valence for assistance with the dalek API and understanding the OpenPGP specification.

Demonstration

The "print" example prints an ASCII armored OpenPGP public key to stdout; you can check that using:

$ cargo run --features dalek --example print

About

pretty bad protocol

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages