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: Sha256Hashing, S, CR: RngCore + CryptoRng> SchnorrOps for Api<H, S, RandomBytes<CR>>

Create a signature for the message using priv_key. - priv_key - The private key which is used to generate the signature. - pub_key the public key which will be used to validate the signature. - message the message to sign. Read more

Verify that the message was signed by the matching private key to pub_key. Note that if pub_key was augmented the private key used in the augmentation should be passed in as augmenting_priv_key. - pub_key - The pub_key that was used in the signing process. - augmenting_priv_key - If the pub_key was augmented, pass the private key that was used to augment. None if no augmentation was done. - message - Message that was signed. - signature - The signature that was generated from schnorr_sign. 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