X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=present%2Fpresent_common.c;h=2e8150c6b732040c0994a51e4e680f6baee45500;hp=198c67b3d25cb38239d7be1cbed592309714cb2e;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hpb=7715ef86b09869014eb5afd319e4acc2ce157b00 diff --git a/present/present_common.c b/present/present_common.c index 198c67b..2e8150c 100644 --- a/present/present_common.c +++ b/present/present_common.c @@ -1,7 +1,7 @@ /* present_common.c */ /* This file is part of the AVR-Crypto-Lib. - Copyright (C) 2008 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 @@ -20,7 +20,7 @@ * present_common.c * a implementation of the PRESENT block-cipher * author: Daniel Otte - * email: daniel.otte@rub.de + * email: bg@nerilex.org * license: GPLv3 * * */ @@ -50,7 +50,7 @@ uint8_t present_sbox_inv(uint8_t b){ return (pgm_read_byte(&sb[b >> 4]) << 4) | pgm_read_byte(&sb[b & 0xf]); } -void present_p(uint8_t* o, uint8_t* i){ +void present_p(uint8_t *o, uint8_t *i){ uint8_t m,n=0,idx=0; for(m=0; m<64; ++m){ o[idx] <<= 1; @@ -67,7 +67,7 @@ void present_p(uint8_t* o, uint8_t* i){ } -void present_generic_enc(void* buffer, uint8_t* ctx, uint8_t ksize_B, +void present_generic_enc(void *buffer, uint8_t *ctx, uint8_t ksize_B, void(*update)(uint8_t*, uint8_t)){ uint8_t i,j,tmp[8], k[ksize_B]; memcpy(k, ctx, ksize_B); @@ -83,7 +83,7 @@ void present_generic_enc(void* buffer, uint8_t* ctx, uint8_t ksize_B, } } -void present_generic_dec(void* buffer, uint8_t* ctx, uint8_t ksize_B, +void present_generic_dec(void *buffer, uint8_t *ctx, uint8_t ksize_B, void(*update)(uint8_t*, uint8_t)){ uint8_t j,tmp[8], k[ksize_B]; uint8_t i;