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

The library does not provide the FIPS-4 init vectors for truncated Sha_512 variants #9

Open
dasgibtesjanicht opened this issue Oct 13, 2017 · 3 comments

Comments

@dasgibtesjanicht
Copy link

dasgibtesjanicht commented Oct 13, 2017

The FIPS-4 document mandates different init vectors for the approved Sha512_256 and Sha512_224 truncated variants. The library needs to provide the these init vectors and some backwards compatible means in the API to ask for these. One possibility is to define a couple of new flags that are looked at when we do the first "submit". that way any existing code that does not care about these can run unchanged, and people who want to calculate these truncated sha-s in a FIPS-4 compliant way will have the option to do so.
The sha512_256 digest would be esp. useful, as it provides a compact, collision resistant, and fast-running digest option for storage applications.

@gbtucker
Copy link
Contributor

Thanks for the request. We had a user say they will submit a sha224 shortened code for review soon. We haven't seen any requests for sha512_256. Do you have a need for it?

@dasgibtesjanicht
Copy link
Author

dasgibtesjanicht commented Oct 14, 2017 via email

@Bulat-Ziganshin
Copy link

do you store hash values for later usage? if no, there is an order of magnitude faster alternative - VMAC/UMAC algorithms. MAC can be considered as keyed hash. If an attacker doesn't know the key, it's no easier to generate a dup than to recover AES-encrypted text (AES is used as part of these algos).

With SHA, the faster approach to hashing is to use multi-buffer API, check in particular chunking_with_mb_hash.c - this way sha256 became faster than sha512 and moreover, it will accelerate on armv8/sha-ni cpus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants