]> git.cryptolib.org Git - avr-crypto-lib.git/commitdiff
[sha1-asm] fixing bug when *_lastBlock is used to hash multiple blocks, thanks to...
authorbg <daniel.otte@rub.de>
Sun, 20 Jan 2013 21:57:05 +0000 (22:57 +0100)
committerbg <daniel.otte@rub.de>
Sun, 20 Jan 2013 21:57:05 +0000 (22:57 +0100)
sha1/sha1-asm.S

index 4d185f928fc5a488e96ee66919ff36bffe21acdc..f479fcc27ca42db3a1e611dd830624ebf7d73f81 100644 (file)
@@ -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 */