Skip to content

Commit

Permalink
fix tea_ecb_encrypt()
Browse files Browse the repository at this point in the history
This fixes #553
  • Loading branch information
sjaeckel committed Dec 21, 2020
1 parent 77a932c commit 3ec7f71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ciphers/tea.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int tea_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const symmetric_

LOAD32H(y, &pt[0]);
LOAD32H(z, &pt[4]);
for (r = 0; r < 32; r += 4) {
for (r = 0; r < 32; r++) {
sum += delta;
y += ((z<<4) + skey->tea.k[0]) ^ (z + sum) ^ ((z>>5) + skey->tea.k[1]);
z += ((y<<4) + skey->tea.k[2]) ^ (y + sum) ^ ((y>>5) + skey->tea.k[3]);
Expand Down

0 comments on commit 3ec7f71

Please sign in to comment.