Raises an error (as the original doc claimed) if the salt is not the
required length of 16 bytes.
validatePasswordEither doesn't require separate checking since the hash
length as a whole is checked, implicitly ensuring the salt is the right
length. Therefore it shouldn't be possible to trigger the error by
calling this function.
Fixes#93.
The temporary XY buffer passed to the scrypt_smix C function should be
256r+64 bytes in length, but the Haskell code was only allocating 256r
bytes, causing the additional 64 to be written past the end of the
buffer.
See #91.
Combined commits between 0.15 and 0.19:
- Decoupled -DARCH_X86_64 and support_rdrand
- add an untested workaround for i686 machine
- limit to i686 and x86_64
- add possible workaround for fPIC building
- re-use standard instruction
It decomposes the drgNew call that was gathering entropy then
initializing a ChaChaDRG, into 2 new calls seedNew and drgNewSeed.
drgNew remains unchanged.
The integer importing capability, should be used when wanting to bring
reproducibility to a debugging problem or for testing, otherwise it's
probably a bad idea to use.
Caused by a difference in the size of the digest
byte array allocated on Haskell side and the
amount of bytes copied to it on the C side.
In cbits/cryptonite_sha512.c:cryptonite_sha384_finalize
SHA384_DIGEST_SIZE bytes is copied into the out buffer.
SHA384_DIGEST_SIZE is #defined as 64 in cbits/cryptonite_sha512.h
while the buffer given will have size 48, as defined in
Crypto/Hash/SHA384.hs.
Defining SHA384_DIGEST_SIZE as 48 fixes the issue.
When in c99 mode (which is needed for some of our newer additions),
old distributions has an glibc inlining bug which triggers lots of
duplicated symbols.
Add a cabal flag to revert the inliner to c89 mode.
Fixes#64
Cabal links to all C-sources defined unconditionally, then conditionally
append blocks that defined C-Sources; This lead to bug when the order of
.c files are important, like for cabal repl.
Workaround this bug, by defining everything aes related in the
conditional part.