/* 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
* present_common.c
* a implementation of the PRESENT block-cipher
* author: Daniel Otte
- * email: daniel.otte@rub.de
+ * email: bg@nerilex.org
* license: GPLv3
*
* */
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;
}
-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);
}
}
-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;