| Commit message (Collapse) | Author | Age |
|
|
|
| |
Support RC4. Future commits will add support for more modern algorithms.
|
|
|
|
| |
It’s getting messy, so switch to a parameters datatype pattern.
|
| |
|
|
|
|
|
|
| |
Replace tables of tuples with simple function calls, and normalize
argument order to have outputs to the right of inputs. Also factor out
some common patterns.
|
| |
|
|
|
|
|
| |
It’s not clear what equality between errors should mean, so don’t
support it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Implement the `extract` phase of HKDF.
|
| |
|
|
|
|
|
|
| |
I don’t always like the output hindent gives, so reformat the project
to be a bit closer to what you see in published Haskell books and the
like.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Eliminate the functional interface for hashing. Hashing now occurs
exclusively through the `hash` function, which accepts a
`Data.Digest.Algorithm`. This makes btls somewhat less extensible, but
it’s the most elegant way to support HMACs.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Switch SHA-2 API to use lazy ByteStrings rather than strict. Lazy
ByteStrings make the hash function compatible with streaming I/O
patterns; users no longer need to preload all the data they wish to hash
into RAM.
|
|
So far, btls provides SHA-224, SHA-256, SHA-384, and SHA-512 algorithms.
To do that, I
- vendor BoringSSL and create a custom `Setup.hs` to build it,
- wrap a number of functions and values from BoringSSL's EVP
subsystem, and
- implement the four SHA-2 algorithms using the wrapped routines.
I provide conformance tests incorporating the official NIST example
vectors and the vectors used in the Go SHA-2 test suite. The tests also
use SmallCheck to compare btls’s SHA-2 implementations with those
provided by the system’s Coreutils and openssl(1) installations.
|