...
 
Commits (5)
......@@ -22,7 +22,7 @@ Given a version number MAJOR.MINOR.PATCH
* PATCH incremented for bug fixes
[0.1.1] - 2020-03-03
[0.1.1] - 2020-04-01
--------------------
Added
......@@ -31,6 +31,7 @@ Added
* Elgamal digital signature.
* Elliptic curve group arithmetics exhaustive unit tests (add/mul).
* DSA key parameters generator.
* SHA-512 and SHA-384
Fixed
......
......@@ -81,8 +81,9 @@ Hash
### Secure hash
- MD5
- SHA1
- SHA256
- SHA-1
- SHA-256
- SHA-512
### CRC
......
/**
* @file sha256.h
* @brief Secure Hash Algorithm (256)
*
* @brief Secure Hash Algorithms 224 and 256 (SHA-224 and SHA-256)
* defined by FIPS 180-4: Secure Hash Standard (SHS).
*/
#ifndef CRY_SHA256_H_
......
/**
* @file sha512.h
*
* @brief Secure Hash Algorithms 384 and 512 (SHA-384 and SHA-512)
* defined by FIPS 180-4: Secure Hash Standard (SHS).
*/
#ifndef CRY_SHA512_H_
#define CRY_SHA512_H_
#include <stdint.h>
#include <stddef.h>
#define CRY_SHA512_DIGEST_SIZE 64
struct cry_sha512_ctx {
unsigned char data[128]; /**< Data block being processed */
uint64_t len[2]; /**< Number of data bytes processed */
uint64_t state[8]; /**< Intermediate digest state */
char is384; /**< SHA-384 */
};
typedef struct cry_sha512_ctx cry_sha512_ctx;
#ifdef __cplusplus
extern "C" {
#endif
/**
* Initialize SHA-512 context.
*
* @param ctx SHA-512 context to be initialized.
* @param is384 Produce a SHA-384 output.
*/
void cry_sha512_init(struct cry_sha512_ctx *ctx, char is384);
/**
* Clear SHA-512 context.
*
* @param ctx SHA-512 context to be cleared
*/
void cry_sha512_clear(cry_sha512_ctx *ctx);
/**
* SHA-512 process buffer.
*
* @param ctx SHA-512 context.
* @param data Buffer holding the data.
* @param len Length of the input data.
*/
void cry_sha512_update(struct cry_sha512_ctx *ctx, const unsigned char *data,
size_t len);
/**
* Final digest.
*
* @param ctx SHA-512 context
* @param out SHA-512 result
*/
void cry_sha512_digest(struct cry_sha512_ctx *ctx, unsigned char *out);
/**
* SHA-512 computation of a given input.
*
* @param out SHA-512 result buffer (shall be at least 64 bytes).
* @param data Input data buffer.
* @param len Input data length.
*/
void cry_sha512(unsigned char *out, const unsigned char *data, size_t len);
/**
* SHA-384 computation of a given input.
*
* @param out SHA-384 result buffer (shall be at least 48 bytes).
* @param data Input data buffer.
* @param len Input data length.
*/
void cry_sha384(unsigned char *out, const unsigned char *data, size_t len);
#ifdef __cplusplus
}
#endif
#endif /* CRY_SHA512_H_ */
#include <cry/sha512.h>
#include <string.h>
#include "../misc.h"
#define S0(x) (CRY_ROTR64(x, 1) ^ CRY_ROTR64(x, 8) ^ ((x) >> 7))
#define S1(x) (CRY_ROTR64(x,19) ^ CRY_ROTR64(x,61) ^ ((x) >> 6))
#define S2(x) (CRY_ROTR64(x,28) ^ CRY_ROTR64(x,34) ^ CRY_ROTR64(x,39))
#define S3(x) (CRY_ROTR64(x,14) ^ CRY_ROTR64(x,18) ^ CRY_ROTR64(x,41))
#define F0(x,y,z) (((x) & (y)) | ((z) & ((x) | (y))))
#define F1(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
#define P(a, b, c, d, e, f, g, h, x, K) do { \
t1 = (h) + S3(e) + F1((e),(f),(g)) + (K) + (x); \
t2 = S2(a) + F0((a),(b),(c)); \
(d) += t1; \
(h) = t1 + t2; \
} while (0)
/*
* Round constants
*/
static const uint64_t K[80] = {
0x428A2F98D728AE22, 0x7137449123EF65CD,
0xB5C0FBCFEC4D3B2F, 0xE9B5DBA58189DBBC,
0x3956C25BF348B538, 0x59F111F1B605D019,
0x923F82A4AF194F9B, 0xAB1C5ED5DA6D8118,
0xD807AA98A3030242, 0x12835B0145706FBE,
0x243185BE4EE4B28C, 0x550C7DC3D5FFB4E2,
0x72BE5D74F27B896F, 0x80DEB1FE3B1696B1,
0x9BDC06A725C71235, 0xC19BF174CF692694,
0xE49B69C19EF14AD2, 0xEFBE4786384F25E3,
0x0FC19DC68B8CD5B5, 0x240CA1CC77AC9C65,
0x2DE92C6F592B0275, 0x4A7484AA6EA6E483,
0x5CB0A9DCBD41FBD4, 0x76F988DA831153B5,
0x983E5152EE66DFAB, 0xA831C66D2DB43210,
0xB00327C898FB213F, 0xBF597FC7BEEF0EE4,
0xC6E00BF33DA88FC2, 0xD5A79147930AA725,
0x06CA6351E003826F, 0x142929670A0E6E70,
0x27B70A8546D22FFC, 0x2E1B21385C26C926,
0x4D2C6DFC5AC42AED, 0x53380D139D95B3DF,
0x650A73548BAF63DE, 0x766A0ABB3C77B2A8,
0x81C2C92E47EDAEE6, 0x92722C851482353B,
0xA2BFE8A14CF10364, 0xA81A664BBC423001,
0xC24B8B70D0F89791, 0xC76C51A30654BE30,
0xD192E819D6EF5218, 0xD69906245565A910,
0xF40E35855771202A, 0x106AA07032BBD1B8,
0x19A4C116B8D2D0C8, 0x1E376C085141AB53,
0x2748774CDF8EEB99, 0x34B0BCB5E19B48A8,
0x391C0CB3C5C95A63, 0x4ED8AA4AE3418ACB,
0x5B9CCA4F7763E373, 0x682E6FF3D6B2B8A3,
0x748F82EE5DEFB2FC, 0x78A5636F43172F60,
0x84C87814A1F0AB72, 0x8CC702081A6439EC,
0x90BEFFFA23631E28, 0xA4506CEBDE82BDE9,
0xBEF9A3F7B2C67915, 0xC67178F2E372532B,
0xCA273ECEEA26619C, 0xD186B8C721C0C207,
0xEADA7DD6CDE0EB1E, 0xF57D4F7FEE6ED178,
0x06F067AA72176FBA, 0x0A637DC5A2C898A6,
0x113F9804BEF90DAE, 0x1B710B35131C471B,
0x28DB77F523047D84, 0x32CAAB7B40C72493,
0x3C9EBE0A15C9BEBC, 0x431D67C49C100D4C,
0x4CC5D4BECB3E42B6, 0x597F299CFC657E2A,
0x5FCB6FAB3AD6FAEC, 0x6C44198C4A475817
};
/*
* SHA-512 compression function operates on a 1024-bit message block and a
* 512-bit intermediate hash value (divided in eight 64-bit words).
* It is essentially a 512-bit block cipher which encrypts the intermediate
* hash value using the message block as key.
* (http://www.di-srv.unisa.it/~ads/corso-security/www/CORSO-9900/hash/sha2.pdf)
*/
static void sha512_process(cry_sha512_ctx *ctx, const unsigned char *data)
{
unsigned int i;
uint64_t W[80];
uint64_t a, b, c, d, e, f, g, h;
uint64_t t1, t2;
for (i = 0; i < 16; i++)
CRY_READ64_BE(W[i], data + (i<<3));
for ( ; i < 80; i++)
W[i] = S1(W[i - 2]) + W[i - 7] + S0(W[i - 15]) + W[i - 16];
a = ctx->state[0];
b = ctx->state[1];
c = ctx->state[2];
d = ctx->state[3];
e = ctx->state[4];
f = ctx->state[5];
g = ctx->state[6];
h = ctx->state[7];
i = 0;
do {
P(a, b, c, d, e, f, g, h, W[i], K[i]);
i++;
P(h, a, b, c, d, e, f, g, W[i], K[i]);
i++;
P(g, h, a, b, c, d, e, f, W[i], K[i]);
i++;
P(f, g, h, a, b, c, d, e, W[i], K[i]);
i++;
P(e, f, g, h, a, b, c, d, W[i], K[i]);
i++;
P(d, e, f, g, h, a, b, c, W[i], K[i]);
i++;
P(c, d, e, f, g, h, a, b, W[i], K[i]);
i++;
P(b, c, d, e, f, g, h, a, W[i], K[i]);
i++;
} while (i < 80);
ctx->state[0] += a;
ctx->state[1] += b;
ctx->state[2] += c;
ctx->state[3] += d;
ctx->state[4] += e;
ctx->state[5] += f;
ctx->state[6] += g;
ctx->state[7] += h;
}
void cry_sha512_init(cry_sha512_ctx *ctx, char is384)
{
memset(ctx, 0, sizeof(*ctx));
ctx->is384 = is384;
/* Load magic initialization constants. */
if(ctx->is384 == 0) {
/* SHA-512 */
ctx->state[0] = 0x6A09E667F3BCC908;
ctx->state[1] = 0xBB67AE8584CAA73B;
ctx->state[2] = 0x3C6EF372FE94F82B;
ctx->state[3] = 0xA54FF53A5F1D36F1;
ctx->state[4] = 0x510E527FADE682D1;
ctx->state[5] = 0x9B05688C2B3E6C1F;
ctx->state[6] = 0x1F83D9ABFB41BD6B;
ctx->state[7] = 0x5BE0CD19137E2179;
} else {
/* SHA-384 */
ctx->state[0] = 0xCBBB9D5DC1059ED8;
ctx->state[1] = 0x629A292A367CD507;
ctx->state[2] = 0x9159015A3070DD17;
ctx->state[3] = 0x152FECD8F70E5939;
ctx->state[4] = 0x67332667FFC00B31;
ctx->state[5] = 0x8EB44A8768581511;
ctx->state[6] = 0xDB0C2E0D64F98FA7;
ctx->state[7] = 0x47B5481DBEFA4FA4;
}
}
void cry_sha512_clear(cry_sha512_ctx *ctx)
{
cry_memset(ctx, 0, sizeof(*ctx));
}
void cry_sha512_update(cry_sha512_ctx *ctx, const unsigned char *data,
size_t len)
{
size_t fill;
uint32_t left;
if (len == 0)
return;
left = ctx->len[0] & 0x7F;
fill = 128 - left;
ctx->len[0] += (uint32_t)len;
if (ctx->len[0] < (uint32_t)len)
ctx->len[1]++;
if (left && len >= fill) {
memcpy(ctx->data + left, data, fill);
sha512_process(ctx, ctx->data);
data += fill;
len -= fill;
left = 0;
}
while (len >= 128) {
sha512_process(ctx, data);
data += 128;
len -= 128;
}
if (len > 0)
memcpy(ctx->data + left, data, len);
}
void cry_sha512_digest(cry_sha512_ctx *ctx, unsigned char *out)
{
uint32_t last;
uint64_t hi, lo;
size_t padlen;
unsigned char msglen[16];
unsigned char pad[128] = { 0 };
/* Length in bits */
hi = (ctx->len[0] >> 61) | (ctx->len[1] << 3);
lo = (ctx->len[0] << 3);
CRY_WRITE64_BE(hi, msglen);
CRY_WRITE64_BE(lo, msglen + 8);
last = ctx->len[0] & 0x7F;
padlen = (last < 112) ? (112 - last) : (128 - last);
pad[0] = 0x80;
cry_sha512_update(ctx, pad, padlen);
cry_sha512_update(ctx, msglen, 16);
CRY_WRITE64_BE(ctx->state[0], out + 0);
CRY_WRITE64_BE(ctx->state[1], out + 8);
CRY_WRITE64_BE(ctx->state[2], out + 16);
CRY_WRITE64_BE(ctx->state[3], out + 24);
CRY_WRITE64_BE(ctx->state[4], out + 32);
CRY_WRITE64_BE(ctx->state[5], out + 40);
if (ctx->is384 == 0) {
CRY_WRITE64_BE(ctx->state[6], out + 48);
CRY_WRITE64_BE(ctx->state[7], out + 56);
}
}
void cry_sha512(unsigned char *out, const unsigned char *data, size_t len)
{
cry_sha512_ctx ctx;
cry_sha512_init(&ctx, 0);
cry_sha512_update(&ctx, data, len);
cry_sha512_digest(&ctx, out);
cry_sha512_clear(&ctx);
}
void cry_sha384(unsigned char *out, const unsigned char *data, size_t len)
{
cry_sha512_ctx ctx;
cry_sha512_init(&ctx, 1);
cry_sha512_update(&ctx, data, len);
cry_sha512_digest(&ctx, out);
cry_sha512_clear(&ctx);
}
......@@ -3,4 +3,5 @@
objects-y := \
md5.o \
sha1.o \
sha256.o
\ No newline at end of file
sha256.o \
sha512.o
\ No newline at end of file
......@@ -136,15 +136,21 @@
(v1) ^= (v2); \
(v2) ^= (v1); \
(v1) ^= (v2); \
} while (0)
} while (0)
/** Rotate the bits left */
#define CRY_ROTL(val, size, bits) \
((((val))<<(bits)) | (((val))>>(size-(bits))))
#define CRY_ROTL(val, bits, size) \
((val) << bits | ((val) >> ((size) - (bits))))
/** Rotate the bits right */
#define CRY_ROTR(val, bits, size) \
((val) >> bits | ((val) << ((size) - (bits))))
#define CRY_ROTL32(val, bits) CRY_ROTL(val, bits, 32)
#define CRY_ROTR32(val, bits) CRY_ROTR(val, bits, 32)
#define CRY_ROTL64(val, bits) CRY_ROTL(val, bits, 64)
#define CRY_ROTR64(val, bits) CRY_ROTR(val, bits, 64)
/** Rotate the bits of a unsigned 32 right. */
#define CRY_ROTL32(val, bits) \
CRY_ROTL(val, 32, bits)
/**
* Modular inverse using Euclid algorithm.
......
......@@ -26,6 +26,7 @@ objects := \
md5_test.o \
sha1_test.o \
sha256_test.o \
sha512_test.o \
ecp_test.o \
elgamal_test.o \
dsa_test.o \
......
#include "test.h"
#include <cry/sha512.h>
struct sha512_param {
size_t len;
unsigned char *data;
unsigned char hash[CRY_SHA512_DIGEST_SIZE];
};
static void param_init(struct sha512_param *par, int argc, char *argv[])
{
memset(par, 0, sizeof(*par));
par->len = strlen(argv[0]) >> 1;
par->data = malloc(par->len);
par->len = raw_init(par->data, par->len, argv[0]);
raw_init(par->hash, CRY_SHA512_DIGEST_SIZE, argv[1]);
}
static void sha384_digest(int argc, char *argv[])
{
struct sha512_param par;
unsigned char out[CRY_SHA512_DIGEST_SIZE];
param_init(&par, argc, argv);
cry_sha384(out, par.data, par.len);
ASSERT_EQ_BUF(out, par.hash, 48);
free(par.data);
}
static void sha512_digest(int argc, char *argv[])
{
struct sha512_param par;
unsigned char out[CRY_SHA512_DIGEST_SIZE];
param_init(&par, argc, argv);
cry_sha512(out, par.data, par.len);
ASSERT_EQ_BUF(out, par.hash, CRY_SHA512_DIGEST_SIZE);
free(par.data);
}
static void dispatch(int argc, char *argv[])
{
char *test = *argv;
argv++;
argc--;
ASSERT(argc == 2);
if (strcmp(test, "sha384_digest") == 0)
sha384_digest(argc, argv);
else if (strcmp(test, "sha512_digest") == 0)
sha512_digest(argc, argv);
else
TRACE("Test '%s' not defined\n", test);
}
void sha512_test(void)
{
TRACE("* SHA512 NIST CAVS\n");
func_test("sha512_test.data", dispatch);
TRACE("\n");
}
################################################################################
#
# NIST CAVS Test Vectors
#
################################################################################
################################################################################
# SHA-384 vectors
# p0 data
# p1 out
################################################################################
SHA-384 Test Vector NIST CAVS #1
sha384_digest
NULL
38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b
SHA-384 Test Vector NIST CAVS #2
sha384_digest
ab
fb94d5be118865f6fcbc978b825da82cff188faec2f66cb84b2537d74b4938469854b0ca89e66fa2e182834736629f3d
SHA-384 Test Vector NIST CAVS #3
sha384_digest
7c27
3d80be467df86d63abb9ea1d3f9cb39cd19890e7f2c53a6200bedc5006842b35e820dc4e0ca90ca9b97ab23ef07080fc
SHA-384 Test Vector NIST CAVS #4
sha384_digest
31f5ca
78d54b943421fdf7ba90a7fb9637c2073aa480454bd841d39ff72f4511fc21fb67797b652c0c823229342873d3bef955
SHA-384 Test Vector NIST CAVS #5
sha384_digest
7bdee3f8
8bdafba0777ee446c3431c2d7b1fbb631089f71d2ca417abc1d230e1aba64ec2f1c187474a6f4077d372c14ad407f99a
SHA-384 Test Vector NIST CAVS #6
sha384_digest
8f05604915
504e414bf1db1060f14c8c799e25b1e0c4dcf1504ebbd129998f0ae283e6de86e0d3c7e879c73ec3b1836c3ee89c2649
SHA-384 Test Vector NIST CAVS #7
sha384_digest
665da6eda214
4c022f112010908848312f8b8f1072625fd5c105399d562ea1d56130619a7eac8dfc3748fd05ee37e4b690be9daa9980
SHA-384 Test Vector NIST CAVS #8
sha384_digest
7f46ce506d593c4ed53c82edeb602037e0485befbee03f7f930fe532d18ff2a3f5fd6076672c8145a1bf40dd94f7abab47c9ae71c234213d2ad1069c2dac0b0ba15257ae672b8245960ae55bd50315c0097daa3a318745788d70d14706910809ca6e396237fe4934fa46f9ce782d66606d8bd6b2d283b1160513ce9c24e9f084b97891f99d4cdefc169a029e431ca772ba1bba426fce6f01d8e286014e5acc66b799e4db62bd4783322f8a32ff78e0de3957df50ce10871f4e0680df4e8ca3960af9bc6f4efa8eb3962d18f474eb178c3265cc46b8f2ff5ab1a7449fea297dfcfabfa01f28abbb7289bb354b691b5664ec6d098af51be19947ec5ba7ebd66380d1141953ba78d4aa5401679fa7b0a44db1981f864d3535c45afe4c61183d5b0ad51fae71ca07e34240283959f7530a32c70d95a088e501c230059f333b0670825009e7e22103ef22935830df1fac8ef877f5f3426dd54f7d1128dd871ad9a7d088f94c0e8712013295b8d69ae7623b880978c2d3c6ad26dc478f8dc47f5c0adcc618665dc3dc205a9071b2f2191e16cac5bd89bb59148fc719633752303aa08e518dbc389f0a5482caaa4c507b8729a6f3edd061efb39026cecc6399f51971cf7381d605e144a5928c8c2d1ad7467b05da2f202f4f3234e1aff19a0198a28685721c3d2d52311c721e3fdcbaf30214cdc3acff8c433880e104fb63f2df7ce69a97857819ba7ac00ac8eae1969764fde8f68cf8e0916d7e0c151147d4944f99f42ae50f30e1c79a42d2b6c5188d133d3cbbf69094027b354b295ccd0f7dc5a87d73638bd98ebfb00383ca0fa69cb8dcb35a12510e5e07ad8789047d0b63841a1bb928737e8b0a0c33254f47aa8bfbe3341a09c2b76dbcefa67e30df300d34f7b8465c4f869e51b6bcfe6cf68b238359a645036bf7f63f02924e087ce7457e483b6025a859903cb484574aa3b12cf946f32127d537c33bee3141b5db96d10a148c50ae045f287210757710d6846e04b202f79e87dd9a56bc6da15f84a77a7f63935e1dee00309cd276a8e7176cb04da6bb0e9009534438732cb42d008008853d38d19beba46e61006e30f7efd1bc7c2906b024e4ff898a1b58c448d68b43c6ab63f34f85b3ac6aa4475867e51b583844cb23829f4b30f4bdd817d88e2ef3e7b4fc0a624395b05ec5e8686082b24d29fef2b0d3c29e031d5f94f504b1d3df9361eb5ffbadb242e66c39a8094cfe62f85f639f3fd65fc8ae0c74a8f4c6e1d070b9183a434c722caaa0225f8bcd68614d6f0738ed62f8484ec96077d155c08e26c46be262a73e3551698bd70d8d5610cf37c4c306eed04ba6a040a9c3e6d7e15e8acda17f477c2484cf5c56b813313927be8387b1024f995e98fc87f1029091c01424bdc2b296c2eadb7d25b3e762a2fd0c2dcd1727ddf91db97c5984305265f3695a7f5472f2d72c94d68c27914f14f82aa8dd5fe4e2348b0ca967a3f98626a091552f5d0ffa2bf10350d23c996256c01fdeffb2c2c612519869f877e4929c6e95ff15040f1485e22ed14119880232fef3b57b3848f15b1766a5552879df8f06
cba9e3eb12a6f83db11e8a6ff40d1049854ee094416bc527fea931d8585428a8ed6242ce81f6769b36e2123a5c23483e
################################################################################
# SHA-512 vectors
# p0 data
# p1 out
################################################################################
SHA-512 Test Vector NIST CAVS #1
sha512_digest
NULL
cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
SHA-512 Test Vector NIST CAVS #2
sha512_digest
8f
e4cd2d19931b5aad9c920f45f56f6ce34e3d38c6d319a6e11d0588ab8b838576d6ce6d68eea7c830de66e2bd96458bfa7aafbcbec981d4ed040498c3dd95f22a
SHA-512 Test Vector NIST CAVS #3
sha512_digest
e724
7dbb520221a70287b23dbcf62bfc1b73136d858e86266732a7fffa875ecaa2c1b8f673b5c065d360c563a7b9539349f5f59bef8c0c593f9587e3cd50bb26a231
SHA-512 Test Vector NIST CAVS #4
sha512_digest
de4c90
33ce98281045a5c4c9df0363d8196f1d7dfcd5ee46ac89776fd8a4344c12f123a66788af5bd41ceff1941aa5637654b4064c88c14e00465ab79a2fc6c97e1014
SHA-512 Test Vector NIST CAVS #5
sha512_digest
a801e94b
dadb1b5a27f9fece8d86adb2a51879beb1787ff28f4e8ce162cad7fee0f942efcabbf738bc6f797fc7cc79a3a75048cd4c82ca0757a324695bfb19a557e56e2f
SHA-512 Test Vector NIST CAVS #6
sha512_digest
94390d3502
b6175c4c4cccf69e0ce5f0312010886ea6b34d43673f942ae42483f9cbb7da817de4e11b5d58e25a3d9bd721a22cdffe1c40411cc45df1911fa5506129b69297
SHA-512 Test Vector NIST CAVS #7
sha512_digest
49297dd63e5f
1fcc1e6f6870859d11649f5e5336a9cd16329c029baf04d5a6edf257889a2e9522b497dd656bb402da461307c4ee382e2e89380c8e6e6e7697f1e439f650fa94
SHA-512 Test Vector NIST CAVS #8
sha512_digest
990d1ae71a62d7bda9bfdaa1762a68d296eee72a4cd946f287a898fbabc002ea941fd8d4d991030b4d27a637cce501a834bb95eab1b7889a3e784c7968e67cbf552006b206b68f76d9191327524fcc251aeb56af483d10b4e0c6c5e599ee8c0fe4faeca8293844a8547c6a9a90d093f2526873a19ad4a5e776794c68c742fb834793d2dfcb7fea46c63af4b70fd11cb6e41834e72ee40edb067b292a794990c288d5007e73f349fb383af6a756b8301ad6e5e0aa8cd614399bb3a452376b1575afa6bdaeaafc286cb064bb91edef97c632b6c1113d107fa93a0905098a105043c2f05397f702514439a08a9e5ddc196100721d45c8fc17d2ed659376f8a00bd5cb9a0860e26d8a29d8d6aaf52de97e9346033d6db501a35dbbaf97c20b830cd2d18c2532f3a59cc497ee64c0e57d8d060e5069b28d86edf1adcf59144b221ce3ddaef134b3124fbc7dd000240eff0f5f5f41e83cd7f5bb37c9ae21953fe302b0f6e8b68fa91c6ab99265c64b2fd9cd4942be04321bb5d6d71932376c6f2f88e02422ba6a5e2cb765df93fd5dd0728c6abdaf03bce22e0678a544e2c3636f741b6f4447ee58a8fc656b43ef817932176adbfc2e04b2c812c273cd6cbfa4098f0be036a34221fa02643f5ee2e0b38135f2a18ecd2f16ebc45f8eb31b8ab967a1567ee016904188910861ca1fa205c7adaa194b286893ffe2f4fbe0384c2aef72a4522aeafd3ebc71f9db71eeeef86c48394a1c86d5b36c352cc33a0a2c800bc99e62fd65b3a2fd69e0b53996ec13d8ce483ce9319efd9a85acefabdb5342226febb83fd1daf4b24265f50c61c6de74077ef89b6fecf9f29a1f871af1e9f89b2d345cda7499bd45c42fa5d195a1e1a6ba84851889e730da3b2b916e96152ae0c92154b49719841db7e7cc707ba8a5d7b101eb4ac7b629bb327817910fff61580b59aab78182d1a2e33473d05b00b170b29e331870826cfe45af206aa7d0246bbd8566ca7cfb2d3c10bfa1db7dd48dd786036469ce7282093d78b5e1a5b0fc81a54c8ed4ceac1e5305305e78284ac276f5d7862727aff246e17addde50c670028d572cbfc0be2e4f8b2eb28fa68ad7b4c6c2a239c460441bfb5ea049f23b08563b4e47729a59e5986a61a6093dbd54f8c36ebe87edae01f251cb060ad1364ce677d7e8d5a4a4ca966a7241cc360bc2acb280e5f9e9c1b032ad6a180a35e0c5180b9d16d026c865b252098cc1d99ba7375ca31c7702c0d943d5e3dd2f6861fa55bd46d94b67ed3e52eccd8dd06d968e01897d6de97ed3058d91dd
8e4bc6f8b8c60fe4d68c61d9b159c8693c3151c46749af58da228442d927f23359bd6ccd6c2ec8fa3f00a86cecbfa728e1ad60b821ed22fcd309ba91a4138bc9
......@@ -18,6 +18,7 @@ void rsa_test(void);
void md5_test(void);
void sha1_test(void);
void sha256_test(void);
void sha512_test(void);
void ecp_test(void);
void elgamal_test(void);
void dsa_test(void);
......@@ -54,6 +55,7 @@ struct sub_test g_tests[] = {
SUB_TEST(md5),
SUB_TEST(sha1),
SUB_TEST(sha256),
SUB_TEST(sha512),
SUB_TEST(ecp),
SUB_TEST(elgamal),
SUB_TEST(dsa),
......