#holochain #holo #keystore #secret #cryptography

bin+lib lair_keystore_api

secret lair private keystore API library

35 releases

0.2.3 Dec 13, 2022
0.2.2 Nov 2, 2022
0.2.1 Sep 13, 2022
0.2.0 Jun 20, 2022
0.0.1-alpha.8 Nov 16, 2020

#215 in Cryptography

Download history 735/week @ 2022-10-06 357/week @ 2022-10-13 433/week @ 2022-10-20 607/week @ 2022-10-27 659/week @ 2022-11-03 453/week @ 2022-11-10 544/week @ 2022-11-17 406/week @ 2022-11-24 360/week @ 2022-12-01 878/week @ 2022-12-08 460/week @ 2022-12-15 391/week @ 2022-12-22 233/week @ 2022-12-29 443/week @ 2023-01-05 560/week @ 2023-01-12 743/week @ 2023-01-19

2,032 downloads per month
Used in 30 crates (6 directly)

MIT/Apache

235KB
5K SLoC

lair_keystore_api

Secret lair private keystore API library.

Project Forum Chat

License: MIT License: Apache-2.0

This library crate contains most of the logic for dealing with lair.

  • If you wish to run an in-process / in-memory keystore, or connect to an external lair keystore as a client, this is the library for you.
  • If you want to run the canonical lair-keystore, see the lair_keystore crate.
  • If you want to run a canonical lair-keystore in-process, using the canonical sqlcipher database, see the lair_keystore crate.
  • See the [lair_api] module for information about the lair_keystore_api protocol.
  • See [LairClient] for the client struct api.
Establishing a client connection to a canonical ipc keystore binary:
use lair_keystore_api::prelude::*;
use lair_keystore_api::ipc_keystore::*;

// create a client connection
let client =
    ipc_keystore_connect(connection_url, passphrase)
        .await
        .unwrap();

// create a new seed
let seed_info = client.new_seed(
    "test-seed".into(),
    None,
    false,
).await.unwrap();

// sign some data
let sig = client.sign_by_pub_key(
    seed_info.ed25519_pub_key.clone(),
    None,
    b"test-data".to_vec().into(),
).await.unwrap();

// verify the signature
assert!(seed_info.ed25519_pub_key.verify_detached(
    sig,
    b"test-data".to_vec(),
).await.unwrap());

License: MIT OR Apache-2.0

Dependencies

~15–23MB
~465K SLoC