aboutsummaryrefslogtreecommitdiff
path: root/sha3.c
AgeCommit message (Collapse)AuthorFilesLines
2024-05-03sha3.c: add missing RHO_IDSPaul Duncan1-0/+9
2024-05-03sha3.c: add neon backendPaul Duncan1-9/+305
2024-05-03sha3.c: refactor backends so they only implement permute_n()Paul Duncan1-40/+21
i verified that (gcc, at least) does constant propagation and inlines permute_n_<backend> and that this change does not affect performance. bench results, before: pabs@flex:~/git/sha3/tests/bench> ./bench info: cpucycles: version=20240318 implementation=amd64-pmc persecond=4800000000 info: backend=avx512 num_trials=100000 src_lens=64,256,1024,4096,16384 dst_lens=32 function,dst_len,64,256,1024,4096,16384 sha3_224,28,15.4,7.8,7.8,7.1,7.0 sha3_256,32,15.5,7.8,7.8,7.6,7.4 sha3_384,48,15.5,11.7,9.8,9.8,9.7 sha3_512,64,15.6,15.5,14.6,13.9,13.9 shake128,32,15.5,7.8,6.9,6.2,6.1 shake256,32,15.5,7.8,7.9,7.6,7.4 bench results, after change: pabs@flex:~/git/sha3/tests/bench> ./bench info: cpucycles: version=20240318 implementation=amd64-pmc persecond=4800000000 info: backend=avx512 num_trials=100000 src_lens=64,256,1024,4096,16384 dst_lens=32 function,dst_len,64,256,1024,4096,16384 sha3_224,28,15.4,7.8,7.8,7.1,7.0 sha3_256,32,15.6,7.8,7.8,7.6,7.4 sha3_384,48,15.6,11.7,9.8,9.8,9.7 sha3_512,64,15.6,15.5,14.6,13.8,13.8 shake128,32,15.6,7.9,6.9,6.2,6.1 shake256,32,15.7,7.9,7.9,7.6,7.4
2024-05-01sha3.c: improve internal documentation, s/SHA3_BACKEND_/BACKEND_/Paul Duncan1-78/+134
2024-04-29sha3.c: add permute_n_{scalar,avx512}() and refactor ↵Paul Duncan1-198/+23
permute{,12}_{scalar,avx512}() to use them
2024-04-29sha3.c: s/ifdef/if/ in a few placesPaul Duncan1-2/+2
2024-04-29sha3.[hc]: add sha3_backend()Paul Duncan1-1/+9
2024-04-29sha3.c: add/use SHA3_BACKENDPaul Duncan1-11/+26
2024-04-29sha3.c: permute{,12}_avx512(): optimize, update header commentPaul Duncan1-367/+295
2024-04-29sha3.c: build permute12_scalar() during testing, remove old commentPaul Duncan1-7/+1
2024-04-29sha3.c: clean up whitespace in rho(), pi(), and chi()Paul Duncan1-38/+50
2024-04-29sha3.c: use shared RCS, rename scalar and avx512 permute() to ↵Paul Duncan1-78/+547
permute_{scalar,axv512}(), hard-code num_rounds to 24 in permute_{scalar,avx512}(), add permute12_{scalar,avx512}(), absorb12(), and xof12_{init,absorb,raw,absorb,squeeze_raw,squeeze,once}(), update turboshake to use xof12_*(), move permute tests to PERMUTE_TESTS static array, rename test_permute() to test_permute_scalar(), add test_permute_avx512(), add PERMUTE12_TESTS and test_permute12_{scalar,avx512}()
2024-03-02sha3.c: add fail_test(), use it in all testsPaul Duncan1-211/+67
2024-03-02sha3.c: rename HASH_RATE() to RATE(), document RATE() and use it everywhere, ↵Paul Duncan1-34/+71
improve comments
2024-03-02sha3.c: fix commentPaul Duncan1-1/+1
2024-03-02sha3.c: parameterize turboshakePaul Duncan1-50/+34
2024-03-02sha3.c: parameterize parallelhashPaul Duncan1-271/+143
2024-03-02sha3.c: use __func__ in testsPaul Duncan1-49/+49
2024-03-02sha3.c: parameterize tuplehashPaul Duncan1-121/+68
2024-03-02sha3.c: parameterize kmac functionsPaul Duncan1-235/+122
2024-03-02sha3.c: move kmac128(), add missing kmac commentsPaul Duncan1-53/+63
2024-03-02sha3.c: parameterize cshakePaul Duncan1-158/+86
2024-03-02sha3.c: parameterize rate handling, simplify hash, shake, hmac, and cshake ↵Paul Duncan1-72/+58
definitions
2024-03-02sha3.c: remove keccak(), refactor xof_absorb_raw() into absorb(), update ↵Paul Duncan1-92/+54
hash_once(), hash_absorb(), and xof_absorb_raw() to use absorb()
2024-03-02sha3.[hc]: update commentsPaul Duncan1-2/+4
2024-03-02sha3.c: move hmac below shakePaul Duncan1-71/+71
2024-03-02sha3.c: add DEF_HASH(), DEF_HMAC(), and DEF_SHAKE(), remove explicit hash, ↵Paul Duncan1-376/+137
hmac, and shake implementations
2024-03-02sha3.c: xof_absorb_raw_large(): rename to xof_absorb_raw(), do not copy ↵Paul Duncan1-61/+11
state, check message alignment to elide unnecessary copies, remove xof_absorb_raw_small()
2024-02-26rename SHA3_*_CAPACITY to SHA3_*_LEN, document SHA3_*_LEN and ↵Paul Duncan1-28/+47
{SHA3,SHAKE*}_*_RATE
2024-02-24sha3.c: s/sha3(/hash_once(/, s/sha3_(init|absorb|final)/hash_$1/Paul Duncan1-21/+21
2024-02-24sha3.c: improve internal documentationPaul Duncan1-1/+29
2024-02-24sha3.c: s/xof_absorb_raw_bulk/xof_absorb_raw_large/, ↵Paul Duncan1-10/+18
s/xof_absorb_raw_simple/xof_absorb_raw_small/, add documentation to xof absorb functions
2024-02-24sha3.c: xof_squeeze_raw(): improve speed by squeezing in rate-sized chunksPaul Duncan1-6/+36
2024-02-24sha3.c: add xof_absorb_raw_bulk() to absorb data in bulkPaul Duncan1-6/+99
2024-02-24sha3.c: remove unused shake() functionPaul Duncan1-22/+0
2024-02-24sha3.[hc]: remove shake{128,256}(), replace shake{128,256}_xof prefixes with ↵Paul Duncan1-270/+58
shake{128,256}, update tests
2024-02-23sha3.c: add xof_{absorb,squeeze}_raw()Paul Duncan1-15/+29
2024-02-23sha3.c: use temp array for pi() and chi(), fix testsPaul Duncan1-65/+67
2023-10-16sha3.c: clean up intro, remove extraneous newlinePaul Duncan1-10/+10
2023-10-14sha3.c: compress algorithm list in header comment block, mark entire file as ↵Paul Duncan1-19/+12
INTERNAL to doxygen
2023-09-23sha3.c: k12_big_absorb_done(): fix uninitialized buffer warningPaul Duncan1-1/+1
2023-09-18sha3.c: add avx512 permute(), add step comments, do not build scalar steps ↵Paul Duncan1-1/+257
unless necessary
2023-09-06sha3.[hc]: refactor k12 apiPaul Duncan1-84/+92
2023-09-06README.md, sha3.[hc]: add KangarooTwelve to algorithm listPaul Duncan1-0/+1
2023-09-06sha3.c: add kangarootwelve_custom(), kangarootwelve(), ↵Paul Duncan1-1/+501
kangarootwelve_length_encode(), test_kangarootwelve(), and test_kangarootwelve_length_encode()
2023-09-05sha3.[hc]: add turboshake{128,256}_custom()Paul Duncan1-1/+9
2023-09-05sha3.[hc]: s/TurboHash/TurboSHAKE/Paul Duncan1-1/+1
2023-09-05sha3.c: full turboshake{128,256} testsPaul Duncan1-19/+254
2023-09-05sha3.c: permute() pass correct round to iota() for turboshakePaul Duncan1-1/+1
2023-09-05sha3.c: add incomplete turboshake implementation, improve commentsPaul Duncan1-28/+157