#holochain #holo #keystore #secret

bin+lib lair_keystore_api

secret lair private keystore API library

41 releases

0.4.3 Jan 29, 2024
0.4.0 Dec 15, 2023
0.3.0 Aug 11, 2023
0.2.4 Apr 24, 2023
0.0.1-alpha.8 Nov 16, 2020

#176 in Cryptography

Download history 780/week @ 2023-11-02 823/week @ 2023-11-09 920/week @ 2023-11-16 803/week @ 2023-11-23 585/week @ 2023-11-30 664/week @ 2023-12-07 905/week @ 2023-12-14 733/week @ 2023-12-21 459/week @ 2023-12-28 621/week @ 2024-01-04 876/week @ 2024-01-11 1000/week @ 2024-01-18 1082/week @ 2024-01-25 1313/week @ 2024-02-01 655/week @ 2024-02-08 909/week @ 2024-02-15

4,134 downloads per month
Used in 38 crates (7 directly)

MIT/Apache

300KB
6.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

~18–30MB
~513K SLoC