From: bg Date: Sun, 20 Jan 2013 21:57:05 +0000 (+0100) Subject: [sha1-asm] fixing bug when *_lastBlock is used to hash multiple blocks, thanks to... X-Git-Url: https://git.cryptolib.org/?a=commitdiff_plain;h=5a83cf2b010b74721dec56d940dcf457fae24205;p=avr-crypto-lib.git [sha1-asm] fixing bug when *_lastBlock is used to hash multiple blocks, thanks to Alex --- diff --git a/sha1/sha1-asm.S b/sha1/sha1-asm.S index 4d185f9..f479fcc 100644 --- a/sha1/sha1-asm.S +++ b/sha1/sha1-asm.S @@ -284,8 +284,8 @@ sha1_lastBlock: pop r25 subi r21, 2 ldi r19, 64 - sub r22, r19 - sbc r23, r1 + add r22, r19 + adc r23, r1 rjmp sha1_lastBlock sha1_lastBlock_prolog: /* allocate space on stack */