Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wim Lewis
nettle
Commits
55909a41
Commit
55909a41
authored
Feb 09, 2011
by
Niels Möller
Browse files
(time_gmac): Use gcm_aes interface.
Rev: nettle/examples/nettle-benchmark.c:1.17
parent
31acdada
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/nettle-benchmark.c
View file @
55909a41
...
...
@@ -349,17 +349,15 @@ time_gmac(void)
{
static
uint8_t
data
[
BENCH_BLOCK
];
struct
bench_hash_info
info
;
struct
gcm_ctx
gcm
;
struct
aes_ctx
aes
;
struct
gcm_aes_ctx
ctx
;
uint8_t
key
[
16
];
uint8_t
iv
[
GCM_IV_SIZE
];
aes_set_encrypt_key
(
&
aes
,
sizeof
(
key
),
key
);
gcm_set_key
(
&
gcm
,
&
aes
,
(
nettle_crypt_func
*
)
aes_encrypt
);
gcm_set_iv
(
&
gcm
,
sizeof
(
iv
),
iv
);
gcm_aes_set_key
(
&
ctx
,
sizeof
(
key
),
key
);
gcm_aes_set_iv
(
&
ctx
,
sizeof
(
iv
),
iv
);
info
.
ctx
=
&
gcm
;
info
.
update
=
(
nettle_hash_update_func
*
)
gcm_auth
;
info
.
ctx
=
&
ctx
;
info
.
update
=
(
nettle_hash_update_func
*
)
gcm_
aes_
auth
;
info
.
data
=
data
;
display
(
"gmac"
,
"auth"
,
GCM_BLOCK_SIZE
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment