Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Wim Lewis
nettle
Commits
5a66bb56
Commit
5a66bb56
authored
Jan 16, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make poly1305 code use struct aes128_ctx.
parent
2667d597
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
ChangeLog
ChangeLog
+9
-0
poly1305-aes.c
poly1305-aes.c
+2
-2
poly1305-aes.h
poly1305-aes.h
+1
-1
poly1305.h
poly1305.h
+2
-2
No files found.
ChangeLog
View file @
5a66bb56
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
...
...
poly1305-aes.c
View file @
5a66bb56
...
...
@@ -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
,
aes
128
_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
,
aes
128
_encrypt
,
length
,
digest
);
}
poly1305-aes.h
View file @
5a66bb56
...
...
@@ -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
aes
128
_ctx
);
/* The _set_key function initialize the nonce to zero. */
void
...
...
poly1305.h
View file @
5a66bb56
/* 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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment