projects
/
avr-crypto-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae1ab23
)
[keccak-asm] applying quick-fix
author
bg
<daniel.otte@rub.de>
Mon, 14 Jan 2013 00:34:06 +0000
(
01:34
+0100)
committer
bg
<daniel.otte@rub.de>
Mon, 14 Jan 2013 00:34:06 +0000
(
01:34
+0100)
keccak/keccak-asm.S
patch
|
blob
|
history
keccak/keccak.c
patch
|
blob
|
history
diff --git
a/keccak/keccak-asm.S
b/keccak/keccak-asm.S
index db8548cb4f44383a9caced05b95c32198d43860f..f82063b077e1cb54c904d43201bb646671822f24 100644
(file)
--- a/
keccak/keccak-asm.S
+++ b/
keccak/keccak-asm.S
@@
-842,14
+842,14
@@
keccak_lastBlock:
movw r24, ctx_l
movw r22, r4
rcall keccak_nextBlock
-
sub
r4, pbs
-
sb
c r5, __zero_reg__
+
add
r4, pbs
+
ad
c r5, __zero_reg__
sub length_b_l, pr_l
- sbc length_b_
l
, pr_h
+ sbc length_b_
h
, pr_h
rjmp 10b
20:
- movw XL, r4
movw ZL, ctx_l
+ movw XL, r4
movw r22, length_b_l
lsr r23
ror r22
@@
-867,12
+867,12
@@
keccak_lastBlock:
dec r23
brne 10b
20:
+ ldi r25, 1
mov r18, length_b_l
andi r18, 7
- mov r19, r18
- ldi r25, 1
breq 30f
/* we have trailing bits */
+ mov r19, r18
ld r24, X+
subi r18, 8
neg r18
diff --git
a/keccak/keccak.c
b/keccak/keccak.c
index 506c77c2b6da5dd377de432e5f1a3412f554881e..501ca77ba5ae3374e375ff527d77c0357667f95e 100644
(file)
--- a/
keccak/keccak.c
+++ b/
keccak/keccak.c
@@
-195,7
+195,7
@@
void keccak_lastBlock(keccak_ctx_t* ctx, const void* block, uint16_t length_b){
}else{
t = 0x01;
}
- ctx->a[length_B] ^= t
+ ctx->a[length_B] ^= t
;
if(length_b == ctx->r - 1){
keccak_f1600(ctx->a);
}