]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - rc5.h
+RC5 +size-statistics tool +small modification to nessie_bc_test (optional free(...
[avr-crypto-lib.git] / rc5.h
diff --git a/rc5.h b/rc5.h
new file mode 100644 (file)
index 0000000..3ff2ed6
--- /dev/null
+++ b/rc5.h
@@ -0,0 +1,28 @@
+/* rc5.h a C implementation of RC5 for AVR microcontrollers
+ * 
+ * author: Daniel Otte 
+ * email:  daniel.otte@rub.de
+ * license: GPLv3
+ * 
+ * this implementation is limited to 64bit blocks and a maximum of 255 rounds
+ * 
+ */
+#ifndef RC5_H_
+#define RC5_H_
+
+
+#include <stdint.h>
+#include <stdlib.h> /* malloc() & free() */
+#include <string.h> /* memset() & memcpy() */
+typedef struct rc5_ctx_st {
+       uint8_t rounds;
+       uint32_t *s;
+}rc5_ctx_t; 
+
+void rc5_enc(void* buffer, const rc5_ctx_t* ctx);
+void rc5_dec(void* buffer, const rc5_ctx_t* ctx);
+void rc5_init(void* key, uint16_t keysize_b, uint8_t rounds, rc5_ctx_t* ctx);
+void rc5_free(rc5_ctx_t* ctx);
+
+#endif /*RC5_H_*/