summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--poly1305-aes.c4
-rw-r--r--poly1305-aes.h2
-rw-r--r--poly1305.h4
4 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e1e4b018..34f36305 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-01-16 Niels Möller <nisse@lysator.liu.se>
+
+ * poly1305-aes.h (struct poly1305_aes_ctx): Replace struct aes_ctx
+ by struct aes128_ctx.
+ * poly1305-aes.c (poly1305_aes_set_key, poly1305_aes_digest):
+ Update to use aes128_* functions.
+ * poly1305.h (POLY1305_SET_KEY): Drop key size argument when
+ calling set_key.
+
2013-12-19 Niels Möller <nisse@lysator.liu.se>
* poly1305-aes.h (poly1305_aes_update): Define as an alias for
diff --git a/poly1305-aes.c b/poly1305-aes.c
index 26c26859..ba0dd0dd 100644
--- a/poly1305-aes.c
+++ b/poly1305-aes.c
@@ -30,7 +30,7 @@
void
poly1305_aes_set_key (struct poly1305_aes_ctx *ctx, const uint8_t * key)
{
- POLY1305_SET_KEY(ctx, aes_set_encrypt_key, key);
+ POLY1305_SET_KEY(ctx, aes128_set_encrypt_key, key);
}
void
@@ -44,5 +44,5 @@ void
poly1305_aes_digest (struct poly1305_aes_ctx *ctx,
size_t length, uint8_t * digest)
{
- POLY1305_DIGEST(ctx, aes_encrypt, length, digest);
+ POLY1305_DIGEST(ctx, aes128_encrypt, length, digest);
}
diff --git a/poly1305-aes.h b/poly1305-aes.h
index f2d28fbc..ae22d39c 100644
--- a/poly1305-aes.h
+++ b/poly1305-aes.h
@@ -41,7 +41,7 @@ extern "C" {
#define poly1305_aes_set_nonce nettle_poly1305_aes_set_nonce
#define poly1305_aes_digest nettle_poly1305_aes_digest
-struct poly1305_aes_ctx POLY1305_CTX(struct aes_ctx);
+struct poly1305_aes_ctx POLY1305_CTX(struct aes128_ctx);
/* The _set_key function initialize the nonce to zero. */
void
diff --git a/poly1305.h b/poly1305.h
index 13b2d6c8..7afa387e 100644
--- a/poly1305.h
+++ b/poly1305.h
@@ -1,4 +1,4 @@
-/* poly1305-aes.h
+/* poly1305.h
*
* Poly1305 message authentication code.
*/
@@ -77,7 +77,7 @@ void poly1305_digest (struct poly1305_ctx *ctx,
#define POLY1305_SET_KEY(ctx, set_key, key) \
do { \
poly1305_set_key(&(ctx)->pctx, (key+16)); \
- (set_key)(&(ctx)->cipher, 16, (key)); \
+ (set_key)(&(ctx)->cipher, (key)); \
(ctx)->pctx.index = 0; \
} while (0)