Struct recrypt::api::Api[]

pub struct Api<H, S, R> { /* fields omitted */ }

Recrypt public API

Methods

impl Api<Sha256, Ed25519, RandomBytes<ThreadRng>>

impl<CR: CryptoRng + RngCore> Api<Sha256, Ed25519, RandomBytes<CR>>

Trait Implementations

impl<H: Debug, S: Debug, R: Debug> Debug for Api<H, S, R>

Formats the value using the given formatter. Read more

impl<H, S, CR: RngCore + CryptoRng> Ed25519Ops for Api<H, S, RandomBytes<CR>>

Generate a signing key pair for use with the Ed25519Signing trait using the random number generator used to back the RandomBytes struct.

impl<R: RandomBytesGen, H: Sha256Hashing, S: Ed25519Signing> KeyGenOps for Api<H, S, R>

Compute a PublicKey given a PrivateKey

Generate a random private key. Read more

Generate a public/private keypair. Read more

Generate a transform key which is used to delegate to the to_public_key from the from_private_key. Read more

impl<R: RandomBytesGen, H: Sha256Hashing, S: Ed25519Signing> CryptoOps for Api<H, S, R>

Using the random_bytes, generate a random element of G_T, which is one of the rth roots of unity in FP12.

Convert our plaintext into a DecryptedSymmetricKey by hashing it.

Encrypt the plaintext to the to_public_key. Read more

Decrypt the value using private_key. Read more

Transform the value encrypted_value using the transform_key. The returned value can be decrypted by the private key associated to the to_public_key in the transform_key. Read more

Auto Trait Implementations

impl<H, S, R> Send for Api<H, S, R> where
    H: Send,
    R: Send,
    S: Send

impl<H, S, R> Sync for Api<H, S, R> where
    H: Sync,
    R: Sync,
    S: Sync