Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
d0c86a10
Commit
d0c86a10
authored
Jan 25, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete length argument from GCM_SET_KEY.
parent
b85125a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
ChangeLog
ChangeLog
+6
-0
gcm-aes.c
gcm-aes.c
+3
-1
gcm.h
gcm.h
+2
-2
No files found.
ChangeLog
View file @
d0c86a10
2014-01-25 Niels Möller <nisse@lysator.liu.se>
* gcm.h (GCM_SET_KEY): Deleted length argument.
* gcm-aes.c (gcm_aes_set_key): Use aes_set_encrypt_key and
gcm_set_key, can no longer use GCM_SET_KEY macro.
2014-01-23 Niels Möller <nisse@lysator.liu.se>
* testsuite/gcm-test.c (test_main): Use the correct
...
...
gcm-aes.c
View file @
d0c86a10
...
...
@@ -32,7 +32,9 @@
void
gcm_aes_set_key
(
struct
gcm_aes_ctx
*
ctx
,
size_t
length
,
const
uint8_t
*
key
)
{
GCM_SET_KEY
(
ctx
,
aes_set_encrypt_key
,
aes_encrypt
,
length
,
key
);
aes_set_encrypt_key
(
&
ctx
->
cipher
,
length
,
key
);
gcm_set_key
(
&
ctx
->
key
,
&
ctx
->
cipher
,
(
nettle_crypt_func
*
)
aes_encrypt
);
}
void
...
...
gcm.h
View file @
d0c86a10
...
...
@@ -115,9 +115,9 @@ gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key,
{ type cipher; struct gcm_key key; struct gcm_ctx gcm; }
/* NOTE: Avoid using NULL, as we don't include anything defining it. */
#define GCM_SET_KEY(ctx, set_key, encrypt,
length, data)
\
#define GCM_SET_KEY(ctx, set_key, encrypt,
key)
\
do { \
(set_key)(&(ctx)->cipher, (
length), (data));
\
(set_key)(&(ctx)->cipher, (
key));
\
if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \
gcm_set_key(&(ctx)->key, &(ctx)->cipher, \
(nettle_crypt_func *) (encrypt)); \
...
...
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