X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=norx%2Fnorx32.h;fp=norx%2Fnorx32.h;h=288435eda48ec72109b858b272b87f9f76260176;hp=0000000000000000000000000000000000000000;hb=f63427e84c047aafe16f6ab3b5452d4d2993241d;hpb=8d9f80e5ae0d940107681aff616f4466be68c77f
diff --git a/norx/norx32.h b/norx/norx32.h
new file mode 100644
index 0000000..288435e
--- /dev/null
+++ b/norx/norx32.h
@@ -0,0 +1,78 @@
+/* norx32.h */
+/*
+ This file is part of the AVR-Crypto-Lib.
+ Copyright (C) 2014 Daniel Otte (daniel.otte@rub.de)
+
+ 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
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifndef NORX_NORX32_H_
+#define NORX_NORX32_H_
+
+#include
+
+typedef struct {
+ uint8_t d;
+ uint8_t r;
+ uint16_t a;
+ uint32_t s[16];
+} norx32_ctx_t;
+
+
+
+/******************************************************************************/
+
+int8_t norx32_init (
+ norx32_ctx_t *ctx,
+ const void* nonce,
+ const void* key,
+ uint16_t tag_size_b,
+ uint8_t rounds,
+ uint8_t parallel );
+void norx32_finalize(norx32_ctx_t *ctx, void *tag);
+void norx32_add_header_block(norx32_ctx_t *ctx, const void *block);
+void norx32_add_header_last_block(
+ norx32_ctx_t *ctx,
+ const void *block,
+ uint16_t length_b );
+
+void norx32_encrypt_block(norx32_ctx_t *ctx, void *dest, const void *src);
+
+void norx32_encrypt_last_block(
+ norx32_ctx_t *ctx,
+ void *dest,
+ const void *src,
+ uint16_t length_b );
+void norx32_add_trailer_block(norx32_ctx_t *ctx, const void *block);
+
+void norx32_add_trailer_last_block(
+ norx32_ctx_t *ctx,
+ const void *block,
+ uint16_t length_b );
+
+/******************************************************************************/
+
+void norx32_default_simple (
+ void *data_dest,
+ void *tag_dest,
+ const void *key,
+ const void *nonce,
+ const void *header,
+ size_t header_length_B,
+ const void *data_src,
+ size_t data_length_B,
+ const void *trailer,
+ size_t trailer_length_B );
+
+#endif /* NORX_NORX32_H_ */