~nlordell/hare-sha3

Mirror of https://codeberg.org/nlordell/hare-sha3
Remove Sourcehut Build Spec
fixes for latest stdlib changes

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~nlordell/hare-sha3
read/write
git@git.sr.ht:~nlordell/hare-sha3

You can also use your local clone with git send-email.

#hare-sha3

Hare implementation of the SHA-3 cryptographic hash algorithms.

This library supports:

  • SHA3-224
  • SHA3-256
  • SHA3-384
  • SHA3-512
  • SHAKE128
  • SHAKE256

#Installation

Install to the system-wide Hare third party libraries:

make install

#SHA-3 Sum

Additionally, this repository contains a sample sha3sum tool that does exactly what its name suggests: computes SHA-3 sums for specified files. This is meant as an example to showcase the crypto::sha3 library.

#Buiding

make

#Usage

$ ./sha3sum -h
./sha3sum: print SHA-3 checksums

Usage: ./sha3sum [-bk] [-a <algoritim>] FILE...

-a <algoritim>: 224, 256 (default), 384, 512
-b: Open the files in binary mode
-k: Keccak (NIST submission without padding changes)
$ ./sha3sum cmd/sha3sum/main.ha
11c608c04864434195022b3149049da4c6952627ae3ce2e43a1213c13bee0b9c  cmd/sha3sum/main.ha

#Testing

#Local Testing

Tests for the SHA-3 library and checksum tool respectively:

make check
make check-sha3sum

#Test Vectors

NIST publishes test vectors as part of their Cryptographic Algorithm Validation Program. Download and check the test vectors:

make check-vectors