Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitry Baryshkov
nettle
Commits
d0c86a10
Commit
d0c86a10
authored
Jan 25, 2014
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Delete length argument from GCM_SET_KEY.
parent
b85125a8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+6
-0
6 additions, 0 deletions
ChangeLog
gcm-aes.c
+3
-1
3 additions, 1 deletion
gcm-aes.c
gcm.h
+2
-2
2 additions, 2 deletions
gcm.h
with
11 additions
and
3 deletions
ChangeLog
+
6
−
0
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>
2014-01-23 Niels Möller <nisse@lysator.liu.se>
* testsuite/gcm-test.c (test_main): Use the correct
* testsuite/gcm-test.c (test_main): Use the correct
...
...
This diff is collapsed.
Click to expand it.
gcm-aes.c
+
3
−
1
View file @
d0c86a10
...
@@ -32,7 +32,9 @@
...
@@ -32,7 +32,9 @@
void
void
gcm_aes_set_key
(
struct
gcm_aes_ctx
*
ctx
,
size_t
length
,
const
uint8_t
*
key
)
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
void
...
...
This diff is collapsed.
Click to expand it.
gcm.h
+
2
−
2
View file @
d0c86a10
...
@@ -115,9 +115,9 @@ gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key,
...
@@ -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; }
{ type cipher; struct gcm_key key; struct gcm_ctx gcm; }
/* NOTE: Avoid using NULL, as we don't include anything defining it. */
/* 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 { \
do { \
(set_key)(&(ctx)->cipher, (
length), (data
)); \
(set_key)(&(ctx)->cipher, (
key
));
\
if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \
if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \
gcm_set_key(&(ctx)->key, &(ctx)->cipher, \
gcm_set_key(&(ctx)->key, &(ctx)->cipher, \
(nettle_crypt_func *) (encrypt)); \
(nettle_crypt_func *) (encrypt)); \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment