From d4fe483efd3e0062f12430efe9deb66d43d914d7 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sat, 13 Jul 2013 10:09:38 -0400 Subject: NaCl moved to other repo. --- nacl/crypto_hash/sha512/checksum | 1 - nacl/crypto_hash/sha512/ref/api.h | 1 - nacl/crypto_hash/sha512/ref/hash.c | 71 -------------------------------- nacl/crypto_hash/sha512/ref/implementors | 1 - nacl/crypto_hash/sha512/selected | 0 nacl/crypto_hash/sha512/used | 0 6 files changed, 74 deletions(-) delete mode 100644 nacl/crypto_hash/sha512/checksum delete mode 100644 nacl/crypto_hash/sha512/ref/api.h delete mode 100644 nacl/crypto_hash/sha512/ref/hash.c delete mode 100644 nacl/crypto_hash/sha512/ref/implementors delete mode 100644 nacl/crypto_hash/sha512/selected delete mode 100644 nacl/crypto_hash/sha512/used (limited to 'nacl/crypto_hash/sha512') diff --git a/nacl/crypto_hash/sha512/checksum b/nacl/crypto_hash/sha512/checksum deleted file mode 100644 index edf714e9..00000000 --- a/nacl/crypto_hash/sha512/checksum +++ /dev/null @@ -1 +0,0 @@ -9a2a989e136a02c3362c98e6e1e0b52fab980a1dafbebe4dd5e44d15d061742e35fb686befd4e33c608d251c96e26c020f90d92bb7ec8a657f79bb8e0b00a473 diff --git a/nacl/crypto_hash/sha512/ref/api.h b/nacl/crypto_hash/sha512/ref/api.h deleted file mode 100644 index de9380d7..00000000 --- a/nacl/crypto_hash/sha512/ref/api.h +++ /dev/null @@ -1 +0,0 @@ -#define CRYPTO_BYTES 64 diff --git a/nacl/crypto_hash/sha512/ref/hash.c b/nacl/crypto_hash/sha512/ref/hash.c deleted file mode 100644 index fc4347bb..00000000 --- a/nacl/crypto_hash/sha512/ref/hash.c +++ /dev/null @@ -1,71 +0,0 @@ -/* -20080913 -D. J. Bernstein -Public domain. -*/ - -#include "crypto_hashblocks_sha512.h" -#include "crypto_hash.h" - -#define blocks crypto_hashblocks_sha512 - -static const unsigned char iv[64] = { - 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08, - 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b, - 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b, - 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1, - 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1, - 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, - 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, - 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 -} ; - -typedef unsigned long long uint64; - -int crypto_hash(unsigned char *out,const unsigned char *in,unsigned long long inlen) -{ - unsigned char h[64]; - unsigned char padded[256]; - int i; - unsigned long long bytes = inlen; - - for (i = 0;i < 64;++i) h[i] = iv[i]; - - blocks(h,in,inlen); - in += inlen; - inlen &= 127; - in -= inlen; - - for (i = 0;i < inlen;++i) padded[i] = in[i]; - padded[inlen] = 0x80; - - if (inlen < 112) { - for (i = inlen + 1;i < 119;++i) padded[i] = 0; - padded[119] = bytes >> 61; - padded[120] = bytes >> 53; - padded[121] = bytes >> 45; - padded[122] = bytes >> 37; - padded[123] = bytes >> 29; - padded[124] = bytes >> 21; - padded[125] = bytes >> 13; - padded[126] = bytes >> 5; - padded[127] = bytes << 3; - blocks(h,padded,128); - } else { - for (i = inlen + 1;i < 247;++i) padded[i] = 0; - padded[247] = bytes >> 61; - padded[248] = bytes >> 53; - padded[249] = bytes >> 45; - padded[250] = bytes >> 37; - padded[251] = bytes >> 29; - padded[252] = bytes >> 21; - padded[253] = bytes >> 13; - padded[254] = bytes >> 5; - padded[255] = bytes << 3; - blocks(h,padded,256); - } - - for (i = 0;i < 64;++i) out[i] = h[i]; - - return 0; -} diff --git a/nacl/crypto_hash/sha512/ref/implementors b/nacl/crypto_hash/sha512/ref/implementors deleted file mode 100644 index 40afca09..00000000 --- a/nacl/crypto_hash/sha512/ref/implementors +++ /dev/null @@ -1 +0,0 @@ -Daniel J. Bernstein (wrapper around crypto_hashblocks/sha512) diff --git a/nacl/crypto_hash/sha512/selected b/nacl/crypto_hash/sha512/selected deleted file mode 100644 index e69de29b..00000000 diff --git a/nacl/crypto_hash/sha512/used b/nacl/crypto_hash/sha512/used deleted file mode 100644 index e69de29b..00000000 -- cgit v1.2.3