summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/crypto_tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/crypto/crypto_tests')
-rw-r--r--src/lib/crypto/crypto_tests/aes-test.c8
-rw-r--r--src/lib/crypto/crypto_tests/camellia-test.c3
-rw-r--r--src/lib/crypto/crypto_tests/t_cf2.c30
-rw-r--r--src/lib/crypto/crypto_tests/t_cksum.c8
-rw-r--r--src/lib/crypto/crypto_tests/t_cksums.c2
-rw-r--r--src/lib/crypto/crypto_tests/t_cmac.c8
-rw-r--r--src/lib/crypto/crypto_tests/t_crc.c7
-rw-r--r--src/lib/crypto/crypto_tests/t_cts.c7
-rw-r--r--src/lib/crypto/crypto_tests/t_encrypt.c7
-rw-r--r--src/lib/crypto/crypto_tests/t_hmac.c8
-rw-r--r--src/lib/crypto/crypto_tests/t_kperf.c3
-rw-r--r--src/lib/crypto/crypto_tests/t_mdcksum.c8
-rw-r--r--src/lib/crypto/crypto_tests/t_mddriver.c25
-rw-r--r--src/lib/crypto/crypto_tests/t_nfold.c9
-rw-r--r--src/lib/crypto/crypto_tests/t_pkcs5.c8
-rw-r--r--src/lib/crypto/crypto_tests/t_prf.c7
-rw-r--r--src/lib/crypto/crypto_tests/t_prng.c7
-rw-r--r--src/lib/crypto/crypto_tests/t_short.c7
-rw-r--r--src/lib/crypto/crypto_tests/t_str2key.c7
-rw-r--r--src/lib/crypto/crypto_tests/vectors.c8
20 files changed, 84 insertions, 93 deletions
diff --git a/src/lib/crypto/crypto_tests/aes-test.c b/src/lib/crypto/crypto_tests/aes-test.c
index b86b5ab8cb..1ed033b112 100644
--- a/src/lib/crypto/crypto_tests/aes-test.c
+++ b/src/lib/crypto/crypto_tests/aes-test.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/aes-test.c */
/*
- * lib/crypto/aes/aes-test.c
- *
* Copyright (C) 2002 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,8 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
- *
+ */
+
+/*
* Subset of NIST tests for AES; specifically, the variable-key and
* variable-text tests for 128- and 256-bit keys.
*/
diff --git a/src/lib/crypto/crypto_tests/camellia-test.c b/src/lib/crypto/crypto_tests/camellia-test.c
index a845873524..9975d4d261 100644
--- a/src/lib/crypto/crypto_tests/camellia-test.c
+++ b/src/lib/crypto/crypto_tests/camellia-test.c
@@ -1,6 +1,5 @@
+/* lib/crypto/crypto_tests/camellia-test.c */
/*
- * lib/crypto/camellia/camellia-test.c
- *
* Copyright (c) 2009
* NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved.
*
diff --git a/src/lib/crypto/crypto_tests/t_cf2.c b/src/lib/crypto/crypto_tests/t_cf2.c
index 550192c44d..3254e972af 100644
--- a/src/lib/crypto/crypto_tests/t_cf2.c
+++ b/src/lib/crypto/crypto_tests/t_cf2.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_cf2.c */
/*
- * lib/crypto/t_cf2.c
- *
* Copyright (C) 2004, 2009 by the Massachusetts Institute of Technology.
* All rights reserved.
*
@@ -23,18 +22,23 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
+ */
+
+/*
+ * This file contains tests for the KRB-FX-CF2 code in Kerberos, based on the
+ * PRF regression tests. It reads an input file, and writes an output file.
+ * It is assumed that the output file will be diffed against expected output to
+ * see whether regression tests pass. The input file is a very primitive
+ * format.
+ *
+ * Line 1: enctype
+ * Line 2: key to pass to string2key; also used as salt
+ * Line 3: second key to pass to string2key
+ * Line 4: pepper1
+ * Line 5: pepper2
*
- * This file contains tests for theKRB-FX-CF2 code in Kerberos, based
- *on the PRF regression tests. It reads an input file, and writes an
- *output file. It is assumed that the output file will be diffed
- *against expected output to see whether regression tests pass. The
- *input file is a very primitive format.
- *First line: enctype
- *second line: key to pass to string2key; also used as salt
- *Third line: second key to pass to string2key
- *fourth line: pepper1
- *fifth line: pepper2
- *scanf is used to read the file, so interior spaces are not permitted. The program outputs the hex bytes of the key.
+ * scanf is used to read the file, so interior spaces are not permitted. The
+ * program outputs the hex bytes of the key.
*/
#include <krb5.h>
diff --git a/src/lib/crypto/crypto_tests/t_cksum.c b/src/lib/crypto/crypto_tests/t_cksum.c
index c4f22bcd74..2200fe76e0 100644
--- a/src/lib/crypto/crypto_tests/t_cksum.c
+++ b/src/lib/crypto/crypto_tests/t_cksum.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_cksum.c */
/*
- * lib/crypto/md5/t_cksum.c
- *
* Copyright 1995 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,12 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
*/
-/*
- * t_cksum.c - Test checksum and checksum compatability for rsa-md[4,5]-des
- */
+/* Test checksum and checksum compatability for rsa-md[4,5]-des. */
#include "k5-int.h"
diff --git a/src/lib/crypto/crypto_tests/t_cksums.c b/src/lib/crypto/crypto_tests/t_cksums.c
index 868d91beed..7e9df72f28 100644
--- a/src/lib/crypto/crypto_tests/t_cksums.c
+++ b/src/lib/crypto/crypto_tests/t_cksums.c
@@ -1,5 +1,5 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* lib/crypto/crypto-tests/t_cksums.c - Test known checksum results */
+/* lib/crypto/crypto_tests/t_cksums.c - Test known checksum results */
/*
* Copyright (C) 2010 by the Massachusetts Institute of Technology.
* All rights reserved.
diff --git a/src/lib/crypto/crypto_tests/t_cmac.c b/src/lib/crypto/crypto_tests/t_cmac.c
index c140f24f5a..7a4b3aeee9 100644
--- a/src/lib/crypto/crypto_tests/t_cmac.c
+++ b/src/lib/crypto/crypto_tests/t_cmac.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_cmac.c */
/*
- * lib/crypto/t_cmac.c
- *
* Copyright 2010 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,8 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
- *
+ */
+
+/*
* Test vectors for CMAC. Inputs are taken from RFC 4493 section 4. Outputs
* are changed for the use of Camellia-128 in place of AES-128.
*
diff --git a/src/lib/crypto/crypto_tests/t_crc.c b/src/lib/crypto/crypto_tests/t_crc.c
index 500e020c4b..7161fb0838 100644
--- a/src/lib/crypto/crypto_tests/t_crc.c
+++ b/src/lib/crypto/crypto_tests/t_crc.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_crc.c */
/*
- * lib/crypto/crc32/t_crc.c
- *
* Copyright 2002,2005 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,7 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ */
+
+/*
* Sanity checks for CRC32.
*/
#include <sys/times.h>
diff --git a/src/lib/crypto/crypto_tests/t_cts.c b/src/lib/crypto/crypto_tests/t_cts.c
index 39aef9d84c..f2a3012b2e 100644
--- a/src/lib/crypto/crypto_tests/t_cts.c
+++ b/src/lib/crypto/crypto_tests/t_cts.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_cts.c */
/*
- * lib/crypto/vectors.c
- *
* Copyright 2001, 2007 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,7 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ */
+
+/*
*
* Test vectors for crypto code, matching data submitted for inclusion
* with RFC1510bis.
diff --git a/src/lib/crypto/crypto_tests/t_encrypt.c b/src/lib/crypto/crypto_tests/t_encrypt.c
index db75e22a86..580120b8fb 100644
--- a/src/lib/crypto/crypto_tests/t_encrypt.c
+++ b/src/lib/crypto/crypto_tests/t_encrypt.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_encrypt.c */
/*
- * lib/crypto/t_encrypt.c
- *
* Copyright 2001, 2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,7 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ */
+
+/*
*
* <<< Description >>>
*/
diff --git a/src/lib/crypto/crypto_tests/t_hmac.c b/src/lib/crypto/crypto_tests/t_hmac.c
index 1f5cae5965..02168e5c75 100644
--- a/src/lib/crypto/crypto_tests/t_hmac.c
+++ b/src/lib/crypto/crypto_tests/t_hmac.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_hmac.c */
/*
- * lib/crypto/t_hmac.c
- *
* Copyright 2001,2002 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,8 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
- *
+ */
+
+/*
* Test vectors for HMAC-MD5 and HMAC-SHA1 (placeholder only).
* Tests taken from RFC 2202.
*/
diff --git a/src/lib/crypto/crypto_tests/t_kperf.c b/src/lib/crypto/crypto_tests/t_kperf.c
index a07a364dd2..68956bfaea 100644
--- a/src/lib/crypto/crypto_tests/t_kperf.c
+++ b/src/lib/crypto/crypto_tests/t_kperf.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_kperf.c */
/*
- * lib/crypto/crypto_tests/t_kperf.c
- *
* Copyright (C) 2009 by the Massachusetts Institute of Technology.
* All rights reserved.
*
diff --git a/src/lib/crypto/crypto_tests/t_mdcksum.c b/src/lib/crypto/crypto_tests/t_mdcksum.c
index 0b8a4fe197..2ed78a1d21 100644
--- a/src/lib/crypto/crypto_tests/t_mdcksum.c
+++ b/src/lib/crypto/crypto_tests/t_mdcksum.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_mdcksum.c */
/*
- * lib/crypto/md5/t_cksum.c
- *
* Copyright 1995 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,12 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
*/
-/*
- * t_cksum.c - Test checksum and checksum compatability for rsa-md[4,5]-des
- */
+/* Test checksum and checksum compatability for rsa-md[4,5]-des. */
#ifndef MD
#define MD 5
diff --git a/src/lib/crypto/crypto_tests/t_mddriver.c b/src/lib/crypto/crypto_tests/t_mddriver.c
index 59b4a48de9..ad65d03156 100644
--- a/src/lib/crypto/crypto_tests/t_mddriver.c
+++ b/src/lib/crypto/crypto_tests/t_mddriver.c
@@ -1,19 +1,18 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* MDDRIVER.C - test driver for MD2, MD4 and MD5
+/* lib/crypto/crypto_tests/t_mddriver.c - test driver for MD2, MD4 and MD5 */
+/*
+ * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
+ * rights reserved.
+ *
+ * RSA Data Security, Inc. makes no representations concerning either
+ * the merchantability of this software or the suitability of this
+ * software for any particular purpose. It is provided "as is"
+ * without express or implied warranty of any kind.
+ *
+ * These notices must be retained in any copies of any part of this
+ * documentation and/or software.
*/
-/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
- rights reserved.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
-*/
-
/* The following makes MD default to MD5 if it has not already been
defined with C compiler flags.
*/
diff --git a/src/lib/crypto/crypto_tests/t_nfold.c b/src/lib/crypto/crypto_tests/t_nfold.c
index f9e36e57f4..6fa644a29b 100644
--- a/src/lib/crypto/crypto_tests/t_nfold.c
+++ b/src/lib/crypto/crypto_tests/t_nfold.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_nfold.c - Test nfold implementation correctness */
/*
- * lib/crypto/t_nfold.c
- *
* Copyright 1988, 1990 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,12 +22,6 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
- *
- * Program to test the correctness of nfold implementation.
- *
- * exit returns 0 ==> success
- * -1 ==> error
*/
#include <stdio.h>
diff --git a/src/lib/crypto/crypto_tests/t_pkcs5.c b/src/lib/crypto/crypto_tests/t_pkcs5.c
index 34d884ff5f..7ab078df7a 100644
--- a/src/lib/crypto/crypto_tests/t_pkcs5.c
+++ b/src/lib/crypto/crypto_tests/t_pkcs5.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_pkcs5.c */
/*
- * lib/crypto/t_pkcs5.c
- *
* Copyright 2002 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,11 +22,10 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
- *
- * Test vectors for PBKDF2 (from PKCS #5v2), based on RFC 3211.
*/
+/* Test vectors for PBKDF2 (from PKCS #5v2), based on RFC 3211. */
+
#include <assert.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/lib/crypto/crypto_tests/t_prf.c b/src/lib/crypto/crypto_tests/t_prf.c
index d9ac3d8b90..83864274ac 100644
--- a/src/lib/crypto/crypto_tests/t_prf.c
+++ b/src/lib/crypto/crypto_tests/t_prf.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_prf.c */
/*
- * lib/crypto/t_prf.c
- *
* Copyright (C) 2004 by the Massachusetts Institute of Technology.
* All rights reserved.
*
@@ -23,7 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ */
+
+/*
* This file contains tests for the PRF code in Kerberos. IT reads an
* input file, and writes an output file. It is assumed that the
* output file will be diffed against expected output to see whether
diff --git a/src/lib/crypto/crypto_tests/t_prng.c b/src/lib/crypto/crypto_tests/t_prng.c
index 634667ab61..196c41f1be 100644
--- a/src/lib/crypto/crypto_tests/t_prng.c
+++ b/src/lib/crypto/crypto_tests/t_prng.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_prng.c */
/*
- * lib/crypto/t_prng.c
- *
* Copyright (C) 2001 by the Massachusetts Institute of Technology.
* All rights reserved.
*
@@ -23,7 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ */
+
+/*
* This file contains tests for the PRNG code in Kerberos. It reads
* an input file, and writes an output file. It is assumed that the
* output file will be diffed against expected output to see whether
diff --git a/src/lib/crypto/crypto_tests/t_short.c b/src/lib/crypto/crypto_tests/t_short.c
index 7f9f3ad679..295206651a 100644
--- a/src/lib/crypto/crypto_tests/t_short.c
+++ b/src/lib/crypto/crypto_tests/t_short.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_short.c */
/*
- * lib/crypto/crypto_tests/t_short.c
- *
* Copyright (C) 2009 by the Massachusetts Institute of Technology.
* All rights reserved.
*
@@ -23,7 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ */
+
+/*
* Tests the outcome of decrypting overly short tokens. This program can be
* run under a tool like valgrind to detect bad memory accesses; when run
* normally by the test suite, it verifies that each operation returns
diff --git a/src/lib/crypto/crypto_tests/t_str2key.c b/src/lib/crypto/crypto_tests/t_str2key.c
index 79e0e855fc..85a7a9f25e 100644
--- a/src/lib/crypto/crypto_tests/t_str2key.c
+++ b/src/lib/crypto/crypto_tests/t_str2key.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/t_str2key.c */
/*
- * lib/crypto/crypto_tests/t_str2key.c
- *
* Copyright (C) 2010 by the Massachusetts Institute of Technology.
* All rights reserved.
*
@@ -23,7 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ */
+
+/*
*
* String-to-key test vectors
*/
diff --git a/src/lib/crypto/crypto_tests/vectors.c b/src/lib/crypto/crypto_tests/vectors.c
index 8e97287653..482d2de200 100644
--- a/src/lib/crypto/crypto_tests/vectors.c
+++ b/src/lib/crypto/crypto_tests/vectors.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* lib/crypto/crypto_tests/vectors.c */
/*
- * lib/crypto/vectors.c
- *
* Copyright 2001 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
@@ -23,8 +22,9 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
- *
+ */
+
+/*
* Test vectors for crypto code, matching data submitted for inclusion
* with RFC1510bis.
*