Skip to content

sha3: define block_length as the rate, not as the state size - #14132

Merged
jedisct1 merged 1 commit into
ziglang:masterfrom
jedisct1:block_length_sponges
Dec 30, 2022
Merged

sha3: define block_length as the rate, not as the state size#14132
jedisct1 merged 1 commit into
ziglang:masterfrom
jedisct1:block_length_sponges

Conversation

@jedisct1

Copy link
Copy Markdown
Contributor

In sponge-based constructions, the block size is not the same as the state size. For practical purposes, it's the same as the rate.

Size this is a constant for a given type, we don't need to keep a copy of that value in the state itself. Just use the constant directly. This saves some bytes and may even be slightly faster.

More importantly:
Fixes #14128

In sponge-based constructions, the block size is not the same as
the state size. For practical purposes, it's the same as the rate.

Size this is a constant for a given type, we don't need to keep
a copy of that value in the state itself. Just use the constant
directly. This saves some bytes and may even be slightly faster.

More importantly:
Fixes ziglang#14128
@jedisct1
jedisct1 enabled auto-merge (squash) December 30, 2022 16:49
@jedisct1
jedisct1 merged commit d86685a into ziglang:master Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HMAC + SHA3 incorrect output

1 participant