diff options
author | 2017-05-27 15:32:51 +0000 | |
---|---|---|
committer | 2017-05-27 15:32:51 +0000 | |
commit | 98bf758756ea5db30049b5c81d7a51412950f257 (patch) | |
tree | 8f477b9b8ec2d530d906c754f6d93327b7e5733b | |
parent | Move SPINLOCK_SPIN_HOOK to the header used by other archs in order to (diff) | |
download | wireguard-openbsd-98bf758756ea5db30049b5c81d7a51412950f257.tar.xz wireguard-openbsd-98bf758756ea5db30049b5c81d7a51412950f257.zip |
move sha224_initial_hash_value[] under !SHA2_SMALL; ok deraadt@ millert@
-rw-r--r-- | lib/libc/hash/sha2.c | 26 | ||||
-rw-r--r-- | sys/lib/libsa/sha2.c | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/lib/libc/hash/sha2.c b/lib/libc/hash/sha2.c index ec13e444695..80fa50aaf44 100644 --- a/lib/libc/hash/sha2.c +++ b/lib/libc/hash/sha2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sha2.c,v 1.25 2016/09/03 16:25:03 tedu Exp $ */ +/* $OpenBSD: sha2.c,v 1.26 2017/05/27 15:32:51 naddy Exp $ */ /* * FILE: sha2.c @@ -195,18 +195,6 @@ static const u_int32_t K256[64] = { 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL }; -/* Initial hash value H for SHA-224: */ -static const u_int32_t sha224_initial_hash_value[8] = { - 0xc1059ed8UL, - 0x367cd507UL, - 0x3070dd17UL, - 0xf70e5939UL, - 0xffc00b31UL, - 0x68581511UL, - 0x64f98fa7UL, - 0xbefa4fa4UL -}; - /* Initial hash value H for SHA-256: */ static const u_int32_t sha256_initial_hash_value[8] = { 0x6a09e667UL, @@ -276,6 +264,18 @@ static const u_int64_t sha512_initial_hash_value[8] = { }; #if !defined(SHA2_SMALL) +/* Initial hash value H for SHA-224: */ +static const u_int32_t sha224_initial_hash_value[8] = { + 0xc1059ed8UL, + 0x367cd507UL, + 0x3070dd17UL, + 0xf70e5939UL, + 0xffc00b31UL, + 0x68581511UL, + 0x64f98fa7UL, + 0xbefa4fa4UL +}; + /* Initial hash value H for SHA-384 */ static const u_int64_t sha384_initial_hash_value[8] = { 0xcbbb9d5dc1059ed8ULL, diff --git a/sys/lib/libsa/sha2.c b/sys/lib/libsa/sha2.c index e2c6d677147..7e6feafaf7b 100644 --- a/sys/lib/libsa/sha2.c +++ b/sys/lib/libsa/sha2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sha2.c,v 1.1 2016/09/10 18:22:34 jsing Exp $ */ +/* $OpenBSD: sha2.c,v 1.2 2017/05/27 15:32:51 naddy Exp $ */ /* * FILE: sha2.c @@ -196,18 +196,6 @@ static const u_int32_t K256[64] = { 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL }; -/* Initial hash value H for SHA-224: */ -static const u_int32_t sha224_initial_hash_value[8] = { - 0xc1059ed8UL, - 0x367cd507UL, - 0x3070dd17UL, - 0xf70e5939UL, - 0xffc00b31UL, - 0x68581511UL, - 0x64f98fa7UL, - 0xbefa4fa4UL -}; - /* Initial hash value H for SHA-256: */ static const u_int32_t sha256_initial_hash_value[8] = { 0x6a09e667UL, @@ -277,6 +265,18 @@ static const u_int64_t sha512_initial_hash_value[8] = { }; #if !defined(SHA2_SMALL) +/* Initial hash value H for SHA-224: */ +static const u_int32_t sha224_initial_hash_value[8] = { + 0xc1059ed8UL, + 0x367cd507UL, + 0x3070dd17UL, + 0xf70e5939UL, + 0xffc00b31UL, + 0x68581511UL, + 0x64f98fa7UL, + 0xbefa4fa4UL +}; + /* Initial hash value H for SHA-384 */ static const u_int64_t sha384_initial_hash_value[8] = { 0xcbbb9d5dc1059ed8ULL, |