-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathSHA512.cry
28 lines (26 loc) · 1011 Bytes
/
SHA512.cry
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* Instantiation of the secure hash algorithm SHA-512 as specified in
* [FIPS-180-4], Section 5.3.5.
*
* @copyright Galois, Inc
* @author Marcella Hastings <[email protected]>
*
* [FIPS-180-4]: National Institute of Standards and Technology. Secure Hash
* Standard (SHS). (Department of Commerce, Washington, D.C.), Federal
* Information Processing Standards Publication (FIPS) NIST FIPS 180-4.
* August 2015.
* @see https://doi.org/10.6028/NIST.FIPS.180-4
*/
module Primitive::Keyless::Hash::SHA2::Instantiations::SHA512 =
Primitive::Keyless::Hash::SHA2::Specification
where
type w = 64
type DigestSize = 512
// Per [FIPS-180-4], these are the the first sixty-four bits of the
// fractional parts of the square roots of the first 8 prime numbers.
H0 = [
0x6a09e667f3bcc908, 0xbb67ae8584caa73b,
0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1,
0x510e527fade682d1, 0x9b05688c2b3e6c1f,
0x1f83d9abfb41bd6b, 0x5be0cd19137e2179
]