Subversion Repositories Kolibri OS

Rev

Rev 9216 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9216 Rev 9986
Line 40... Line 40...
40
 
40
 
Line 41... Line 41...
41
assert sizeof.ctx_poly1305 <= LIBCRASH_CTX_LEN
41
assert sizeof.ctx_poly1305 <= LIBCRASH_CTX_LEN
42
 
42
 
-
 
43
proc poly1305.init uses ebx, _ctx, _key, _key_len
43
proc poly1305.init uses ebx, _ctx, _key, _key_len
44
        mov     ebx, [_ctx]
44
        mov     ebx, [_ctx]
45
        mov     [ebx+ctx_poly1305.index], 0
45
        mov     [ebx+ctx_poly1305.block_size], POLY1305_BLOCK_SIZE
46
        mov     [ebx+ctx_poly1305.block_size], POLY1305_BLOCK_SIZE
46
        mov     [ebx+ctx_poly1305.hibit], 1 SHL 24
47
        mov     [ebx+ctx_poly1305.hibit], 1 SHL 24
47
        ; accumulator
48
        ; accumulator
Line 383... Line 384...
383
        lea     edi, [ebx+ctx_poly1305.block]
384
        lea     edi, [ebx+ctx_poly1305.block]
384
        add     edi, eax
385
        add     edi, eax
385
        mov     byte[edi], 0x01
386
        mov     byte[edi], 0x01
386
        inc     edi
387
        inc     edi
387
        dec     ecx
388
        dec     ecx
-
 
389
        jz      @f
388
        xor     eax, eax
390
        xor     eax, eax
389
        rep stosb
391
        rep stosb
-
 
392
@@:
Line 390... Line 393...
390
 
393
 
391
        mov     ebx, [_ctx]
394
        mov     ebx, [_ctx]
392
        mov     [ebx+ctx_poly1305.hibit], 0
395
        mov     [ebx+ctx_poly1305.hibit], 0
393
        lea     esi, [ebx+ctx_poly1305.block]
396
        lea     esi, [ebx+ctx_poly1305.block]