X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=serpent%2Fserpent.c;h=894f526f49ef6f7dd0e95831f8c2df5fedbd39de;hp=41dca4bcbd4c5f9effe747d433226ef93b2ba831;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hpb=7b5401ab9ce23a5da1de8b6c7de3a1aa20ac4cf8 diff --git a/serpent/serpent.c b/serpent/serpent.c index 41dca4b..894f526 100644 --- a/serpent/serpent.c +++ b/serpent/serpent.c @@ -1,7 +1,7 @@ /* serpent.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 @@ -19,14 +19,14 @@ /* serpent.c * a bitsliced implementation of the serpent cipher for avr microcontrollers * author: Daniel Otte - * email: daniel.otte@rub.de + * email: bg@nerilex.org * license: GPLv3 */ #include #include /* memset() */ #include -#include "memxor/memxor.h" +#include "memxor.h" #include "serpent.h" #include "serpent-sboxes.h" @@ -82,7 +82,7 @@ static uint32_t serpent_gen_w(uint32_t * b, uint8_t i){ return ret; } -void serpent_init(const void* key, uint16_t keysize_b, serpent_ctx_t* ctx){ +void serpent_init(const void *key, uint16_t keysize_b, serpent_ctx_t *ctx){ uint32_t buffer[8]; uint8_t i,j; if(keysize_b<256){ @@ -106,7 +106,7 @@ void serpent_init(const void* key, uint16_t keysize_b, serpent_ctx_t* ctx){ } } -void serpent_enc(void* buffer, const serpent_ctx_t* ctx){ +void serpent_enc(void *buffer, const serpent_ctx_t *ctx){ uint8_t i; for(i=0; i<31; ++i){ memxor(buffer, ctx->k[i], 16); @@ -119,7 +119,7 @@ void serpent_enc(void* buffer, const serpent_ctx_t* ctx){ memxor(buffer, ctx->k[i], 16); } -void serpent_dec(void* buffer, const serpent_ctx_t* ctx){ +void serpent_dec(void *buffer, const serpent_ctx_t *ctx){ int8_t i=32; memxor(buffer, ctx->k[i], 16);