This commit is contained in:
Adam Ierymenko 2022-12-16 15:36:40 -05:00
parent 51faf9b2da
commit 9afcc5dda3
2 changed files with 1 additions and 2 deletions

View file

@ -49,6 +49,7 @@ impl<const ROUNDS: usize> Salsa<ROUNDS> {
}
}
#[inline]
pub fn crypt(&mut self, mut plaintext: &[u8], mut ciphertext: &mut [u8]) {
let (j0, j1, j2, j3, j4, j5, j6, j7, mut j8, mut j9, j10, j11, j12, j13, j14, j15) = (
self.state[0],

View file

@ -19,7 +19,6 @@ pub const ED25519_SIGNATURE_SIZE: usize = 64;
pub struct X25519KeyPair(x25519_dalek::StaticSecret, Secret<32>, x25519_dalek::PublicKey);
impl X25519KeyPair {
#[inline(always)]
pub fn generate() -> X25519KeyPair {
let sk = x25519_dalek::StaticSecret::new(SecureRandom::get());
let sk2 = Secret(sk.to_bytes());
@ -96,7 +95,6 @@ impl Clone for X25519KeyPair {
pub struct Ed25519KeyPair(ed25519_dalek::Keypair, Secret<32>);
impl Ed25519KeyPair {
#[inline(always)]
pub fn generate() -> Ed25519KeyPair {
let mut rng = SecureRandom::get();
let kp = ed25519_dalek::Keypair::generate(&mut rng);