]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - present/present80.c
fixing E-Mail-Address & Copyright
[avr-crypto-lib.git] / present / present80.c
index 2a5589b32a18cb2a03c7e46078dbaa33d9bd732f..236fc6be47f9962bbbf0886ca139b91f1475f48d 100644 (file)
@@ -1,7 +1,7 @@
 /* present80.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 @@
  * present80.c
  * a implementation of the PRESENT block-cipher
  * author: Daniel Otte
- * email:  daniel.otte@rub.de
+ * email:  bg@nerilex.org
  * license: GPLv3
  * 
  * */
@@ -33,7 +33,7 @@
 #include "present80.h"
 
 static
-void key_update(uint8_tbuffer, uint8_t round){
+void key_update(uint8_t *buffer, uint8_t round){
        uint8_t j;
        union __attribute__((packed)){
                uint8_t   v8[2];
@@ -63,7 +63,7 @@ void key_update(uint8_t* buffer, uint8_t round){
 }
 
 static
-void key_update_inv(uint8_tbuffer, uint8_t round){
+void key_update_inv(uint8_t *buffer, uint8_t round){
        uint8_t j;
        union __attribute__((packed)){
                uint8_t   v8[2];
@@ -92,7 +92,7 @@ void key_update_inv(uint8_t* buffer, uint8_t round){
        }while(j--);
 }
 
-void present80_init(const uint8_t* key, uint8_t keysize_b, present80_ctx_t* ctx){
+void present80_init(const uint8_t *key, uint8_t keysize_b, present80_ctx_t *ctx){
        uint8_t i;
        memcpy(ctx->fwd_key, key, 10);
        memcpy(ctx->rev_key, key, 10);
@@ -101,16 +101,16 @@ void present80_init(const uint8_t* key, uint8_t keysize_b, present80_ctx_t* ctx)
        }
 }
 
-void present80_enc(void* buffer, present80_ctx_t* ctx){
+void present80_enc(void *buffer, present80_ctx_t *ctx){
        present_generic_enc(buffer, (uint8_t*)ctx, 10, key_update);
 }
 
-void present80_dec(void* buffer, present80_ctx_t* ctx){
+void present80_dec(void *buffer, present80_ctx_t *ctx){
        present_generic_dec(buffer, (uint8_t*)ctx, 10, key_update_inv);
 }
 
 /*
-void present80_enc(void* buffer, present80_ctx_t* ctx){
+void present80_enc(void *buffer, present80_ctx_t *ctx){
        uint8_t i,j,tmp[8], k[10];
        memcpy(k, ctx->fwd_key, 10);
        memxor(buffer, k, 8);
@@ -125,7 +125,7 @@ void present80_enc(void* buffer, present80_ctx_t* ctx){
        }
 }
 
-void present80_dec(void* buffer, present80_ctx_t* ctx){
+void present80_dec(void *buffer, present80_ctx_t *ctx){
        uint8_t j,tmp[8], k[10];
        uint8_t i;
        memcpy(k, ctx->rev_key, 10);