16 releases
Uses new Rust 2024
| new 0.1.15 | Mar 9, 2026 |
|---|---|
| 0.1.14 | Jan 15, 2026 |
| 0.1.9 | Dec 23, 2025 |
#2401 in Cryptography
40KB
507 lines
Client implementation of the Verifying Keyserver (VKS) interface
Use this to download keys from https://keys.openpgp.org or any other Hagrid Key server implementation
Use this to upload keys to https://keys.openpgp.org or any other Hagrid Key server implementation and make them discoverable under an email address, respectively
Sample code
Use a Session to work with the protocol implementation like this:
use std::fs;
use vks_client::*;
#[tokio::test]
async fn register_test_key_for_test_address() {
let Ok(session) = Session::init() else {
assert!(false);
return;
};
let keydata = fs::read_to_string("tests/koo_test.asc")
.expect("cannot read koo_test.asc");
assert_eq!(session.submit_key_and_verify(keydata.as_bytes().to_vec(),
"koo_test@dingens.org").await, Ok(()));
}
// When later a confirmation email arrives from the keyserver deliver it to the protocol
// implementation
session.verificaton_mail_received(maildata).await?;
Dependencies
~12–22MB
~429K SLoC