Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmid7k committed Aug 16, 2022
1 parent fa807e4 commit bb6a364
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion sundae/benches/sundae_enc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Through
use criterion_cycles_per_byte::CyclesPerByte;
use rand::rngs::OsRng;
use rand::RngCore;
use sundae::{aead::{Aead, KeyInit}, AeadInPlace, SundaeAes};
use sundae::{
aead::{Aead, KeyInit},
AeadInPlace, SundaeAes,
};

pub const KB: usize = 1024;

Expand Down
8 changes: 4 additions & 4 deletions sundae/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
//! SUNDAE made it to round 2 of the [NIST lightweight cryptography competition][3] as part of SUNDAE-GIFT.
//!
//! ## Security notes
//!
//! SUNDAE guarantees creation of unique ciphertext for every unique pair of plaintext + associated data,
//!
//! SUNDAE guarantees creation of unique ciphertext for every unique pair of plaintext + associated data,
//! if only one of them is different the output will be different, making the NONCE unnecessary in situations where
//! this can be guaranteed. This is why SUNDAE is a good choice for encryption on devices that lack proper randomness sources for generating NONCEs, or have limited secure storage.
//! this can be guaranteed. This is why SUNDAE is a good choice for encryption on devices that lack proper randomness sources for generating NONCEs, or have limited secure storage.
//! However, in situations in which the same plaintext + associated data pair is encrypted regularly, or it can not be
//! guaranteed that at least one part is distinct each time, it is advisable to use SUNDAE with a NONCE.
//!
Expand Down Expand Up @@ -405,7 +405,7 @@ where
*v = _mm_xor_si128(_mm_shuffle_epi8(block, mul2), _mm_shuffle_epi8(block, xor2));
*v = self.bc_encrypt(*v);
_mm_storeu_si128(tag.as_ptr() as *mut __m128i, *v);
}
}

tag
}
Expand Down

0 comments on commit bb6a364

Please sign in to comment.