pub trait KeystoreSenderExt {
    fn generate_sign_keypair_from_pure_entropy(
        &self
    ) -> KeystoreApiFuture<AgentPubKey>;
fn sign(&self, input: Sign) -> KeystoreApiFuture<Signature>;
fn get_first_tls_cert(
        &self
    ) -> KeystoreApiFuture<(CertDigest, Cert, CertPrivKey)>;
fn get_or_create_first_tls_cert(
        &self
    ) -> KeystoreApiFuture<(CertDigest, Cert, CertPrivKey)>;
fn create_x25519_keypair(&self) -> KeystoreApiFuture<X25519PubKey>;
fn x_25519_x_salsa20_poly1305_encrypt(
        &self,
        input: X25519XSalsa20Poly1305Encrypt
    ) -> KeystoreApiFuture<XSalsa20Poly1305EncryptedData>;
fn x_25519_x_salsa20_poly1305_decrypt(
        &self,
        input: X25519XSalsa20Poly1305Decrypt
    ) -> KeystoreApiFuture<Option<XSalsa20Poly1305Data>>; }
Expand description

Some legacy APIs to make refactor easier.

Required methods

Generates a new pure entropy keypair in the keystore, returning the public key.

Generate a signature for a given blob of binary data.

If we have a TLS cert in lair - return the first one Errors if no certs in lair

If we have a TLS cert in lair - return the first one otherwise, generate a TLS cert and return it

Generate a new x25519 keypair in lair and get the pubkey back for general usage.

If we have an X25519 pub key in lair use it to ECDH negotiate a shared key and then Salsa20Poly1305 encrypt the data with that and a random nonce. a.k.a. libsodium crypto_box()

The inverse of x_25519_x_salsa20_poly1305_encrypt. Returns None if decryption fails.

Implementors