forked from KolibriOS/kolibrios
Poly1305: Fix forgotten variable init
git-svn-id: svn://kolibrios.org@9986 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
199ad2d9a4
commit
f147ff4286
@ -42,6 +42,7 @@ assert sizeof.ctx_poly1305 <= LIBCRASH_CTX_LEN
|
|||||||
|
|
||||||
proc poly1305.init uses ebx, _ctx, _key, _key_len
|
proc poly1305.init uses ebx, _ctx, _key, _key_len
|
||||||
mov ebx, [_ctx]
|
mov ebx, [_ctx]
|
||||||
|
mov [ebx+ctx_poly1305.index], 0
|
||||||
mov [ebx+ctx_poly1305.block_size], POLY1305_BLOCK_SIZE
|
mov [ebx+ctx_poly1305.block_size], POLY1305_BLOCK_SIZE
|
||||||
mov [ebx+ctx_poly1305.hibit], 1 SHL 24
|
mov [ebx+ctx_poly1305.hibit], 1 SHL 24
|
||||||
; accumulator
|
; accumulator
|
||||||
@ -385,8 +386,10 @@ proc poly1305.finish uses ebx esi edi, _ctx
|
|||||||
mov byte[edi], 0x01
|
mov byte[edi], 0x01
|
||||||
inc edi
|
inc edi
|
||||||
dec ecx
|
dec ecx
|
||||||
|
jz @f
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
rep stosb
|
rep stosb
|
||||||
|
@@:
|
||||||
|
|
||||||
mov ebx, [_ctx]
|
mov ebx, [_ctx]
|
||||||
mov [ebx+ctx_poly1305.hibit], 0
|
mov [ebx+ctx_poly1305.hibit], 0
|
||||||
|
Loading…
Reference in New Issue
Block a user