-
Notifications
You must be signed in to change notification settings - Fork 134
Implement HMAC over SHA3 truncated variants #2484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a99220c
cda6444
2d7708f
5b7fd44
f6e042a
08891f1
94546aa
5846475
09c1e3c
8ad9088
ce03e84
bf66a63
0d09cd1
eccc231
d2587a3
c27e9a5
578ab1f
1a40c87
3d44f1a
bdf8beb
e59c709
4553a6d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,11 +270,67 @@ int SHA3_Final(uint8_t *md, KECCAK1600_CTX *ctx) { | |
|
||
Keccak1600_Squeeze(ctx->A, md, ctx->md_size, ctx->block_size, ctx->state); | ||
ctx->state = KECCAK1600_STATE_FINAL; | ||
|
||
FIPS_service_indicator_update_state(); | ||
WillChilds-Klein marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return 1; | ||
} | ||
|
||
int SHA3_224_Init(KECCAK1600_CTX *ctx) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have all of these in digest.c, can you just update those to not be static? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so. The signatures are different ( |
||
return SHA3_Init(ctx, SHA3_224_DIGEST_BITLENGTH); | ||
} | ||
|
||
int SHA3_224_Update(KECCAK1600_CTX *ctx, const void *data, | ||
size_t len) { | ||
return SHA3_Update(ctx, data, len); | ||
} | ||
|
||
int SHA3_224_Final(uint8_t out[SHA3_224_DIGEST_LENGTH], | ||
KECCAK1600_CTX *ctx) { | ||
return SHA3_Final(&out[0], ctx); | ||
} | ||
|
||
int SHA3_256_Init(KECCAK1600_CTX *ctx) { | ||
return SHA3_Init(ctx, SHA3_256_DIGEST_BITLENGTH); | ||
} | ||
|
||
int SHA3_256_Update(KECCAK1600_CTX *ctx, const void *data, | ||
size_t len) { | ||
return SHA3_Update(ctx, data, len); | ||
} | ||
|
||
int SHA3_256_Final(uint8_t out[SHA3_256_DIGEST_LENGTH], | ||
KECCAK1600_CTX *ctx) { | ||
return SHA3_Final(&out[0], ctx); | ||
} | ||
|
||
int SHA3_384_Init(KECCAK1600_CTX *ctx) { | ||
return SHA3_Init(ctx, SHA3_384_DIGEST_BITLENGTH); | ||
} | ||
|
||
int SHA3_384_Update(KECCAK1600_CTX *ctx, const void *data, | ||
size_t len) { | ||
return SHA3_Update(ctx, data, len); | ||
} | ||
|
||
int SHA3_384_Final(uint8_t out[SHA3_384_DIGEST_LENGTH], | ||
KECCAK1600_CTX *ctx) { | ||
return SHA3_Final(&out[0], ctx); | ||
} | ||
|
||
int SHA3_512_Init(KECCAK1600_CTX *ctx) { | ||
return SHA3_Init(ctx, SHA3_512_DIGEST_BITLENGTH); | ||
} | ||
|
||
int SHA3_512_Update(KECCAK1600_CTX *ctx, const void *data, | ||
size_t len) { | ||
return SHA3_Update(ctx, data, len); | ||
} | ||
|
||
int SHA3_512_Final(uint8_t out[SHA3_512_DIGEST_LENGTH], | ||
KECCAK1600_CTX *ctx) { | ||
return SHA3_Final(&out[0], ctx); | ||
} | ||
|
||
/* | ||
* SHAKE APIs implement SHAKE functionalities on top of FIPS202 API layer | ||
*/ | ||
|
Uh oh!
There was an error while loading. Please reload this page.