[−]Struct recrypt::api::Recrypt
Recrypt public API - 256-bit
Methods
impl Recrypt<Sha256, Ed25519, RandomBytes<ThreadRng>>
impl<CR: CryptoRng + RngCore> Recrypt<Sha256, Ed25519, RandomBytes<CR>>
pub fn new_with_rand(r: CR) -> Recrypt<Sha256, Ed25519, RandomBytes<CR>>
Trait Implementations
impl<H: Sha256Hashing, S, CR: RngCore + CryptoRng> SchnorrOps for Recrypt<H, S, RandomBytes<CR>>
fn schnorr_sign<A: Hashable>(
&mut self,
priv_key: &PrivateKey,
pub_key: &PublicKey,
message: &A
) -> SchnorrSignature
&mut self,
priv_key: &PrivateKey,
pub_key: &PublicKey,
message: &A
) -> SchnorrSignature
fn schnorr_verify<A: Hashable>(
&self,
pub_key: &PublicKey,
augmenting_priv_key: Option<&PrivateKey>,
message: &A,
signature: SchnorrSignature
) -> bool
&self,
pub_key: &PublicKey,
augmenting_priv_key: Option<&PrivateKey>,
message: &A,
signature: SchnorrSignature
) -> bool
impl<H, S, CR: RngCore + CryptoRng> Ed25519Ops for Recrypt<H, S, RandomBytes<CR>>
fn generate_ed25519_key_pair(&mut self) -> SigningKeypair
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 Recrypt<H, S, R>
fn compute_public_key(
&self,
private_key: &PrivateKey
) -> Result<PublicKey, RecryptErr>
&self,
private_key: &PrivateKey
) -> Result<PublicKey, RecryptErr>
fn random_private_key(&mut self) -> PrivateKey
fn generate_key_pair(&mut self) -> Result<(PrivateKey, PublicKey), RecryptErr>
fn generate_transform_key(
&mut self,
from_private_key: &PrivateKey,
to_public_key: &PublicKey,
signing_keypair: &SigningKeypair
) -> Result<TransformKey, RecryptErr>
&mut self,
from_private_key: &PrivateKey,
to_public_key: &PublicKey,
signing_keypair: &SigningKeypair
) -> Result<TransformKey, RecryptErr>
impl<R: RandomBytesGen, H: Sha256Hashing, S: Ed25519Signing> CryptoOps for Recrypt<H, S, R>
fn gen_plaintext(&mut self) -> Plaintext
fn derive_symmetric_key(
&self,
decrypted_value: &Plaintext
) -> DerivedSymmetricKey
&self,
decrypted_value: &Plaintext
) -> DerivedSymmetricKey
fn derive_private_key(&self, plaintext: &Plaintext) -> PrivateKey
fn encrypt(
&mut self,
plaintext: &Plaintext,
to_public_key: &PublicKey,
signing_keypair: &SigningKeypair
) -> Result<EncryptedValue, RecryptErr>
&mut self,
plaintext: &Plaintext,
to_public_key: &PublicKey,
signing_keypair: &SigningKeypair
) -> Result<EncryptedValue, RecryptErr>
fn decrypt(
&self,
encrypted_value: EncryptedValue,
private_key: &PrivateKey
) -> Result<Plaintext, RecryptErr>
&self,
encrypted_value: EncryptedValue,
private_key: &PrivateKey
) -> Result<Plaintext, RecryptErr>
fn transform(
&mut self,
encrypted_value: EncryptedValue,
transform_key: TransformKey,
signing_keypair: &SigningKeypair
) -> Result<EncryptedValue, RecryptErr>
&mut self,
encrypted_value: EncryptedValue,
transform_key: TransformKey,
signing_keypair: &SigningKeypair
) -> Result<EncryptedValue, RecryptErr>
impl Default for Recrypt<Sha256, Ed25519, RandomBytes<ThreadRng>>
fn default() -> Self
impl<H: Debug, S: Debug, R: Debug> Debug for Recrypt<H, S, R>
Auto Trait Implementations
impl<H, S, R> Sync for Recrypt<H, S, R> where
H: Sync,
R: Sync,
S: Sync,
H: Sync,
R: Sync,
S: Sync,
impl<H, S, R> Unpin for Recrypt<H, S, R> where
H: Unpin,
R: Unpin,
S: Unpin,
H: Unpin,
R: Unpin,
S: Unpin,
impl<H, S, R> Send for Recrypt<H, S, R> where
H: Send,
R: Send,
S: Send,
H: Send,
R: Send,
S: Send,
impl<H, S, R> UnwindSafe for Recrypt<H, S, R> where
H: UnwindSafe,
R: UnwindSafe,
S: UnwindSafe,
H: UnwindSafe,
R: UnwindSafe,
S: UnwindSafe,
impl<H, S, R> RefUnwindSafe for Recrypt<H, S, R> where
H: RefUnwindSafe,
R: RefUnwindSafe,
S: RefUnwindSafe,
H: RefUnwindSafe,
R: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
[src]
T: InitializableFromZeroed + ?Sized,
impl<T> InitializableFromZeroed for T where
T: Default,
[src]
T: Default,
unsafe fn initialize(place: *mut T)
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self