X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=keccak%2Fkeccak-asm.S;h=60a78ae232b8358fa37da25db194bbc9e44b2c41;hb=d9352fc79fbdee0cf3288809b104ea196ea85693;hp=a827ea6e292671ebfa58e020c285a3151036fba1;hpb=690a1cfe4c9b27d2b6c4b217022ddc6d20445c5e;p=avr-crypto-lib.git diff --git a/keccak/keccak-asm.S b/keccak/keccak-asm.S index a827ea6..60a78ae 100644 --- a/keccak/keccak-asm.S +++ b/keccak/keccak-asm.S @@ -1,7 +1,7 @@ /* keccac-asm.S */ /* This file is part of the AVR-Crypto-Lib. - Copyright (C) 2012 Daniel Otte (daniel.otte@rub.de) + Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ */ /** * \file keccak-asm.S - * \email daniel.otte@rub.de + * \email bg@nerilex.org * \author Daniel Otte * \date 2012-12-16 * \license GPLv3 or later @@ -34,8 +34,8 @@ /* typedef struct{ uint64_t a[5][5]; - uint16_t r, c; - uint8_t d, bs; + uint16_t r; + uint8_t bs; } keccak_ctx_t; */ .struct 0 @@ -440,8 +440,8 @@ keccak_f1600: -- or -- - const uint8_t* rot_code = (const uint8_t*)keccak_rotate_codes; - const uint8_t* idx_idx = (const uint8_t*)rho_pi_idx_table; + const uint8_t *rot_code = (const uint8_t*)keccak_rotate_codes; + const uint8_t *idx_idx = (const uint8_t*)rho_pi_idx_table; uint64_t *a_tmp = (uint64_t*)a; for(i = 0; i < 25; ++i){ *((uint64_t*)(((uint8_t*)b) + pgm_read_byte(idx_idx++))) = @@ -657,7 +657,7 @@ keccak256_ctx2hash: .endfunc /* -void keccak_ctx2hash(void* dest, uint16_t length_b, keccak_ctx_t* ctx){ +void keccak_ctx2hash(void *dest, uint16_t length_b, keccak_ctx_t *ctx){ while(length_b>=ctx->r){ memcpy(dest, ctx->a, ctx->bs); dest = (uint8_t*)dest + ctx->bs; @@ -758,7 +758,7 @@ keccak256_init: ldi r25, hi8(1088) .endfunc /* -void keccak_init(uint16_t r, keccak_ctx_t* ctx){ +void keccak_init(uint16_t r, keccak_ctx_t *ctx){ memset(ctx->a, 0x00, 5 * 5 * 8); ctx->r = r; ctx->bs = (uint8_t)(r / 8); @@ -787,7 +787,7 @@ keccak_init_1: .endfunc /* -void keccak_lastBlock(keccak_ctx_t* ctx, const void* block, uint16_t length_b){ +void keccak_lastBlock(keccak_ctx_t *ctx, const void *block, uint16_t length_b){ uint8_t length_B; uint8_t t; while(length_b >= ctx->r){