Include cmptest.h in all tests

This commit is contained in:
Frank Denis
2013-01-20 15:55:10 -08:00
parent 27b19131ae
commit 97d651b3a3
31 changed files with 93 additions and 0 deletions
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_auth_hmacsha512256.h"
#define TEST_NAME "auth"
#include "cmptest.h"
/* "Test Case 2" from RFC 4231 */
unsigned char key[32] = "Jefe";
unsigned char c[28] = "what do ya want for nothing?";
+3
View File
@@ -3,6 +3,9 @@
#include <stdio.h>
#include "crypto_auth_hmacsha256.h"
#define TEST_NAME "auth2"
#include "cmptest.h"
unsigned char key[32] = {
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08
,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10
+3
View File
@@ -3,6 +3,9 @@
#include <stdio.h>
#include "crypto_auth_hmacsha256.h"
#define TEST_NAME "auth3"
#include "cmptest.h"
unsigned char key[32] = {
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08
,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10
+3
View File
@@ -4,6 +4,9 @@
#include "randombytes.h"
#include "windows/windows-quirks.h"
#define TEST_NAME "auth5"
#include "cmptest.h"
unsigned char key[32];
unsigned char c[10000];
unsigned char a[32];
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_box_curve25519xsalsa20poly1305.h"
#define TEST_NAME "box"
#include "cmptest.h"
unsigned char alicesk[32] = {
0x77,0x07,0x6d,0x0a,0x73,0x18,0xa5,0x7d
,0x3c,0x16,0xc1,0x72,0x51,0xb2,0x66,0x45
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_box_curve25519xsalsa20poly1305.h"
#define TEST_NAME "box2"
#include "cmptest.h"
unsigned char bobsk[32] = {
0x5d,0xab,0x08,0x7e,0x62,0x4a,0x8a,0x4b
,0x79,0xe1,0x7f,0x8b,0x83,0x80,0x0e,0xe6
+3
View File
@@ -2,6 +2,9 @@
#include "crypto_box.h"
#include "randombytes.h"
#define TEST_NAME "box7"
#include "cmptest.h"
unsigned char alicesk[crypto_box_SECRETKEYBYTES];
unsigned char alicepk[crypto_box_PUBLICKEYBYTES];
unsigned char bobsk[crypto_box_SECRETKEYBYTES];
+3
View File
@@ -4,6 +4,9 @@
#include "randombytes.h"
#include "windows/windows-quirks.h"
#define TEST_NAME "box8"
#include "cmptest.h"
unsigned char alicesk[crypto_box_SECRETKEYBYTES];
unsigned char alicepk[crypto_box_PUBLICKEYBYTES];
unsigned char bobsk[crypto_box_SECRETKEYBYTES];
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_core_hsalsa20.h"
#define TEST_NAME "core1"
#include "cmptest.h"
unsigned char shared[32] = {
0x4a,0x5d,0x9d,0x5b,0xa4,0xce,0x2d,0xe1
,0x72,0x8e,0x3b,0xf4,0x80,0x35,0x0f,0x25
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_core_hsalsa20.h"
#define TEST_NAME "core2"
#include "cmptest.h"
unsigned char firstkey[32] = {
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
+3
View File
@@ -2,6 +2,9 @@
#include "crypto_core_salsa20.h"
#include "crypto_hash_sha256.h"
#define TEST_NAME "core3"
#include "cmptest.h"
unsigned char secondkey[32] = {
0xdc,0x90,0x8d,0xda,0x0b,0x93,0x44,0xa9
,0x53,0x62,0x9b,0x73,0x38,0x20,0x77,0x88
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_core_salsa20.h"
#define TEST_NAME "core4"
#include "cmptest.h"
unsigned char k[32] = {
1, 2, 3, 4, 5, 6, 7, 8
, 9, 10, 11, 12, 13, 14, 15, 16
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_core_hsalsa20.h"
#define TEST_NAME "core5"
#include "cmptest.h"
unsigned char k[32] = {
0xee,0x30,0x4f,0xca,0x27,0x00,0x8d,0x8c
,0x12,0x6f,0x90,0x02,0x79,0x01,0xd8,0x0f
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_core_salsa20.h"
#define TEST_NAME "core6"
#include "cmptest.h"
unsigned char k[32] = {
0xee,0x30,0x4f,0xca,0x27,0x00,0x8d,0x8c
,0x12,0x6f,0x90,0x02,0x79,0x01,0xd8,0x0f
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_hash.h"
#define TEST_NAME "hash"
#include "cmptest.h"
unsigned char x[8] = "testing\n";
unsigned char h[crypto_hash_BYTES];
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_hash_sha512.h"
#define TEST_NAME "hash3"
#include "cmptest.h"
unsigned char x[8] = "testing\n";
unsigned char h[crypto_hash_sha512_BYTES];
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_onetimeauth_poly1305.h"
#define TEST_NAME "onetimeauth"
#include "cmptest.h"
unsigned char rs[32] = {
0xee,0xa6,0xa7,0x25,0x1c,0x1e,0x72,0x91
,0x6d,0x11,0xc2,0xcb,0x21,0x4d,0x3c,0x25
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_onetimeauth_poly1305.h"
#define TEST_NAME "onetimeauth2"
#include "cmptest.h"
unsigned char rs[32] = {
0xee,0xa6,0xa7,0x25,0x1c,0x1e,0x72,0x91
,0x6d,0x11,0xc2,0xcb,0x21,0x4d,0x3c,0x25
+3
View File
@@ -4,6 +4,9 @@
#include "randombytes.h"
#include "windows/windows-quirks.h"
#define TEST_NAME "onetimeauth7"
#include "cmptest.h"
unsigned char key[32];
unsigned char c[10000];
unsigned char a[16];
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_scalarmult_curve25519.h"
#define TEST_NAME "scalarmult"
#include "cmptest.h"
unsigned char alicesk[32] = {
0x77,0x07,0x6d,0x0a,0x73,0x18,0xa5,0x7d
,0x3c,0x16,0xc1,0x72,0x51,0xb2,0x66,0x45
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_scalarmult_curve25519.h"
#define TEST_NAME "scalarmult2"
#include "cmptest.h"
unsigned char bobsk[32] = {
0x5d,0xab,0x08,0x7e,0x62,0x4a,0x8a,0x4b
,0x79,0xe1,0x7f,0x8b,0x83,0x80,0x0e,0xe6
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_scalarmult_curve25519.h"
#define TEST_NAME "scalarmult5"
#include "cmptest.h"
unsigned char alicesk[32] = {
0x77,0x07,0x6d,0x0a,0x73,0x18,0xa5,0x7d
,0x3c,0x16,0xc1,0x72,0x51,0xb2,0x66,0x45
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_scalarmult_curve25519.h"
#define TEST_NAME "scalarmult6"
#include "cmptest.h"
unsigned char bobsk[32] = {
0x5d,0xab,0x08,0x7e,0x62,0x4a,0x8a,0x4b
,0x79,0xe1,0x7f,0x8b,0x83,0x80,0x0e,0xe6
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_secretbox_xsalsa20poly1305.h"
#define TEST_NAME "secretbox"
#include "cmptest.h"
unsigned char firstkey[32] = {
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_secretbox_xsalsa20poly1305.h"
#define TEST_NAME "secretbox2"
#include "cmptest.h"
unsigned char firstkey[32] = {
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
+3
View File
@@ -2,6 +2,9 @@
#include "crypto_secretbox.h"
#include "randombytes.h"
#define TEST_NAME "secretbox7"
#include "cmptest.h"
unsigned char k[crypto_secretbox_KEYBYTES];
unsigned char n[crypto_secretbox_NONCEBYTES];
unsigned char m[10000];
+3
View File
@@ -4,6 +4,9 @@
#include "randombytes.h"
#include "windows/windows-quirks.h"
#define TEST_NAME "secretbox8"
#include "cmptest.h"
unsigned char k[crypto_secretbox_KEYBYTES];
unsigned char n[crypto_secretbox_NONCEBYTES];
unsigned char m[10000];
+3
View File
@@ -2,6 +2,9 @@
#include "crypto_stream_xsalsa20.h"
#include "crypto_hash_sha256.h"
#define TEST_NAME "stream"
#include "cmptest.h"
unsigned char firstkey[32] = {
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
+3
View File
@@ -2,6 +2,9 @@
#include "crypto_stream_salsa20.h"
#include "crypto_hash_sha256.h"
#define TEST_NAME "stream2"
#include "cmptest.h"
unsigned char secondkey[32] = {
0xdc,0x90,0x8d,0xda,0x0b,0x93,0x44,0xa9
,0x53,0x62,0x9b,0x73,0x38,0x20,0x77,0x88
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_stream_xsalsa20.h"
#define TEST_NAME "stream3"
#include "cmptest.h"
unsigned char firstkey[32] = {
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
+3
View File
@@ -1,6 +1,9 @@
#include <stdio.h>
#include "crypto_stream_xsalsa20.h"
#define TEST_NAME "stream4"
#include "cmptest.h"
unsigned char firstkey[32] = {
0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7