-
Notifications
You must be signed in to change notification settings - Fork 352
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
Reference implementation of Blake3 for generic 16/32/64 bit CPUs? #364
Comments
The C and Rust implementations of BLAKE3 should both be portable to ~any CPU. The portable implementations are |
There is a pure C99 implementation in |
fwiw
should compile pretty much anywhere with a pure C implementation :) (until BLAKE3_NO_RISCV_P comes along anyway.. maybe a BLAKE3_PORTABLE flag could be useful? idk) |
simple flag to only compile the portable implementation got the idea from BLAKE3-team#364 (comment) could name it BLAKE3_PORTABLE instead, maybe, idk
While BLAKE3 is fantastic in terms of performance and optimisations across CPUs and operating systems with support for SSE, AVX, NEON etc. there doesn't appear to be a generic implementation, i.e. a non-optimised version that just works on any CPU, for example STM32, ESP32, ESP8266, ArmHF, i386 or anything else released in the last 25-30 years...
Can we have a "reference implementation" of BLAKE3 with just two files "blake3.c" and "blake3.h" that is written in pure C and compiles on any hardware with uint32_t and C99?
To me, the "refrence implementation" should come with a test harness and test vectors and should be the basis of an RFC for what looks to be a solid foundation. The optimised versions could be derivatives of the reference implementation...
A reference "baseline" implementation would be of huge benefit to low bandwidth and IoT type applications where the complexities of libraries and hand-crafted assembler optimisations are either not appropriate or warranted.
The text was updated successfully, but these errors were encountered: