Skip to content

Commit

Permalink
eax: use 4-byte nonce instead of block size
Browse files Browse the repository at this point in the history
This is a hack until RustCrypto#239 is fixed.
  • Loading branch information
lopsided98 committed Apr 16, 2021
1 parent 1e121c8 commit af2d1cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eax/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub use cipher;

use cipher::{
block::{Block, BlockCipher, Key, NewBlockCipher},
consts::{U0, U16},
consts::{U0, U4, U16},
generic_array::{functional::FunctionalSequence, ArrayLength, GenericArray},
stream::{FromBlockCipher, SyncStreamCipher},
};
Expand Down Expand Up @@ -137,7 +137,7 @@ where
Cipher: BlockCipher<BlockSize = U16> + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
{
type NonceSize = Cipher::BlockSize;
type NonceSize = U4;
type TagSize = <Cmac<Cipher> as Mac>::OutputSize;
type CiphertextOverhead = U0;

Expand Down

0 comments on commit af2d1cf

Please sign in to comment.