-
Read about SHA-NI Recently and thought of RHash; any advantage to using hardware accelerated hashing within RHash or not worth the hassle? Unfortunately appears to require newish architectures (both AMD and Intel). Intel's Reference: A Recent-ish Paper Discussing implementing these features (starting in Section 2 seems to be the "good stuff"): GitHub page from the author providing reference implementations (MIT Licensed) to the paper https://github.com/armfazh/flo-shani-aesni Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Some of Intel and AMD CPUs support Intel SHA1 extension for SSE4, which add 7 instructions (SHA1RNDS4, SHA1NEXTE, SHA1MSG1, SHA1MSG2, SHA256RNDS2, SHA256MSG1, SHA256MSG2) to speed up SHA1, SHA224 and SHA256 calculations. The possible implementation should include both optimized and non-optimized versions of SHA1 and SHA256 and choose the best supported by CPU at runtime. It will increase the program and library size. This contradicts one of the LibRHash declared features: to be small in size. We should estimate how the library size will increase and does it worth the increased SHA1/SHA2 perfomance. The SHA1 hash function lately is considered broken, because of know method to generate collisions. E.g NIST deprecated the use of SHA-1 in 2011. I carefully choose in what features to invest my free time. It's an open source project and you should support it if you want more development done ;). I almost never select features with ASM optimizations, cause only a certain CPU architectures will benefit it, and LibRHash already has OpenSSL support for optimized algorithms. IMO, it would be wise to support SHA-NI in OpenSSL, since it will affect a large number of other projects. References
|
Beta Was this translation helpful? Give feedback.
Some of Intel and AMD CPUs support Intel SHA1 extension for SSE4, which add 7 instructions (SHA1RNDS4, SHA1NEXTE, SHA1MSG1, SHA1MSG2, SHA256RNDS2, SHA256MSG1, SHA256MSG2) to speed up SHA1, SHA224 and SHA256 calculations.
The possible implementation should include both optimized and non-optimized versions of SHA1 and SHA256 and choose the best supported by CPU at runtime. It will increase the program and library size. This contradicts one of the LibRHash declared features: to be small in size. We should estimate how the library size will increase and does it worth the increased SHA1/SHA2 perfomance.
The SHA1 hash function lately is considered broken, because of know method to generate coll…