Skip to content

Commit

Permalink
Merge pull request #517 from pq-code-package/fips202_simpl
Browse files Browse the repository at this point in the history
FIPS202: Remove redundant zeroization in shake128_absorb_once()
  • Loading branch information
hanno-becker authored Dec 12, 2024
2 parents d26f06b + fe603e6 commit c614eab
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fips202/fips202.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ static void keccak_squeeze_once(uint8_t *h, size_t outlen, uint64_t *s,
void shake128_absorb_once(shake128ctx *state, const uint8_t *input,
size_t inlen)
{
int i;
for (i = 0; i < 25; i++)
{
state->ctx[i] = 0;
}
keccak_absorb_once(state->ctx, SHAKE128_RATE, input, inlen, 0x1F);
}

Expand Down

18 comments on commit c614eab

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arm Cortex-A76 (Raspberry Pi 5) benchmarks

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 29185 cycles 29185 cycles 1
ML-KEM-512 encaps 35556 cycles 35548 cycles 1.00
ML-KEM-512 decaps 46103 cycles 46094 cycles 1.00
ML-KEM-768 keypair 49231 cycles 49234 cycles 1.00
ML-KEM-768 encaps 55387 cycles 55389 cycles 1.00
ML-KEM-768 decaps 70237 cycles 70242 cycles 1.00
ML-KEM-1024 keypair 72218 cycles 72221 cycles 1.00
ML-KEM-1024 encaps 81129 cycles 81136 cycles 1.00
ML-KEM-1024 decaps 100869 cycles 100873 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel Xeon 4th gen (c7i)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 13531 cycles 13504 cycles 1.00
ML-KEM-512 encaps 17341 cycles 17278 cycles 1.00
ML-KEM-512 decaps 22899 cycles 22793 cycles 1.00
ML-KEM-768 keypair 22566 cycles 22505 cycles 1.00
ML-KEM-768 encaps 24561 cycles 24465 cycles 1.00
ML-KEM-768 decaps 32692 cycles 32463 cycles 1.01
ML-KEM-1024 keypair 31405 cycles 31375 cycles 1.00
ML-KEM-1024 encaps 34972 cycles 35023 cycles 1.00
ML-KEM-1024 decaps 45742 cycles 45796 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel Xeon 3rd gen (c6i)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 20345 cycles 20340 cycles 1.00
ML-KEM-512 encaps 27009 cycles 27023 cycles 1.00
ML-KEM-512 decaps 35807 cycles 35854 cycles 1.00
ML-KEM-768 keypair 34913 cycles 34944 cycles 1.00
ML-KEM-768 encaps 38193 cycles 38241 cycles 1.00
ML-KEM-768 decaps 50941 cycles 51012 cycles 1.00
ML-KEM-1024 keypair 47967 cycles 47985 cycles 1.00
ML-KEM-1024 encaps 54125 cycles 54159 cycles 1.00
ML-KEM-1024 decaps 71714 cycles 74196 cycles 0.97

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD EPYC 3rd gen (c6a)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 18136 cycles 18129 cycles 1.00
ML-KEM-512 encaps 23191 cycles 23193 cycles 1.00
ML-KEM-512 decaps 30500 cycles 30500 cycles 1
ML-KEM-768 keypair 31074 cycles 31076 cycles 1.00
ML-KEM-768 encaps 34168 cycles 34244 cycles 1.00
ML-KEM-768 decaps 44731 cycles 44785 cycles 1.00
ML-KEM-1024 keypair 44664 cycles 44799 cycles 1.00
ML-KEM-1024 encaps 49904 cycles 50094 cycles 1.00
ML-KEM-1024 decaps 64382 cycles 64353 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel Xeon 4th gen (c7i) (no-opt)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 34846 cycles 34835 cycles 1.00
ML-KEM-512 encaps 45040 cycles 45000 cycles 1.00
ML-KEM-512 decaps 58941 cycles 58985 cycles 1.00
ML-KEM-768 keypair 59188 cycles 59109 cycles 1.00
ML-KEM-768 encaps 71871 cycles 71770 cycles 1.00
ML-KEM-768 decaps 89336 cycles 89208 cycles 1.00
ML-KEM-1024 keypair 87675 cycles 87394 cycles 1.00
ML-KEM-1024 encaps 104628 cycles 104532 cycles 1.00
ML-KEM-1024 decaps 127490 cycles 127587 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD EPYC 4th gen (c7a)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 15081 cycles 15163 cycles 0.99
ML-KEM-512 encaps 19664 cycles 19660 cycles 1.00
ML-KEM-512 decaps 26314 cycles 26301 cycles 1.00
ML-KEM-768 keypair 25623 cycles 25615 cycles 1.00
ML-KEM-768 encaps 28167 cycles 28168 cycles 1.00
ML-KEM-768 decaps 37860 cycles 37867 cycles 1.00
ML-KEM-1024 keypair 35629 cycles 36115 cycles 0.99
ML-KEM-1024 encaps 40969 cycles 41004 cycles 1.00
ML-KEM-1024 decaps 54490 cycles 54731 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton3

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 18993 cycles 18993 cycles 1
ML-KEM-512 encaps 23583 cycles 23579 cycles 1.00
ML-KEM-512 decaps 30760 cycles 30754 cycles 1.00
ML-KEM-768 keypair 32256 cycles 32252 cycles 1.00
ML-KEM-768 encaps 35715 cycles 35717 cycles 1.00
ML-KEM-768 decaps 45888 cycles 45889 cycles 1.00
ML-KEM-1024 keypair 46846 cycles 46847 cycles 1.00
ML-KEM-1024 encaps 52634 cycles 52635 cycles 1.00
ML-KEM-1024 decaps 66480 cycles 66482 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton4

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 18199 cycles 18202 cycles 1.00
ML-KEM-512 encaps 22233 cycles 22233 cycles 1
ML-KEM-512 decaps 28999 cycles 28993 cycles 1.00
ML-KEM-768 keypair 30682 cycles 30683 cycles 1.00
ML-KEM-768 encaps 33733 cycles 33734 cycles 1.00
ML-KEM-768 decaps 43311 cycles 43313 cycles 1.00
ML-KEM-1024 keypair 44371 cycles 44371 cycles 1
ML-KEM-1024 encaps 49786 cycles 49786 cycles 1
ML-KEM-1024 decaps 62847 cycles 62847 cycles 1

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton2

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 29197 cycles 29194 cycles 1.00
ML-KEM-512 encaps 35565 cycles 35564 cycles 1.00
ML-KEM-512 decaps 46111 cycles 46109 cycles 1.00
ML-KEM-768 keypair 49230 cycles 49228 cycles 1.00
ML-KEM-768 encaps 55402 cycles 55395 cycles 1.00
ML-KEM-768 decaps 70221 cycles 70213 cycles 1.00
ML-KEM-1024 keypair 72356 cycles 72347 cycles 1.00
ML-KEM-1024 encaps 81164 cycles 81175 cycles 1.00
ML-KEM-1024 decaps 100837 cycles 100850 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel Xeon 3rd gen (c6i) (no-opt)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 56631 cycles 56675 cycles 1.00
ML-KEM-512 encaps 69502 cycles 69566 cycles 1.00
ML-KEM-512 decaps 91402 cycles 91486 cycles 1.00
ML-KEM-768 keypair 91899 cycles 91941 cycles 1.00
ML-KEM-768 encaps 107811 cycles 107898 cycles 1.00
ML-KEM-768 decaps 136349 cycles 136491 cycles 1.00
ML-KEM-1024 keypair 134863 cycles 134979 cycles 1.00
ML-KEM-1024 encaps 155457 cycles 155432 cycles 1.00
ML-KEM-1024 decaps 191607 cycles 191765 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD EPYC 3rd gen (c6a) (no-opt)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 52202 cycles 52150 cycles 1.00
ML-KEM-512 encaps 65791 cycles 65759 cycles 1.00
ML-KEM-512 decaps 88447 cycles 88367 cycles 1.00
ML-KEM-768 keypair 84794 cycles 84732 cycles 1.00
ML-KEM-768 encaps 101560 cycles 101450 cycles 1.00
ML-KEM-768 decaps 132138 cycles 132041 cycles 1.00
ML-KEM-1024 keypair 124161 cycles 124027 cycles 1.00
ML-KEM-1024 encaps 145893 cycles 145739 cycles 1.00
ML-KEM-1024 decaps 183922 cycles 183694 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD EPYC 4th gen (c7a) (no-opt)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 45730 cycles 45730 cycles 1
ML-KEM-512 encaps 56855 cycles 56855 cycles 1
ML-KEM-512 decaps 76244 cycles 76254 cycles 1.00
ML-KEM-768 keypair 74555 cycles 74528 cycles 1.00
ML-KEM-768 encaps 88623 cycles 88576 cycles 1.00
ML-KEM-768 decaps 114487 cycles 114389 cycles 1.00
ML-KEM-1024 keypair 109387 cycles 109483 cycles 1.00
ML-KEM-1024 encaps 127335 cycles 127332 cycles 1.00
ML-KEM-1024 decaps 160161 cycles 160212 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton3 (no-opt)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 45394 cycles 45388 cycles 1.00
ML-KEM-512 encaps 54216 cycles 54216 cycles 1
ML-KEM-512 decaps 71150 cycles 71148 cycles 1.00
ML-KEM-768 keypair 74826 cycles 74831 cycles 1.00
ML-KEM-768 encaps 86064 cycles 86062 cycles 1.00
ML-KEM-768 decaps 108807 cycles 108806 cycles 1.00
ML-KEM-1024 keypair 111120 cycles 111125 cycles 1.00
ML-KEM-1024 encaps 125937 cycles 125931 cycles 1.00
ML-KEM-1024 decaps 154630 cycles 154618 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton4 (no-opt)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 41970 cycles 41974 cycles 1.00
ML-KEM-512 encaps 50166 cycles 50160 cycles 1.00
ML-KEM-512 decaps 66054 cycles 66047 cycles 1.00
ML-KEM-768 keypair 69062 cycles 69052 cycles 1.00
ML-KEM-768 encaps 79763 cycles 79763 cycles 1
ML-KEM-768 decaps 101020 cycles 101016 cycles 1.00
ML-KEM-1024 keypair 102453 cycles 102470 cycles 1.00
ML-KEM-1024 encaps 117440 cycles 117439 cycles 1.00
ML-KEM-1024 decaps 143384 cycles 143396 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton2 (no-opt)

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 71271 cycles 71265 cycles 1.00
ML-KEM-512 encaps 85048 cycles 85073 cycles 1.00
ML-KEM-512 decaps 112748 cycles 112766 cycles 1.00
ML-KEM-768 keypair 117653 cycles 117701 cycles 1.00
ML-KEM-768 encaps 135334 cycles 135371 cycles 1.00
ML-KEM-768 decaps 171950 cycles 171997 cycles 1.00
ML-KEM-1024 keypair 175262 cycles 174905 cycles 1.00
ML-KEM-1024 encaps 197305 cycles 197066 cycles 1.00
ML-KEM-1024 decaps 243534 cycles 243234 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bananapi bpi-f3 benchmarks

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 335050 cycles 335008 cycles 1.00
ML-KEM-512 encaps 445565 cycles 445671 cycles 1.00
ML-KEM-512 decaps 593820 cycles 593712 cycles 1.00
ML-KEM-768 keypair 556121 cycles 556054 cycles 1.00
ML-KEM-768 encaps 698076 cycles 697847 cycles 1.00
ML-KEM-768 decaps 890318 cycles 889524 cycles 1.00
ML-KEM-1024 keypair 821270 cycles 821527 cycles 1.00
ML-KEM-1024 encaps 998043 cycles 998115 cycles 1.00
ML-KEM-1024 decaps 1230224 cycles 1230330 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arm Cortex-A55 (Snapdragon 888) benchmarks

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 57979 cycles 57899 cycles 1.00
ML-KEM-512 encaps 65244 cycles 65180 cycles 1.00
ML-KEM-512 decaps 83982 cycles 83712 cycles 1.00
ML-KEM-768 keypair 98027 cycles 97984 cycles 1.00
ML-KEM-768 encaps 109438 cycles 109045 cycles 1.00
ML-KEM-768 decaps 135670 cycles 135443 cycles 1.00
ML-KEM-1024 keypair 148899 cycles 149097 cycles 1.00
ML-KEM-1024 encaps 164798 cycles 165026 cycles 1.00
ML-KEM-1024 decaps 200146 cycles 200559 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arm Cortex-A72 (Raspberry Pi 4) benchmarks

Benchmark suite Current: c614eab Previous: d26f06b Ratio
ML-KEM-512 keypair 51433 cycles 51401 cycles 1.00
ML-KEM-512 encaps 58016 cycles 57928 cycles 1.00
ML-KEM-512 decaps 73599 cycles 74107 cycles 0.99
ML-KEM-768 keypair 87878 cycles 87586 cycles 1.00
ML-KEM-768 encaps 96770 cycles 96337 cycles 1.00
ML-KEM-768 decaps 119885 cycles 119219 cycles 1.01
ML-KEM-1024 keypair 131165 cycles 131857 cycles 0.99
ML-KEM-1024 encaps 144505 cycles 144818 cycles 1.00
ML-KEM-1024 decaps 175747 cycles 175795 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.