Skip to content

Commit

Permalink
Add asymetry
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Kaitchuck <Tom.Kaitchuck@gmail.com>
  • Loading branch information
tkaitchuck committed Oct 21, 2023
1 parent 082d440 commit 474c6ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/aes_hash.rs
Expand Up @@ -164,11 +164,11 @@ impl Hasher for AHasher {
let tail = data.read_last_u128x4();
let mut current: [u128; 4] = [self.key; 4];
current[0] = aesenc(current[0], tail[0]);
current[1] = aesenc(current[1], tail[1]);
current[1] = aesdec(current[1], tail[1]);
current[2] = aesenc(current[2], tail[2]);
current[3] = aesenc(current[3], tail[3]);
current[3] = aesdec(current[3], tail[3]);
let mut sum: [u128; 2] = [self.key, self.key];
sum[0] = shuffle_and_add(sum[0], tail[0]);
sum[0] = add_by_64s(sum[0].convert(), tail[0].convert()).convert();
sum[1] = shuffle_and_add(sum[1], tail[1]);
sum[0] = shuffle_and_add(sum[0], tail[2]);
sum[1] = shuffle_and_add(sum[1], tail[3]);
Expand Down

0 comments on commit 474c6ee

Please sign in to comment.