Skip to content
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

[Feature Request:] Blake2sp, Blake2bp and 2 more. #272

Open
lelik107 opened this issue Oct 28, 2024 · 1 comment
Open

[Feature Request:] Blake2sp, Blake2bp and 2 more. #272

lelik107 opened this issue Oct 28, 2024 · 1 comment

Comments

@lelik107
Copy link

lelik107 commented Oct 28, 2024

Hello! I'd like to ask you for adding these 2 hash functions.

Blake2sp-256, Blake2bp-512 as they are. This is a reference implementation as it was presented for NIST hash function competition aka SHA-3.
https://github.com/BLAKE2/BLAKE2

p variants are designed to run in parallel: 8 threads for Blake2sp-256 and 4 threads for Blake2bp-512 but even in the SW that doesn't use multi threading they usually twice faster than Blake2s-256 and Blake2b-512.

The author of any official Blake2 С implementation is Samuel Neves, a member of BLAKE3 team too. https://github.com/sneves
AVX2 didn't exist when SHA-3 competition was and later he did this implementation: https://github.com/sneves/blake2-avx2
It marked as experimental but in this context this isn't like alpha or beta, this just means it's not the very code from SHA-3 competition. As I know AVX2 variant by itself has no fallback code (if you have no AVX2 - you have no hash), though it's used in 7-zip for example (I don't know where Igor Pavlov got AVX512 optimization) - just for Blake2sp-256, because RAR5 format uses exactly it.
https://github.com/ip7z/7zip/blob/main/C/Blake2s.c
https://github.com/ip7z/7zip/blob/main/C/Blake2.h
I'm not sure which variant is more appropriate for RHash. Thus maybe it's better to go with the reference one.

The feature request ends here, the other 2 are the suggestions for Aleksey if he finds them interesting.

Thank you.

@lelik107
Copy link
Author

lelik107 commented Oct 28, 2024

KangarooTwelve aka K-12, basically Keccak (SHA-3) with the rounds reduced by half 24/2=12 and some bells and whistles.
https://keccak.team/kangarootwelve.html
https://github.com/XKCP/K12
https://github.com/XKCP/XKCP
It usually performs better then any standardized Keccak Team designs FIPS 202 (SHA3, SHAKE) or NIST SP.800-185 (cSHAKE, KMAC, TupleHash, and ParallelHash). And there is no evidence it's insecure in any way.
https://keccak.team/sw_performance.html

LSH is a current South Korean national standard KS X 3262, https://en.wikipedia.org/wiki/LSH_(hash_function)
and according to this with a decent performance:
http://bench.cr.yp.to/results-hash/amd64-hertz.html (LSH256 and LSH512)
The problem is that the docs are in Korean. The sources are here, KISA is Korea Internet & Security Agency:
https://seed.kisa.or.kr/async/MultiFile/download.do?FS_KEYNO=FS_0000000364&MNK=MN_0000001247
And a part of CryptoPP: https://github.com/weidai11/cryptopp (everything with lsh).

@lelik107 lelik107 changed the title Feature Request: Blake2sp, Blake2bp and KangarooTwelve (K12) Feature Request: Blake2sp, Blake2bp and KangarooTwelve (K12) and maybe :) LSH Oct 28, 2024
@lelik107 lelik107 changed the title Feature Request: Blake2sp, Blake2bp and KangarooTwelve (K12) and maybe :) LSH Feature Request: Blake2sp, Blake2bp and KangarooTwelve (K12) Oct 28, 2024
@lelik107 lelik107 changed the title Feature Request: Blake2sp, Blake2bp and KangarooTwelve (K12) [Feature Request:] Blake2sp, Blake2bp and 2 more. Oct 29, 2024
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

No branches or pull requests

1 participant