summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrrelyea%redhat.com <devnull@localhost>2013-01-25 18:10:55 +0000
committerrrelyea%redhat.com <devnull@localhost>2013-01-25 18:10:55 +0000
commit5131107cab917fde3bef0db82423d8c295029b0c (patch)
tree28224cc86936f8e3ddce2ffdfabe66a5c4f1373b
parent33bb867c3a09b94ad3f4e03316fb31aff89a9fa7 (diff)
downloadnss-hg-5131107cab917fde3bef0db82423d8c295029b0c.tar.gz
Bug 373108 Test cases for CTS and GCM
-rw-r--r--security/nss/cmd/bltest/blapitest.c157
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_0.txt28
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_1.txt28
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_2.txt28
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_tests_source.txt199
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/ciphertext02
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/ciphertext12
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/ciphertext22
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/iv01
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/iv11
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/iv21
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/key01
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/key11
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/key21
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/mktst.sh9
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/plaintext02
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/plaintext12
-rw-r--r--security/nss/cmd/bltest/tests/aes_ctr/plaintext22
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad00
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad10
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad100
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad110
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad121
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad131
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad141
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad21
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad31
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad41
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad50
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad60
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad71
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad81
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/aad91
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext12
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext101
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext112
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext122
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext132
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext142
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext22
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext32
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext42
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext51
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext62
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext72
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext82
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/ciphertext92
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv0bin0 -> 12 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv11
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv10bin0 -> 12 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv111
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv121
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv131
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv141
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv21
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv31
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv41
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv5bin0 -> 12 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv61
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv71
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv81
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/iv91
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key0bin0 -> 16 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key11
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key10bin0 -> 32 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key111
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key121
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key131
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key141
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key21
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key31
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key41
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key5bin0 -> 24 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key61
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key71
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key81
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/key91
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/mktst.sh13
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext0bin0 -> 16 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext11
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext10bin0 -> 16 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext111
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext121
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext131
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext141
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext21
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext31
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext41
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext5bin0 -> 16 bytes
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext61
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext71
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext81
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/plaintext91
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test0.txt14
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test1.txt23
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test10.txt14
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test11.txt23
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test12.txt26
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test13.txt28
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test14.txt31
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test2.txt26
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test3.txt28
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test4.txt31
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test5.txt14
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test6.txt23
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test7.txt26
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test8.txt28
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test9.txt31
-rw-r--r--security/nss/cmd/bltest/tests/aes_gcm/test_source.txt438
112 files changed, 1345 insertions, 13 deletions
diff --git a/security/nss/cmd/bltest/blapitest.c b/security/nss/cmd/bltest/blapitest.c
index fa2f53eec..a776c9eae 100644
--- a/security/nss/cmd/bltest/blapitest.c
+++ b/security/nss/cmd/bltest/blapitest.c
@@ -19,6 +19,7 @@
#include "nspr.h"
#include "secport.h"
#include "secoid.h"
+#include "nssutil.h"
#ifdef NSS_ENABLE_ECC
#include "ecl-curve.h"
@@ -105,6 +106,7 @@ static void Usage()
PRINTUSAGE("", "-p", "do performance test");
PRINTUSAGE("", "-4", "run test in multithread mode. th_num number of parallel threads");
PRINTUSAGE("", "-5", "run test for specified time interval(in seconds)");
+ PRINTUSAGE("", "--aad", "File with contains additional auth data");
PRINTUSAGE("(rsa)", "-e", "rsa public exponent");
PRINTUSAGE("(rc5)", "-r", "number of rounds");
PRINTUSAGE("(rc5)", "-w", "wordsize (32 or 64)");
@@ -120,6 +122,7 @@ static void Usage()
PRINTUSAGE("", "-p", "do performance test");
PRINTUSAGE("", "-4", "run test in multithread mode. th_num number of parallel threads");
PRINTUSAGE("", "-5", "run test for specified time interval(in seconds)");
+ PRINTUSAGE("", "--aad", "File with contains additional auth data");
fprintf(stderr, "\n");
PRINTUSAGE(progName, "-H -m mode", "Hash a buffer");
PRINTUSAGE("", "", "[-i plaintext] [-o hash]");
@@ -641,6 +644,9 @@ typedef enum {
#endif
bltestAES_ECB, /* . */
bltestAES_CBC, /* . */
+ bltestAES_CTS, /* . */
+ bltestAES_CTR, /* . */
+ bltestAES_GCM, /* . */
bltestCAMELLIA_ECB, /* . */
bltestCAMELLIA_CBC, /* . */
bltestSEED_ECB, /* SEED algorithm */
@@ -675,6 +681,9 @@ static char *mode_strings[] =
#endif
"aes_ecb",
"aes_cbc",
+ "aes_cts",
+ "aes_ctr",
+ "aes_gcm",
"camellia_ecb",
"camellia_cbc",
"seed_ecb",
@@ -702,6 +711,12 @@ typedef struct
typedef struct
{
+ bltestSymmKeyParams sk; /* must be first */
+ bltestIO aad;
+} bltestAuthSymmKeyParams;
+
+typedef struct
+{
bltestIO key;
bltestIO iv;
int rounds;
@@ -748,6 +763,7 @@ typedef union
{
bltestIO key;
bltestSymmKeyParams sk;
+ bltestAuthSymmKeyParams ask;
bltestRC5Params rc5;
bltestRSAParams rsa;
bltestDSAParams dsa;
@@ -801,6 +817,27 @@ is_symmkeyCipher(bltestCipherMode mode)
}
PRBool
+is_authCipher(bltestCipherMode mode)
+{
+ /* change as needed! */
+ if (mode == bltestAES_GCM)
+ return PR_TRUE;
+ return PR_FALSE;
+}
+
+
+PRBool
+is_singleShotCipher(bltestCipherMode mode)
+{
+ /* change as needed! */
+ if (mode == bltestAES_GCM)
+ return PR_TRUE;
+ if (mode == bltestAES_CTS)
+ return PR_TRUE;
+ return PR_FALSE;
+}
+
+PRBool
is_pubkeyCipher(bltestCipherMode mode)
{
/* change as needed! */
@@ -838,10 +875,11 @@ cipher_requires_IV(bltestCipherMode mode)
if (mode == bltestDES_CBC || mode == bltestDES_EDE_CBC ||
mode == bltestRC2_CBC ||
#ifdef NSS_SOFTOKEN_DOES_RC5
- mode == bltestRC5_CBC ||
+ mode == bltestRC5_CBC ||
#endif
- mode == bltestAES_CBC || mode == bltestCAMELLIA_CBC||
- mode == bltestSEED_CBC)
+ mode == bltestAES_CBC || mode == bltestAES_CTS ||
+ mode == bltestAES_CTR || mode == bltestAES_GCM ||
+ mode == bltestCAMELLIA_CBC || mode == bltestSEED_CBC)
return PR_TRUE;
return PR_FALSE;
}
@@ -882,9 +920,19 @@ setupIO(PRArenaPool *arena, bltestIO *input, PRFileDesc *file,
switch (input->mode) {
case bltestBase64Encoded:
+ if (in->len == 0) {
+ input->buf.data = NULL;
+ input->buf.len = 0;
+ break;
+ }
rv = atob(in, &input->buf, arena);
break;
case bltestBinary:
+ if (in->len == 0) {
+ input->buf.data = NULL;
+ input->buf.len = 0;
+ break;
+ }
if (in->data[in->len-1] == '\n') --in->len;
if (in->data[in->len-1] == '\r') --in->len;
SECITEM_CopyItem(arena, &input->buf, in);
@@ -1294,20 +1342,44 @@ SECStatus
bltest_aes_init(bltestCipherInfo *cipherInfo, PRBool encrypt)
{
bltestSymmKeyParams *aesp = &cipherInfo->params.sk;
+ bltestAuthSymmKeyParams *gcmp = &cipherInfo->params.ask;
int minorMode;
int i;
int keylen = aesp->key.buf.len;
int blocklen = AES_BLOCK_SIZE;
PRIntervalTime time1, time2;
+ unsigned char *params;
+ int len;
+ CK_AES_CTR_PARAMS ctrParams;
+ CK_GCM_PARAMS gcmParams;
+ params = aesp->iv.buf.data;
switch (cipherInfo->mode) {
case bltestAES_ECB: minorMode = NSS_AES; break;
case bltestAES_CBC: minorMode = NSS_AES_CBC; break;
+ case bltestAES_CTS: minorMode = NSS_AES_CTS; break;
+ case bltestAES_CTR:
+ minorMode = NSS_AES_CTR;
+ ctrParams.ulCounterBits = 32;
+ len = PR_MIN(aesp->iv.buf.len, blocklen);
+ PORT_Memset(ctrParams.cb, 0, blocklen);
+ PORT_Memcpy(ctrParams.cb, aesp->iv.buf.data, len);
+ params = (unsigned char *)&ctrParams;
+ break;
+ case bltestAES_GCM:
+ minorMode = NSS_AES_GCM;
+ gcmParams.pIv = gcmp->sk.iv.buf.data;
+ gcmParams.ulIvLen = gcmp->sk.iv.buf.len;
+ gcmParams.pAAD = gcmp->aad.buf.data;
+ gcmParams.ulAADLen = gcmp->aad.buf.len;
+ gcmParams.ulTagBits = blocklen*8;
+ params = (unsigned char *)&gcmParams;
+ break;
default:
return SECFailure;
}
cipherInfo->cx = (void*)AES_CreateContext(aesp->key.buf.data,
- aesp->iv.buf.data,
+ params,
minorMode, encrypt,
keylen, blocklen);
if (cipherInfo->cxreps > 0) {
@@ -1316,7 +1388,7 @@ bltest_aes_init(bltestCipherInfo *cipherInfo, PRBool encrypt)
TIMESTART();
for (i=0; i<cipherInfo->cxreps; i++) {
dummycx[i] = (void*)AES_CreateContext(aesp->key.buf.data,
- aesp->iv.buf.data,
+ params,
minorMode, encrypt,
keylen, blocklen);
}
@@ -1985,6 +2057,7 @@ SECStatus
cipherInit(bltestCipherInfo *cipherInfo, PRBool encrypt)
{
PRBool restart;
+ int outlen;
switch (cipherInfo->mode) {
case bltestDES_ECB:
case bltestDES_CBC:
@@ -2015,8 +2088,14 @@ cipherInit(bltestCipherInfo *cipherInfo, PRBool encrypt)
break;
case bltestAES_ECB:
case bltestAES_CBC:
- SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf,
- cipherInfo->input.pBuf.len);
+ case bltestAES_CTS:
+ case bltestAES_CTR:
+ case bltestAES_GCM:
+ outlen = cipherInfo->input.pBuf.len;
+ if (cipherInfo->mode == bltestAES_GCM && encrypt) {
+ outlen += 16;
+ }
+ SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, outlen);
return bltest_aes_init(cipherInfo, encrypt);
break;
case bltestCAMELLIA_ECB:
@@ -2367,14 +2446,18 @@ cipherDoOp(bltestCipherInfo *cipherInfo)
dummyOut = PORT_Alloc(maxLen);
if (is_symmkeyCipher(cipherInfo->mode)) {
const unsigned char *input = cipherInfo->input.pBuf.data;
- unsigned int inputLen = PR_MIN(cipherInfo->input.pBuf.len, 16);
+ unsigned int inputLen = is_singleShotCipher(cipherInfo->mode) ?
+ cipherInfo->input.pBuf.len :
+ PR_MIN(cipherInfo->input.pBuf.len, 16);
unsigned char *output = cipherInfo->output.pBuf.data;
unsigned int outputLen = maxLen;
+ unsigned int totalOutputLen = 0;
TIMESTART();
rv = (*cipherInfo->cipher.symmkeyCipher)(cipherInfo->cx,
output, &len, outputLen,
input, inputLen);
CHECKERROR(rv, __LINE__);
+ totalOutputLen += len;
if (cipherInfo->input.pBuf.len > inputLen) {
input += inputLen;
inputLen = cipherInfo->input.pBuf.len - inputLen;
@@ -2384,7 +2467,9 @@ cipherDoOp(bltestCipherInfo *cipherInfo)
output, &len, outputLen,
input, inputLen);
CHECKERROR(rv, __LINE__);
+ totalOutputLen += len;
}
+ cipherInfo->output.pBuf.len = totalOutputLen;
TIMEFINISH(cipherInfo->optime, 1.0);
cipherInfo->repetitions = 0;
if (cipherInfo->repetitionsToPerfom != 0) {
@@ -2490,6 +2575,8 @@ cipherDoOp(bltestCipherInfo *cipherInfo)
SECStatus
cipherFinish(bltestCipherInfo *cipherInfo)
{
+ SECStatus rv = SECSuccess;
+
switch (cipherInfo->mode) {
case bltestDES_ECB:
case bltestDES_CBC:
@@ -2497,8 +2584,11 @@ cipherFinish(bltestCipherInfo *cipherInfo)
case bltestDES_EDE_CBC:
DES_DestroyContext((DESContext *)cipherInfo->cx, PR_TRUE);
break;
+ case bltestAES_GCM:
case bltestAES_ECB:
case bltestAES_CBC:
+ case bltestAES_CTS:
+ case bltestAES_CTR:
AES_DestroyContext((AESContext *)cipherInfo->cx, PR_TRUE);
break;
case bltestCAMELLIA_ECB:
@@ -2539,7 +2629,7 @@ cipherFinish(bltestCipherInfo *cipherInfo)
default:
return SECFailure;
}
- return SECSuccess;
+ return rv;
}
void
@@ -2658,6 +2748,9 @@ print_td:
case bltestDES_EDE_CBC:
case bltestAES_ECB:
case bltestAES_CBC:
+ case bltestAES_CTS:
+ case bltestAES_CTR:
+ case bltestAES_GCM:
case bltestCAMELLIA_ECB:
case bltestCAMELLIA_CBC:
case bltestSEED_ECB:
@@ -2800,10 +2893,15 @@ get_params(PRArenaPool *arena, bltestParams *params,
int index = 0;
#endif
switch (mode) {
+ case bltestAES_GCM:
+ sprintf(filename, "%s/tests/%s/%s%d", testdir, modestr, "aad", j);
+ load_file_data(arena, &params->ask.aad, filename, bltestBinary);
case bltestDES_CBC:
case bltestDES_EDE_CBC:
case bltestRC2_CBC:
case bltestAES_CBC:
+ case bltestAES_CTS:
+ case bltestAES_CTR:
case bltestCAMELLIA_CBC:
case bltestSEED_CBC:
sprintf(filename, "%s/tests/%s/%s%d", testdir, modestr, "iv", j);
@@ -3023,6 +3121,7 @@ blapi_selftest(bltestCipherMode *modes, int numModes, int inoff, int outoff,
sprintf(filename, "%s/tests/%s/%s%d", testdir, modestr,
"ciphertext", j);
load_file_data(arena, &ct, filename, bltestBase64Encoded);
+
#ifdef TRACK_BLTEST_BUG
if (mode == bltestRSA) {
fprintf(stderr, "[%s] Loaded data for self-test #%d\n", __bltDBG, j);
@@ -3408,6 +3507,7 @@ enum {
opt_UseSeed,
opt_UseSigSeed,
opt_SeedFile,
+ opt_AAD,
opt_InputOffset,
opt_OutputOffset,
opt_MonteCarlo,
@@ -3460,6 +3560,7 @@ static secuCommandFlag bltest_options[] =
{ /* opt_UseSeed */ 'x', PR_FALSE, 0, PR_FALSE },
{ /* opt_UseSigSeed */ 'y', PR_FALSE, 0, PR_FALSE },
{ /* opt_SeedFile */ 'z', PR_FALSE, 0, PR_FALSE },
+ { /* opt_AAD */ 0 , PR_TRUE, 0, PR_FALSE, "aad" },
{ /* opt_InputOffset */ '1', PR_TRUE, 0, PR_FALSE },
{ /* opt_OutputOffset */ '2', PR_TRUE, 0, PR_FALSE },
{ /* opt_MonteCarlo */ '3', PR_FALSE, 0, PR_FALSE },
@@ -3497,22 +3598,28 @@ int main(int argc, char **argv)
progName = strrchr(argv[0], '\\');
progName = progName ? progName+1 : argv[0];
+ rv = NSS_InitializePRErrorTable();
+ if (rv != SECSuccess) {
+ SECU_PrintPRandOSError(progName);
+ return -1;
+ }
rv = RNG_RNGInit();
if (rv != SECSuccess) {
- SECU_PrintPRandOSError(progName);
+ SECU_PrintPRandOSError(progName);
return -1;
}
rv = BL_Init();
if (rv != SECSuccess) {
- SECU_PrintPRandOSError(progName);
+ SECU_PrintPRandOSError(progName);
return -1;
}
RNG_SystemInfoForRNG();
+
rv = SECU_ParseCommandLine(argc, argv, progName, &bltest);
if (rv == SECFailure) {
- fprintf(stderr, "%s: command line parsing error!\n", progName);
- goto print_usage;
+ fprintf(stderr, "%s: command line parsing error!\n", progName);
+ goto print_usage;
}
rv = SECFailure;
@@ -3832,6 +3939,30 @@ int main(int argc, char **argv)
PR_Close(file);
}
}
+
+ /* set up an initialization vector. */
+ if (is_authCipher(cipherInfo->mode)) {
+ char *aadstr = NULL;
+ bltestAuthSymmKeyParams *askp;
+ file = NULL;
+ askp = &params->ask;
+ if (bltest.options[opt_AAD].activated) {
+ if (bltest.options[opt_CmdLine].activated) {
+ aadstr = bltest.options[opt_AAD].arg;
+ } else {
+ file = PR_Open(bltest.options[opt_AAD].arg,
+ PR_RDONLY, 00660);
+ }
+ } else {
+ file = NULL;
+ }
+ memset(&askp->aad, 0, sizeof askp->aad);
+ askp->aad.mode = ioMode;
+ setupIO(cipherInfo->arena, &askp->aad, file, aadstr, 0);
+ if (file) {
+ PR_Close(file);
+ }
+ }
if (bltest.commands[cmd_Verify].activated) {
file = PR_Open(bltest.options[opt_SigFile].arg, PR_RDONLY, 00660);
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_0.txt b/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_0.txt
new file mode 100644
index 000000000..1e2a367d4
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_0.txt
@@ -0,0 +1,28 @@
+Test="F.5.1 CTR-AES128.Encrypt"
+Type=Encrypt
+Key=2b7e151628aed2a6abf7158809cf4f3c
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Output Block=ec8cdf7398607cb0f2d21675ea9ea1e4
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+Ciphertext=874d6191b620e3261bef6864990db6ce
+}
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+Output Block=362b7c3c6773516318a077d7fc5073ae
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+Ciphertext=9806f66b7970fdff8617187bb9fffdff
+}
+Block #3={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+Output Block=6a2cc3787889374fbeb4c81b17ba6c44
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+Ciphertext=5ae4df3edbd5d35e5b4f09020db03eab
+}
+Block #4={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+Output Block=e89c399ff0f198c6d40a31db156cabfe
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+Ciphertext=1e031dda2fbe03d1792170a0f3009cee
+}
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_1.txt b/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_1.txt
new file mode 100644
index 000000000..d42fc1955
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_1.txt
@@ -0,0 +1,28 @@
+Test="F.5.3 CTR-AES192.Encrypt"
+Type=Encrypt
+Key=8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Output Block=717d2dc639128334a6167a488ded7921
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+Ciphertext=1abc932417521ca24f2b0459fe7e6e0b
+}
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+Output Block=a72eb3bb14a556734b7bad6ab16100c5
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+Ciphertext=090339ec0aa6faefd5ccc2c6f4ce8e94
+}
+Block #3={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+Output Block=2efeae2d72b722613446dc7f4c2af918
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+Ciphertext=1e36b26bd1ebc670d1bd1d665620abf7
+}
+Block #4={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+Output Block=b9e783b30dd7924ff7bc9b97beaa8740
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+Ciphertext=4f78a7f6d29809585a97daec58c6b050
+}
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_2.txt b/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_2.txt
new file mode 100644
index 000000000..7db800909
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_2.txt
@@ -0,0 +1,28 @@
+Test="F.5.5 CTR-AES256.Encrypt"
+Type=Encrypt
+Key=603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Output Block=0bdf7df1591716335e9a8b15c860c502
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+Ciphertext=601ec313775789a5b7a7f504bbf3d228
+}
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+Output Block=5a6e699d536119065433863c8f657b94
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+Ciphertext=f443e3ca4d62b59aca84e990cacaf5c5
+}
+Block #3={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+Output Block=1bc12c9c01610d5d0d8bd6a3378eca62
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+Ciphertext=2b0930daa23de94ce87017ba2d84988d
+}
+Block #4={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+Output Block=2956e1c8693536b1bee99c73a31576b6
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+Ciphertext=dfc9c58db67aada613c2dd08457941a6
+}
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_tests_source.txt b/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_tests_source.txt
new file mode 100644
index 000000000..bef853b6e
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_tests_source.txt
@@ -0,0 +1,199 @@
+#
+# From NIST Special Publication 800-38A; 2001 Edition ;
+# "Recommendation for Block Cipher Modes of Operation: Methods and Techniques"
+# Morris Dworkin
+# Appendix F Example Vectors for Modes of Operation of the AES
+#
+# In this appendix, three examples are provided for each of the modes in this recommendation with
+# the AES algorithm [2] as the underlying block cipher: one example is given for each of the
+# allowed key sizes (128, 192, and 256 bits). Some intermediate results are presented. For the five
+# confidentiality modes, examples are provided for both encryption and decryption. Examples are
+# provided for 1-bit, 8-bit, and 128 bit CFB. The plaintext for all but two of these examples is
+# equivalent to the following string of hexadecimal characters, formatted into four 128 bit blocks:
+#
+# 6bc1bee22e409f96e93d7e117393172a
+# ae2d8a571e03ac9c9eb76fac45af8e51
+# 30c81c46a35ce411e5fbc1191a0a52ef
+# f69f2445df4f9b17ad2b417be66c3710.
+#
+# For the example of 1-bit CFB, the plaintext is the first 16 bits in the above string; for the example
+# of 8-bit CFB, the plaintext is the first 18 octets in the above string. All strings are presented in
+# hexadecimal notation, except in the example of 1-bit CFB, where the plaintext and ciphertext
+# segments are single bits.
+#
+#
+# F.5 CTR Example Vectors
+
+Test="F.5.1 CTR-AES128.Encrypt"
+Type=Encrypt
+Key=2b7e151628aed2a6abf7158809cf4f3c
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Output Block=ec8cdf7398607cb0f2d21675ea9ea1e4
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+Ciphertext=874d6191b620e3261bef6864990db6ce
+}
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+Output Block=362b7c3c6773516318a077d7fc5073ae
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+Ciphertext=9806f66b7970fdff8617187bb9fffdff
+}
+Block #3={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+Output Block=6a2cc3787889374fbeb4c81b17ba6c44
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+Ciphertext=5ae4df3edbd5d35e5b4f09020db03eab
+}
+Block #4={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+Output Block=e89c399ff0f198c6d40a31db156cabfe
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+Ciphertext=1e031dda2fbe03d1792170a0f3009cee
+}
+
+Test="F.5.2 CTR-AES128.Decrypt"
+Type=Decrypt
+Key=2b7e151628aed2a6abf7158809cf4f3c
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Output Block=ec8cdf7398607cb0f2d21675ea9ea1e4
+Ciphertext=874d6191b620e3261bef6864990db6ce
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+Output Block=362b7c3c6773516318a077d7fc5073ae
+Ciphertext=9806f66b7970fdff8617187bb9fffdff
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+}
+Block #3={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+Output Block=6a2cc3787889374fbeb4c81b17ba6c44
+Ciphertext=5ae4df3edbd5d35e5b4f09020db03eab
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+}
+Block #4={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+Output Block=e89c399ff0f198c6d40a31db156cabfe
+Ciphertext=1e031dda2fbe03d1792170a0f3009cee
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+}
+
+Test="F.5.3 CTR-AES192.Encrypt"
+Type=Encrypt
+Key=8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Output Block=717d2dc639128334a6167a488ded7921
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+Ciphertext=1abc932417521ca24f2b0459fe7e6e0b
+}
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+Output Block=a72eb3bb14a556734b7bad6ab16100c5
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+Ciphertext=090339ec0aa6faefd5ccc2c6f4ce8e94
+}
+Block #3={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+Output Block=2efeae2d72b722613446dc7f4c2af918
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+Ciphertext=1e36b26bd1ebc670d1bd1d665620abf7
+}
+Block #4={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+Output Block=b9e783b30dd7924ff7bc9b97beaa8740
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+Ciphertext=4f78a7f6d29809585a97daec58c6b050
+}
+
+Test="F.5.4 CTR-AES192.Decrypt"
+Type="Decrypt"
+Key=8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Output Block=717d2dc639128334a6167a488ded7921
+Ciphertext=1abc932417521ca24f2b0459fe7e6e0b
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+}
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+Output Block=a72eb3bb14a556734b7bad6ab16100c5
+Ciphertext=090339ec0aa6faefd5ccc2c6f4ce8e94
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+}
+Block #3
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+Output Block=2efeae2d72b722613446dc7f4c2af918
+Ciphertext=1e36b26bd1ebc670d1bd1d665620abf7
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+}
+Block #4
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+Output Block=b9e783b30dd7924ff7bc9b97beaa8740
+Ciphertext=4f78a7f6d29809585a97daec58c6b050
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+}
+
+Test="F.5.5 CTR-AES256.Encrypt"
+Type=Encrypt
+Key=603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Output Block=0bdf7df1591716335e9a8b15c860c502
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+Ciphertext=601ec313775789a5b7a7f504bbf3d228
+}
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+Output Block=5a6e699d536119065433863c8f657b94
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+Ciphertext=f443e3ca4d62b59aca84e990cacaf5c5
+}
+Block #3={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+Output Block=1bc12c9c01610d5d0d8bd6a3378eca62
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+Ciphertext=2b0930daa23de94ce87017ba2d84988d
+}
+Block #4={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+Output Block=2956e1c8693536b1bee99c73a31576b6
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+Ciphertext=dfc9c58db67aada613c2dd08457941a6
+}
+
+Test="F.5.6 CTR-AES256.Decrypt"
+Type=Decrypt
+Key=603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4
+Init. Counter=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+Block #1={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
+OutputBlock=0bdf7df1591716335e9a8b15c860c502
+Ciphertext=601ec313775789a5b7a7f504bbf3d228
+Plaintext=6bc1bee22e409f96e93d7e117393172a
+}
+Block #2={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff00
+OutputBlock=5a6e699d536119065433863c8f657b94
+Ciphertext=f443e3ca4d62b59aca84e990cacaf5c5
+Plaintext=ae2d8a571e03ac9c9eb76fac45af8e51
+}
+Block #3={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff01
+OutputBlock=1bc12c9c01610d5d0d8bd6a3378eca62
+Ciphertext=2b0930daa23de94ce87017ba2d84988d
+Plaintext=30c81c46a35ce411e5fbc1191a0a52ef
+}
+Block #4={
+Input Block=f0f1f2f3f4f5f6f7f8f9fafbfcfdff02
+OutputBlock=2956e1c8693536b1bee99c73a31576b6
+Ciphertext=dfc9c58db67aada613c2dd08457941a6
+Plaintext=f69f2445df4f9b17ad2b417be66c3710
+}
+
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/ciphertext0 b/security/nss/cmd/bltest/tests/aes_ctr/ciphertext0
new file mode 100644
index 000000000..a3a4ab21d
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/ciphertext0
@@ -0,0 +1,2 @@
+h01hkbYg4yYb72hkmQ22zpgG9mt5cP3/hhcYe7n//f9a5N8+29XTXltPCQINsD6r
+HgMd2i++A9F5IXCg8wCc7g==
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/ciphertext1 b/security/nss/cmd/bltest/tests/aes_ctr/ciphertext1
new file mode 100644
index 000000000..60ed7007a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/ciphertext1
@@ -0,0 +1,2 @@
+GryTJBdSHKJPKwRZ/n5uCwkDOewKpvrv1czCxvTOjpQeNrJr0evGcNG9HWZWIKv3
+T3in9tKYCVhal9rsWMawUA==
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/ciphertext2 b/security/nss/cmd/bltest/tests/aes_ctr/ciphertext2
new file mode 100644
index 000000000..4c6462f6f
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/ciphertext2
@@ -0,0 +1,2 @@
+YB7DE3dXiaW3p/UEu/PSKPRD48pNYrWayoTpkMrK9cUrCTDaoj3pTOhwF7othJiN
+38nFjbZ6raYTwt0IRXlBpg==
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/iv0 b/security/nss/cmd/bltest/tests/aes_ctr/iv0
new file mode 100644
index 000000000..10ae5e187
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/iv0
@@ -0,0 +1 @@
+ðñòóôõö÷øùúûüýþÿ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/iv1 b/security/nss/cmd/bltest/tests/aes_ctr/iv1
new file mode 100644
index 000000000..10ae5e187
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/iv1
@@ -0,0 +1 @@
+ðñòóôõö÷øùúûüýþÿ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/iv2 b/security/nss/cmd/bltest/tests/aes_ctr/iv2
new file mode 100644
index 000000000..10ae5e187
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/iv2
@@ -0,0 +1 @@
+ðñòóôõö÷øùúûüýþÿ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/key0 b/security/nss/cmd/bltest/tests/aes_ctr/key0
new file mode 100644
index 000000000..efb781943
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/key0
@@ -0,0 +1 @@
++~(®Ò¦«÷ˆ ÏO< \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/key1 b/security/nss/cmd/bltest/tests/aes_ctr/key1
new file mode 100644
index 000000000..06b40e45d
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/key1
@@ -0,0 +1 @@
+Žs°÷ÚdRÈó+€yåbøêÒR,k{ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/key2 b/security/nss/cmd/bltest/tests/aes_ctr/key2
new file mode 100644
index 000000000..cf22d1a2d
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/key2
@@ -0,0 +1 @@
+`=ëÊq¾+s®ð…}w5,;a×-˜£ ßô \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/mktst.sh b/security/nss/cmd/bltest/tests/aes_ctr/mktst.sh
new file mode 100644
index 000000000..b6f2f6f3d
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/mktst.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+for i in 0 1 2
+do
+ file="aes_ctr_$i.txt"
+ grep Key $file | sed -e 's;Key=;;' | hex > key$i
+ grep "Init. Counter" $file | sed -e 's;Init. Counter=;;' | hex > iv$i
+ grep "Ciphertext" $file | sed -e 's;Ciphertext=;;' | hex | btoa > ciphertext$i
+ grep "Plaintext" $file | sed -e 's;Plaintext=;;' | hex > plaintext$i
+done
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/numtests b/security/nss/cmd/bltest/tests/aes_ctr/numtests
new file mode 100644
index 000000000..00750edc0
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/numtests
@@ -0,0 +1 @@
+3
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/plaintext0 b/security/nss/cmd/bltest/tests/aes_ctr/plaintext0
new file mode 100644
index 000000000..8ad770497
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/plaintext0
@@ -0,0 +1,2 @@
+kÁ¾â.@Ÿ–é=~s“*®-ŠW¬œž·o¬E¯ŽQ0ÈF£\äåûÁ
+RïöŸ$EßO›­+A{æl7 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/plaintext1 b/security/nss/cmd/bltest/tests/aes_ctr/plaintext1
new file mode 100644
index 000000000..8ad770497
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/plaintext1
@@ -0,0 +1,2 @@
+kÁ¾â.@Ÿ–é=~s“*®-ŠW¬œž·o¬E¯ŽQ0ÈF£\äåûÁ
+RïöŸ$EßO›­+A{æl7 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_ctr/plaintext2 b/security/nss/cmd/bltest/tests/aes_ctr/plaintext2
new file mode 100644
index 000000000..8ad770497
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_ctr/plaintext2
@@ -0,0 +1,2 @@
+kÁ¾â.@Ÿ–é=~s“*®-ŠW¬œž·o¬E¯ŽQ0ÈF£\äåûÁ
+RïöŸ$EßO›­+A{æl7 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad0 b/security/nss/cmd/bltest/tests/aes_gcm/aad0
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad0
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad1 b/security/nss/cmd/bltest/tests/aes_gcm/aad1
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad1
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad10 b/security/nss/cmd/bltest/tests/aes_gcm/aad10
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad10
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad11 b/security/nss/cmd/bltest/tests/aes_gcm/aad11
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad11
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad12 b/security/nss/cmd/bltest/tests/aes_gcm/aad12
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad12
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad13 b/security/nss/cmd/bltest/tests/aes_gcm/aad13
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad13
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad14 b/security/nss/cmd/bltest/tests/aes_gcm/aad14
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad14
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad2 b/security/nss/cmd/bltest/tests/aes_gcm/aad2
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad2
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad3 b/security/nss/cmd/bltest/tests/aes_gcm/aad3
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad3
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad4 b/security/nss/cmd/bltest/tests/aes_gcm/aad4
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad4
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad5 b/security/nss/cmd/bltest/tests/aes_gcm/aad5
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad5
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad6 b/security/nss/cmd/bltest/tests/aes_gcm/aad6
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad6
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad7 b/security/nss/cmd/bltest/tests/aes_gcm/aad7
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad7
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad8 b/security/nss/cmd/bltest/tests/aes_gcm/aad8
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad8
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad9 b/security/nss/cmd/bltest/tests/aes_gcm/aad9
new file mode 100644
index 000000000..87b29d32c
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/aad9
@@ -0,0 +1 @@
+þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext0 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext0
new file mode 100644
index 000000000..9913ff1fa
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext0
@@ -0,0 +1 @@
+A4jazmC2o5LzKMK5cbL+eKtuR9Qs7BO99TpnshJXvd8=
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext1 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext1
new file mode 100644
index 000000000..f5efb3d52
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext1
@@ -0,0 +1,2 @@
+QoMewiF3dCRLciG3hNDUnOOqIS8sAqTgNcF+IymsoS4h1RSyVGaTHH2PalqshKoF
+G6MLOWoKrJc9WOCRRz9ZhU1cKvMnzWSmLPNavSum+rQ=
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext10 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext10
new file mode 100644
index 000000000..15bc5e17f
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext10
@@ -0,0 +1 @@
+zqdAPU1ga24HTsXTuvOdGNDRyKeZmWvwJluYtdSKuRk=
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext11 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext11
new file mode 100644
index 000000000..a982ef2fe
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext11
@@ -0,0 +1,2 @@
+Ui3B8JlWfQf0fzejKoRCfWQ6jNy/5cDJdZiivSVV0aqMsI5IWQ27PaewixBWgog4
+xfYeY5O6egq8yfZiiYAVrbCU2sXZNHG97BpQInDjzGw=
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext12 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext12
new file mode 100644
index 000000000..5f5b95261
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext12
@@ -0,0 +1,2 @@
+Ui3B8JlWfQf0fzejKoRCfWQ6jNy/5cDJdZiivSVV0aqMsI5IWQ27PaewixBWgog4
+xfYeY5O6egq8yfZidvxuzg9OF2jN34hTuy1VGw==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext13 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext13
new file mode 100644
index 000000000..86d9096bd
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext13
@@ -0,0 +1,2 @@
+w3Yt8cp4fTKuR8E78ZhEy68a4U0Ll2r6xS/315u6neD+tYLTOTSk8JVMwjY7xz94
+YqxDDmSr5Jn0fJsfOjN9v0anksReRUkT/i6o8g==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext14 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext14
new file mode 100644
index 000000000..6be2346bf
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext14
@@ -0,0 +1,2 @@
+Wo3vLwyeU/H3XXhTZZ4qIO6ysiqv3mQZoFirT290a/QPwMO3gPJERS2j6/HF2Cze
+okGJlyAO+C5Ern4/pEqCZu4cjrDItdTPWunxmg==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext2 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext2
new file mode 100644
index 000000000..80fe95e85
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext2
@@ -0,0 +1,2 @@
+QoMewiF3dCRLciG3hNDUnOOqIS8sAqTgNcF+IymsoS4h1RSyVGaTHH2PalqshKoF
+G6MLOWoKrJc9WOCRW8lPvDIhpduU+ula5xIaRw==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext3 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext3
new file mode 100644
index 000000000..cbc0194aa
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext3
@@ -0,0 +1,2 @@
+YTU7TCgGk0p3f/UfoipHVWmbKnFPzcb4N2bl+XtsdCNzgGkA5J8ksisJdUTUiWtC
+SYm14eusDwfCP0WYNhLS5547B4VWG+FKrKL8yw==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext4 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext4
new file mode 100644
index 000000000..77127ff0e
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext4
@@ -0,0 +1,2 @@
+jOJJmGJWFbYDoDOsoT+4lL6REqXDohGouiYqPMp+LKcB5Kmk+6Q8kMzcsoHUjHxv
+1ih10qykFwNMNK7lYZzFrv/+C/pGKvQ8FpnQUA==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext5 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext5
new file mode 100644
index 000000000..d405c82fe
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext5
@@ -0,0 +1 @@
+mOckfAfw/kEcJn5DhLD2AC/1jYADOSerjvTUWHUU8Ps=
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext6 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext6
new file mode 100644
index 000000000..53738bbef
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext6
@@ -0,0 +1,2 @@
+OYDKCzwA6EHrBvrEhyonV4WeHOqm79mEYoWTtAyh4Zx9dz0AwUTFJaxhnRjISj9H
+GOJEiy/jJNnM2icQrK3iVpkkp8hYcza/sRgCTbhnShQ=
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext7 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext7
new file mode 100644
index 000000000..bde2785bc
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext7
@@ -0,0 +1,2 @@
+OYDKCzwA6EHrBvrEhyonV4WeHOqm79mEYoWTtAyh4Zx9dz0AwUTFJaxhnRjISj9H
+GOJEiy/jJNnM2icQJRlJjoDxR483ulW9bSdhjA==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext8 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext8
new file mode 100644
index 000000000..70cb47100
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext8
@@ -0,0 +1,2 @@
+DxD1ma4UoVTtJLNuJTJNuMVmYy7yu7NPg0coD8RQcFf93CnfmkcfdcZlQdTU2tHJ
+6ToZpY6LRz+g8GL3ZdzFf89iOiQJT8ykDTUz+A==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext9 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext9
new file mode 100644
index 000000000..b9c42364e
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext9
@@ -0,0 +1,2 @@
+0n6IaBzjJDxIMBZaj9z5/x3podjmtEfvbve3mChmbkWB55ASrzTd2eLwN1ibKS2z
+5nwDZ0X6Iufptzc73PVm/ykcJbu4Vo/D03am2Q==
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv0 b/security/nss/cmd/bltest/tests/aes_gcm/iv0
new file mode 100644
index 000000000..ce58bc9f8
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv0
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv1 b/security/nss/cmd/bltest/tests/aes_gcm/iv1
new file mode 100644
index 000000000..e3728f726
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv1
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv10 b/security/nss/cmd/bltest/tests/aes_gcm/iv10
new file mode 100644
index 000000000..ce58bc9f8
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv10
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv11 b/security/nss/cmd/bltest/tests/aes_gcm/iv11
new file mode 100644
index 000000000..e3728f726
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv11
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv12 b/security/nss/cmd/bltest/tests/aes_gcm/iv12
new file mode 100644
index 000000000..e3728f726
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv12
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv13 b/security/nss/cmd/bltest/tests/aes_gcm/iv13
new file mode 100644
index 000000000..bad60b08b
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv13
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv14 b/security/nss/cmd/bltest/tests/aes_gcm/iv14
new file mode 100644
index 000000000..f446641db
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv14
@@ -0,0 +1 @@
+“"]ø„åUœZÿRiªjz•8SO}¡äÃÒ£§(ÃÀÉQV€•9üðâBškRT®Ûõ ÞjW¦7³› \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv2 b/security/nss/cmd/bltest/tests/aes_gcm/iv2
new file mode 100644
index 000000000..e3728f726
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv2
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv3 b/security/nss/cmd/bltest/tests/aes_gcm/iv3
new file mode 100644
index 000000000..bad60b08b
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv3
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv4 b/security/nss/cmd/bltest/tests/aes_gcm/iv4
new file mode 100644
index 000000000..f446641db
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv4
@@ -0,0 +1 @@
+“"]ø„åUœZÿRiªjz•8SO}¡äÃÒ£§(ÃÀÉQV€•9üðâBškRT®Ûõ ÞjW¦7³› \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv5 b/security/nss/cmd/bltest/tests/aes_gcm/iv5
new file mode 100644
index 000000000..ce58bc9f8
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv5
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv6 b/security/nss/cmd/bltest/tests/aes_gcm/iv6
new file mode 100644
index 000000000..e3728f726
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv6
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv7 b/security/nss/cmd/bltest/tests/aes_gcm/iv7
new file mode 100644
index 000000000..e3728f726
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv7
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv8 b/security/nss/cmd/bltest/tests/aes_gcm/iv8
new file mode 100644
index 000000000..bad60b08b
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv8
@@ -0,0 +1 @@
+Êþº¾úÎÛ­ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv9 b/security/nss/cmd/bltest/tests/aes_gcm/iv9
new file mode 100644
index 000000000..f446641db
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/iv9
@@ -0,0 +1 @@
+“"]ø„åUœZÿRiªjz•8SO}¡äÃÒ£§(ÃÀÉQV€•9üðâBškRT®Ûõ ÞjW¦7³› \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key0 b/security/nss/cmd/bltest/tests/aes_gcm/key0
new file mode 100644
index 000000000..01d633b27
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key0
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key1 b/security/nss/cmd/bltest/tests/aes_gcm/key1
new file mode 100644
index 000000000..767ebdace
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key1
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key10 b/security/nss/cmd/bltest/tests/aes_gcm/key10
new file mode 100644
index 000000000..4e4e49357
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key10
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key11 b/security/nss/cmd/bltest/tests/aes_gcm/key11
new file mode 100644
index 000000000..2163baf5a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key11
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒþÿé’†esmj”g0ƒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key12 b/security/nss/cmd/bltest/tests/aes_gcm/key12
new file mode 100644
index 000000000..2163baf5a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key12
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒþÿé’†esmj”g0ƒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key13 b/security/nss/cmd/bltest/tests/aes_gcm/key13
new file mode 100644
index 000000000..2163baf5a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key13
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒþÿé’†esmj”g0ƒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key14 b/security/nss/cmd/bltest/tests/aes_gcm/key14
new file mode 100644
index 000000000..2163baf5a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key14
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒþÿé’†esmj”g0ƒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key2 b/security/nss/cmd/bltest/tests/aes_gcm/key2
new file mode 100644
index 000000000..767ebdace
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key2
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key3 b/security/nss/cmd/bltest/tests/aes_gcm/key3
new file mode 100644
index 000000000..767ebdace
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key3
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key4 b/security/nss/cmd/bltest/tests/aes_gcm/key4
new file mode 100644
index 000000000..767ebdace
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key4
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒ \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key5 b/security/nss/cmd/bltest/tests/aes_gcm/key5
new file mode 100644
index 000000000..4ac5fc6cf
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key5
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key6 b/security/nss/cmd/bltest/tests/aes_gcm/key6
new file mode 100644
index 000000000..222b4b5a2
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key6
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒþÿé’†es \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key7 b/security/nss/cmd/bltest/tests/aes_gcm/key7
new file mode 100644
index 000000000..222b4b5a2
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key7
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒþÿé’†es \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key8 b/security/nss/cmd/bltest/tests/aes_gcm/key8
new file mode 100644
index 000000000..222b4b5a2
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key8
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒþÿé’†es \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key9 b/security/nss/cmd/bltest/tests/aes_gcm/key9
new file mode 100644
index 000000000..222b4b5a2
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/key9
@@ -0,0 +1 @@
+þÿé’†esmj”g0ƒþÿé’†es \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/mktst.sh b/security/nss/cmd/bltest/tests/aes_gcm/mktst.sh
new file mode 100644
index 000000000..be9962330
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/mktst.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
+do
+ file="test$i.txt"
+ grep K= $file | sed -e 's;K=;;' | hex > key$i
+ grep IV= $file | sed -e 's;IV=;;' | hex > iv$i
+ grep "C=" $file | sed -e 's;C=;;' | hex > ciphertext$i.bin
+ grep "P=" $file | sed -e 's;P=;;' | hex > plaintext$i
+ grep "A=" $file | sed -e 's;A=;;' | hex > aad$i
+ grep "T=" $file | sed -e 's;T=;;' | hex >> ciphertext$i.bin
+ btoa < ciphertext$i.bin > ciphertext$i
+ rm ciphertext$i.bin
+done
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/numtests b/security/nss/cmd/bltest/tests/aes_gcm/numtests
new file mode 100644
index 000000000..60d3b2f4a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/numtests
@@ -0,0 +1 @@
+15
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext0 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext0
new file mode 100644
index 000000000..01d633b27
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext0
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext1 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext1
new file mode 100644
index 000000000..664f6c9de
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext1
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9¯ÒU \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext10 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext10
new file mode 100644
index 000000000..01d633b27
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext10
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext11 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext11
new file mode 100644
index 000000000..664f6c9de
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext11
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9¯ÒU \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext12 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext12
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext12
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext13 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext13
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext13
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext14 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext14
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext14
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext2 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext2
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext2
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext3 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext3
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext3
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext4 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext4
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext4
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext5 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext5
new file mode 100644
index 000000000..01d633b27
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext5
Binary files differ
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext6 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext6
new file mode 100644
index 000000000..664f6c9de
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext6
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9¯ÒU \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext7 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext7
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext7
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext8 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext8
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext8
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext9 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext9
new file mode 100644
index 000000000..00505877a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext9
@@ -0,0 +1 @@
+Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test0.txt b/security/nss/cmd/bltest/tests/aes_gcm/test0.txt
new file mode 100644
index 000000000..7bb83ce8b
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test0.txt
@@ -0,0 +1,14 @@
+test="Test Case 2"
+K=00000000000000000000000000000000
+P=00000000000000000000000000000000
+IV=000000000000000000000000
+H=66e94bd4ef8a2c3b884cfa59ca342b2e
+Y0=00000000000000000000000000000001
+E(K,Y0)=58e2fccefa7e3061367f1d57a4e7455a
+Y1=00000000000000000000000000000002
+E(K,Y1)=0388dace60b6a392f328c2b971b2fe78
+X1 5e2ec746917062882c85b0685353deb7
+len(A)||len(C)=00000000000000000000000000000080
+GHASH(H,A,C)=f38cbb1ad69223dcc3457ae5b6b0f885
+C=0388dace60b6a392f328c2b971b2fe78
+T=ab6e47d42cec13bdf53a67b21257bddf
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test1.txt b/security/nss/cmd/bltest/tests/aes_gcm/test1.txt
new file mode 100644
index 000000000..8e69bf678
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test1.txt
@@ -0,0 +1,23 @@
+test="Test Case 3"
+K=feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
+IV=cafebabefacedbaddecaf888
+H=b83b533708bf535d0aa6e52980d53b78
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=3247184b3c4f69a44dbcd22887bbb418
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=9bb22ce7d9f372c1ee2b28722b25f206
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=650d887c3936533a1b8d4e1ea39d2b5c
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=3de91827c10e9a4f5240647ee5221f20
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=aac9e6ccc0074ac0873b9ba85d908bd0
+X1=59ed3f2bb1a0aaa07c9f56c6a504647b
+X2=b714c9048389afd9f9bc5c1d4378e052
+X3=47400c6577b1ee8d8f40b2721e86ff10
+X4=4796cf49464704b5dd91f159bb1b7f95
+len(A)||len(C)=00000000000000000000000000000200
+GHASH(H,A,C)=7f1b32b81b820d02614f8895ac1d4eac
+C=42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091473f5985
+T=4d5c2af327cd64a62cf35abd2ba6fab4
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test10.txt b/security/nss/cmd/bltest/tests/aes_gcm/test10.txt
new file mode 100644
index 000000000..b589ba413
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test10.txt
@@ -0,0 +1,14 @@
+test="Test Case 14"
+K=0000000000000000000000000000000000000000000000000000000000000000
+P=00000000000000000000000000000000
+IV=000000000000000000000000
+H=dc95c078a2408989ad48a21492842087
+Y0=00000000000000000000000000000001
+E(K,Y0)=530f8afbc74536b9a963b4f1c4cb738b
+Y1=00000000000000000000000000000002
+E(K,Y1)=cea7403d4d606b6e074ec5d3baf39d18
+X1=fd6ab7586e556dba06d69cfe6223b262
+len(A)||len(C)=00000000000000000000000000000080
+GHASH(H,A,C)=83de425c5edc5d498f382c441041ca92
+C=cea7403d4d606b6e074ec5d3baf39d18
+T=d0d1c8a799996bf0265b98b5d48ab919
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test11.txt b/security/nss/cmd/bltest/tests/aes_gcm/test11.txt
new file mode 100644
index 000000000..f650ea7c6
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test11.txt
@@ -0,0 +1,23 @@
+test="Test Case 15"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
+IV=cafebabefacedbaddecaf888
+H=acbef20579b4b8ebce889bac8732dad7
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=fd2caa16a5832e76aa132c1453eeda7e
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=8b1cf3d561d27be251263e66857164e7
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=e29d258faad137135bd49280af645bd8
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=908c82ddcc65b26e887f85341f243d1d
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=749cf39639b79c5d06aa8d5b932fc7f8
+X1=fcbefb78635d598eddaf982310670f35
+X2=29de812309d3116a6eff7ec844484f3e
+X3=45fad9deeda9ea561b8f199c3613845b
+X4=ed95f8e164bf3213febc740f0bd9c6af
+len(A)||len(C)=00000000000000000000000000000200
+GHASH(H,A,C)=4db870d37cb75fcb46097c36230d1612
+C=522dc1f099567d07f47f37a32a84427d643a8cdcbfe5c0c97598a2bd2555d1aa8cb08e48590dbb3da7b08b1056828838c5f61e6393ba7a0abcc9f662898015ad
+T=b094dac5d93471bdec1a502270e3cc6c
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test12.txt b/security/nss/cmd/bltest/tests/aes_gcm/test12.txt
new file mode 100644
index 000000000..f1a49e3fe
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test12.txt
@@ -0,0 +1,26 @@
+test="Test Case 16"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbaddecaf888
+H=acbef20579b4b8ebce889bac8732dad7
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=fd2caa16a5832e76aa132c1453eeda7e
+X1=5165d242c2592c0a6375e2622cf925d2
+X2=8efa30ce83298b85fe71abefc0cdd01d
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=8b1cf3d561d27be251263e66857164e7
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=e29d258faad137135bd49280af645bd8
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=908c82ddcc65b26e887f85341f243d1d
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=749cf39639b79c5d06aa8d5b932fc7f8
+X3=abe07e0bb62354177480b550f9f6cdcc
+X4=3978e4f141b95f3b4699756b1c3c2082
+X5=8abf3c48901debe76837d8a05c7d6e87
+X6=9249beaf520c48b912fa120bbf391dc8
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=8bd0c4d8aacd391e67cca447e8c38f65
+C=522dc1f099567d07f47f37a32a84427d643a8cdcbfe5c0c97598a2bd2555d1aa8cb08e48590dbb3da7b08b1056828838c5f61e6393ba7a0abcc9f662
+T=76fc6ece0f4e1768cddf8853bb2d551b
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test13.txt b/security/nss/cmd/bltest/tests/aes_gcm/test13.txt
new file mode 100644
index 000000000..6918aca77
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test13.txt
@@ -0,0 +1,28 @@
+test="Test Case 17"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbad
+H=acbef20579b4b8ebce889bac8732dad7
+N1=90c22e3d2aca34b971e8bd09708fae5c
+len({})||len(IV)=00000000000000000000000000000040
+Y0=0095df49dd90abe3e4d252475748f5d4
+E(K,Y0)=4f903f37fe611d454217fbfa5cd7d791
+X1=5165d242c2592c0a6375e2622cf925d2
+X2=8efa30ce83298b85fe71abefc0cdd01d
+Y1=0095df49dd90abe3e4d252475748f5d5
+E(K,Y1)=1a471fd432fc7bd70b1ec8fe5e6d6251
+Y2=0095df49dd90abe3e4d252475748f5d6
+E(K,Y2)=29bd481e1ea39d20eb63c7ea118b1792
+Y3=0095df49dd90abe3e4d252475748f5d7
+E(K,Y3)=e2898e46ac5cada3ba83cc1272618a5d
+Y4=0095df49dd90abe3e4d252475748f5d8
+E(K,Y4)=d3c6aefbcea602ce4e1fe026065447bf
+X3=55e1ff68f9249e64b95223858e5cb936
+X4=cef1c034383dc96f733aaa4c99bd3e61
+X5=68588d004fd468f5854515039b08165d
+X6=2378943c034697f72a80fce5059bf3f3
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=75a34288b8c68f811c52b2e9a2f97f63
+C=c3762df1ca787d32ae47c13bf19844cbaf1ae14d0b976afac52ff7d79bba9de0feb582d33934a4f0954cc2363bc73f7862ac430e64abe499f47c9b1f
+T=3a337dbf46a792c45e454913fe2ea8f2
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test14.txt b/security/nss/cmd/bltest/tests/aes_gcm/test14.txt
new file mode 100644
index 000000000..a5c538ea6
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test14.txt
@@ -0,0 +1,31 @@
+test="Test Case 18"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
+H=acbef20579b4b8ebce889bac8732dad7
+N1=0bfe66e2032f195516379f5fb710f987
+N2=f0631554d11409915feec8f9f5102aba
+N3=749b90dda19a1557fd9e9fd31fed1d14
+N4=7a6a833f260d848793b327cb07d1b190
+len({})||len(IV)=000000000000000000000000000001e0
+Y0=0cd953e2140a5976079f8e2406bc8eb4
+E(K,Y0)=71b54d092bb0c3d9ba94538d4096e691
+X1=5165d242c2592c0a6375e2622cf925d2
+X2=8efa30ce83298b85fe71abefc0cdd01d
+Y1=0cd953e2140a5976079f8e2406bc8eb5
+E(K,Y1)=83bcdd0af41a551452047196ca6b0cba
+Y2=0cd953e2140a5976079f8e2406bc8eb6
+E(K,Y2)=68151b79baea93c38e149b72e545e186
+Y3=0cd953e2140a5976079f8e2406bc8eb7
+E(K,Y3)=13fccf22159a4d16026ce5d58c7e99fb
+Y4=0cd953e2140a5976079f8e2406bc8eb8
+E(K,Y4)=132b64628a031e79fecd050675a64f07
+X3=e963941cfa8c417bdaa3b3d94ab4e905
+X4=2178d7f836e5fa105ce0fdf0fc8f0654
+X5=bac14eeba3216f966b3e7e011475b832
+X6=cc9ae9175729a649936e890bd971a8bf
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=d5ffcf6fc5ac4d69722187421a7f170b
+C=5a8def2f0c9e53f1f75d7853659e2a20eeb2b22aafde6419a058ab4f6f746bf40fc0c3b780f244452da3ebf1c5d82cdea2418997200ef82e44ae7e3f
+T=a44a8266ee1c8eb0c8b5d4cf5ae9f19a
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test2.txt b/security/nss/cmd/bltest/tests/aes_gcm/test2.txt
new file mode 100644
index 000000000..4083eac7a
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test2.txt
@@ -0,0 +1,26 @@
+test="Test Case 4"
+K=feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbaddecaf888
+H=b83b533708bf535d0aa6e52980d53b78
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=3247184b3c4f69a44dbcd22887bbb418
+X1=ed56aaf8a72d67049fdb9228edba1322
+X2=cd47221ccef0554ee4bb044c88150352
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=9bb22ce7d9f372c1ee2b28722b25f206
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=650d887c3936533a1b8d4e1ea39d2b5c
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=3de91827c10e9a4f5240647ee5221f20
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=aac9e6ccc0074ac0873b9ba85d908bd0
+X3=54f5e1b2b5a8f9525c23924751a3ca51
+X4=324f585c6ffc1359ab371565d6c45f93
+X5=ca7dd446af4aa70cc3c0cd5abba6aa1c
+X6=1590df9b2eb6768289e57d56274c8570
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=698e57f70e6ecc7fd9463b7260a9ae5f
+C=42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091
+T=5bc94fbc3221a5db94fae95ae7121a47
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test3.txt b/security/nss/cmd/bltest/tests/aes_gcm/test3.txt
new file mode 100644
index 000000000..ec62258d0
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test3.txt
@@ -0,0 +1,28 @@
+test="Test Case 5"
+K=feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbad
+H=b83b533708bf535d0aa6e52980d53b78
+N1=6f288b846e5fed9a18376829c86a6a16
+len({})||len(C)=00000000000000000000000000000040
+Y0=c43a83c4c4badec4354ca984db252f7d
+E(K,Y0)=e94ab9535c72bea9e089c93d48e62fb0
+X1=ed56aaf8a72d67049fdb9228edba1322
+X2=cd47221ccef0554ee4bb044c88150352
+Y1=c43a83c4c4badec4354ca984db252f7e
+E(K,Y1)=b8040969d08295afd226fcda0ddf61cf
+Y2=c43a83c4c4badec4354ca984db252f7f
+E(K,Y2)=ef3c83225af93122192ad5c4f15dfe51
+Y3=c43a83c4c4badec4354ca984db252f80
+E(K,Y3)=6fbc659571f72de104c67b609d2fde67
+Y4=c43a83c4c4badec4354ca984db252f81
+E(K,Y4)=f8e3581441a1e950785c3ea1430c6fa6
+X3=9379e2feae14649c86cf2250e3a81916
+X4=65dde904c92a6b3db877c4817b50a5f4
+X5=48c53cf863b49a1b0bbfc48c3baaa89d
+X6=08c873f1c8cec3effc209a07468caab1
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=df586bb4c249b92cb6922877e444d37b
+C=61353b4c2806934a777ff51fa22a4755699b2a714fcdc6f83766e5f97b6c742373806900e49f24b22b097544d4896b424989b5e1ebac0f07c23f4598
+T=3612d2e79e3b0785561be14aaca2fccb
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test4.txt b/security/nss/cmd/bltest/tests/aes_gcm/test4.txt
new file mode 100644
index 000000000..709251b45
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test4.txt
@@ -0,0 +1,31 @@
+test="Test Case 6"
+K=feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
+H=b83b533708bf535d0aa6e52980d53b78
+N1=004d6599d7fb1634756e1e299d81630f
+N2=88ffe8a3c8033df4b54d732f7f88408e
+N3=24e694cfab657beabba8055aad495e23
+N4=d8349a5eda24943c8fbb2ef5168b20cb
+len({})||len(IV)=000000000000000000000000000001e0
+Y0=3bab75780a31c059f83d2a44752f9864
+7dc63b399f2d98d57ab073b6baa4138e
+X1=ed56aaf8a72d67049fdb9228edba1322
+X2=cd47221ccef0554ee4bb044c88150352
+Y1=3bab75780a31c059f83d2a44752f9865
+E(K,Y1)=55d37bbd9ad21353a6f93a690eca9e0e
+Y2=3bab75780a31c059f83d2a44752f9866
+E(K,Y2)=3836bbf6d696e672946a1a01404fa6d5
+Y3=3bab75780a31c059f83d2a44752f9867
+E(K,Y3)=1dd8a5316ecc35c3e313bca59d2ac94a
+Y4=3bab75780a31c059f83d2a44752f9868
+E(K,Y4)=6742982706a9f154f657d5dc94b746db
+X3=31727669c63c6f078b5d22adbbbca384
+X4=480c00db2679065a7ed2f771a53acacd
+X5=1c1ae3c355e2214466a9923d2ba6ab35
+X6=0694c6f16bb0275a48891d06590344b0
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=1c5afe9760d3932f3c9a878aac3dc3de
+C=8ce24998625615b603a033aca13fb894be9112a5c3a211a8ba262a3cca7e2ca701e4a9a4fba43c90ccdcb281d48c7c6fd62875d2aca417034c34aee5
+T=619cc5aefffe0bfa462af43c1699d050
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test5.txt b/security/nss/cmd/bltest/tests/aes_gcm/test5.txt
new file mode 100644
index 000000000..68bc52138
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test5.txt
@@ -0,0 +1,14 @@
+test="Test Case 8"
+K=000000000000000000000000000000000000000000000000
+P=00000000000000000000000000000000
+IV=000000000000000000000000
+H=aae06992acbf52a3e8f4a96ec9300bd7
+Y0=00000000000000000000000000000001
+E(K,Y0)=cd33b28ac773f74ba00ed1f312572435
+Y1=00000000000000000000000000000002
+E(K,Y1)=98e7247c07f0fe411c267e4384b0f600
+X1=90e87315fb7d4e1b4092ec0cbfda5d7d
+len(A)||len(C)=00000000000000000000000000000080
+GHASH(H,A,C)=e2c63f0ac44ad0e02efa05ab6743d4ce
+C=98e7247c07f0fe411c267e4384b0f600
+T=2ff58d80033927ab8ef4d4587514f0fb
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test6.txt b/security/nss/cmd/bltest/tests/aes_gcm/test6.txt
new file mode 100644
index 000000000..544324035
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test6.txt
@@ -0,0 +1,23 @@
+test="Test Case 9"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
+IV=cafebabefacedbaddecaf888
+H=466923ec9ae682214f2c082badb39249
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=c835aa88aebbc94f5a02e179fdcfc3e4
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=e0b1f82ec484eea44e5ff30128df01cd
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=0339b5b9b3db2e5e4cc9a38986906bee
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=614b3195542ccc7683ae933c81ec8a62
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=a988a97e85eec28e76b95c29b6023003
+X1=dddca3f91c17821ffac4a6d0fed176f7
+X2=a4e84ac60e2730f4a7e0e1eef708b198
+X3=e67592048dd7153973a0dbbb8804bee2
+X4=503e86628536625fb746ce3cecea433f
+len(A)||len(C)=00000000000000000000000000000200
+GHASH(H,A,C)=51110d40f6c8fff0eb1ae33445a889f0
+C=3980ca0b3c00e841eb06fac4872a2757859e1ceaa6efd984628593b40ca1e19c7d773d00c144c525ac619d18c84a3f4718e2448b2fe324d9ccda2710acade256
+T=9924a7c8587336bfb118024db8674a14
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test7.txt b/security/nss/cmd/bltest/tests/aes_gcm/test7.txt
new file mode 100644
index 000000000..bcd593929
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test7.txt
@@ -0,0 +1,26 @@
+test="Test Case 10"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbaddecaf888
+H=466923ec9ae682214f2c082badb39249
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=c835aa88aebbc94f5a02e179fdcfc3e4
+X1=f3bf7ba3e305aeb05ed0d2e4fe076666
+X2=20a51fa2302e9c01b87c48f2c3d91a56
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=e0b1f82ec484eea44e5ff30128df01cd
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=0339b5b9b3db2e5e4cc9a38986906bee
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=614b3195542ccc7683ae933c81ec8a62
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=a988a97e85eec28e76b95c29b6023003
+X3=714f9700ddf520f20695f6180c6e669d
+X4=e858680b7b240d2ecf7e06bbad4524e2
+X5=3f4865abd6bb3fb9f5c4a816f0a9b778
+X6=4256f67fe87b4f49422ba11af857c973
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=ed2ce3062e4a8ec06db8b4c490e8a268
+C=3980ca0b3c00e841eb06fac4872a2757859e1ceaa6efd984628593b40ca1e19c7d773d00c144c525ac619d18c84a3f4718e2448b2fe324d9ccda2710
+T=2519498e80f1478f37ba55bd6d27618c
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test8.txt b/security/nss/cmd/bltest/tests/aes_gcm/test8.txt
new file mode 100644
index 000000000..2a4a5a99e
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test8.txt
@@ -0,0 +1,28 @@
+test="Test Case 11"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbad
+H=466923ec9ae682214f2c082badb39249
+N1=9473c07b02544299cf007c42c5778218
+len({})||len(IV)=00000000000000000000000000000040
+Y0=a14378078d27258a6292737e1802ada5
+E(K,Y0)=7bb6d647c902427ce7cf26563a337371
+X1=f3bf7ba3e305aeb05ed0d2e4fe076666
+X2=20a51fa2302e9c01b87c48f2c3d91a56
+Y1=a14378078d27258a6292737e1802ada6
+E(K,Y1)=d621c7bc5690a7b1487dbaab8ac76b22
+Y2=a14378078d27258a6292737e1802ada7
+E(K,Y2)=43c1ca7de78f4495ad0b18324e61fa25
+Y3=a14378078d27258a6292737e1802ada8
+E(K,Y3)=e1e0254a0f2f1626e9aa4ff09d7c64ec
+Y4=a14378078d27258a6292737e1802ada9
+E(K,Y4)=5850f4502486a1681a9319ce7d0afa59
+X3=8bdedafd6ee8e529689de3a269b8240d
+X4=6607feb377b49c9ecdbc696344fe22d8
+X5=8a19570a06500ba9405fcece4a73fb48
+X6=8532826e63ce4a5b89b70fa28f8070fe
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=1e6a133806607858ee80eaf237064089
+C=0f10f599ae14a154ed24b36e25324db8c566632ef2bbb34f8347280fc4507057fddc29df9a471f75c66541d4d4dad1c9e93a19a58e8b473fa0f062f7
+T=65dcc57fcf623a24094fcca40d3533f8
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test9.txt b/security/nss/cmd/bltest/tests/aes_gcm/test9.txt
new file mode 100644
index 000000000..d46e6f91f
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test9.txt
@@ -0,0 +1,31 @@
+test="Test Case 12"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
+H=466923ec9ae682214f2c082badb39249
+N1=19aef0f04763b0c87903c5a217d5314f
+N2=62120253f79efc978625d1feb03b5b5b
+N3=b6ce2a84e366de900fa78a1653df77fb
+N4=374ecad90487f0bb261ba817447e022c
+len({})||len(IV)=000000000000000000000000000001e0
+Y0=4505cdc367a054c5002820e96aebef27
+E(K,Y0)=5ea3194f9dd012a3b9bc5103d6e0284d
+X1=f3bf7ba3e305aeb05ed0d2e4fe076666
+X2=20a51fa2302e9c01b87c48f2c3d91a56
+Y1=4505cdc367a054c5002820e96aebef28
+E(K,Y1)=0b4fba4de46722d9ed691f9f2029df65
+Y2=4505cdc367a054c5002820e96aebef29
+E(K,Y2)=9b4e088bf380b03540bb87a5a257e437
+Y3=4505cdc367a054c5002820e96aebef2a
+E(K,Y3)=9ddb9c873a5cd48acd3f397cd28f9896
+Y4=4505cdc367a054c5002820e96aebef2b
+E(K,Y4)=5716ee92eff7c4b053d44c0294ea88cd
+X3=f70d61693ea7f53f08c866d6eedb1e4b
+X4=dc40bc9a181b35aed66488071ef282ae
+X5=85ffa424b87b35cac7be9c450f0d7aee
+X6=65233cbe5251f7d246bfc967a8678647
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=82567fb0b4cc371801eadec005968e94
+C=d27e88681ce3243c4830165a8fdcf9ff1de9a1d8e6b447ef6ef7b79828666e4581e79012af34ddd9e2f037589b292db3e67c036745fa22e7e9b7373b
+T=dcf566ff291c25bbb8568fc3d376a6d9
diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test_source.txt b/security/nss/cmd/bltest/tests/aes_gcm/test_source.txt
new file mode 100644
index 000000000..0b1a4bf82
--- /dev/null
+++ b/security/nss/cmd/bltest/tests/aes_gcm/test_source.txt
@@ -0,0 +1,438 @@
+# AppendixB AES Test Vectors
+# From "The Galois/Counter Mode of Operation (GCM)", David A McGree & John Viega,
+# http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-spec.pdf
+#
+# This appendix contains test cases for AES GCM, with AES key sizes of 128, 192, and 256 bits. These
+# cases use the same notation as in Equations 1 and 2, with the exception that Ni is used in place of
+# Xi when GHASH is used to compute Y0 , in order to distinguish that case from the later invocation
+# of GHASH. All values are in hexadecimal, and a zero-length variable is indicated by the absence
+# of any hex digits. Each line consists of 128 bits of data, and variables whose lengths exceed that
+# value are continued on successive lines. The leftmost hex digit corresponds to the leftmost four
+# bits of the variable. For example, the lowest 128 bits of the field polynomial are represented as
+# e100000000000000000000000000000000.
+#
+
+test="Test Case 1"
+K=00000000000000000000000000000000
+P=
+IV=000000000000000000000000
+H=66e94bd4ef8a2c3b884cfa59ca342b2e
+Y0=00000000000000000000000000000001
+E(K,Y0)=58e2fccefa7e3061367f1d57a4e7455a
+len(A)||len(C)=00000000000000000000000000000000
+GHASH(H,A,C)=00000000000000000000000000000000
+C=
+T=58e2fccefa7e3061367f1d57a4e7455a
+
+
+test="Test Case 2"
+K=00000000000000000000000000000000
+P=00000000000000000000000000000000
+IV=000000000000000000000000
+H=66e94bd4ef8a2c3b884cfa59ca342b2e
+Y0=00000000000000000000000000000001
+E(K,Y0)=58e2fccefa7e3061367f1d57a4e7455a
+Y1=00000000000000000000000000000002
+E(K,Y1)=0388dace60b6a392f328c2b971b2fe78
+X1 5e2ec746917062882c85b0685353deb7
+len(A)||len(C)=00000000000000000000000000000080
+GHASH(H,A,C)=f38cbb1ad69223dcc3457ae5b6b0f885
+C=0388dace60b6a392f328c2b971b2fe78
+T=ab6e47d42cec13bdf53a67b21257bddf
+
+test="Test Case 3"
+K=feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
+IV=cafebabefacedbaddecaf888
+H=b83b533708bf535d0aa6e52980d53b78
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=3247184b3c4f69a44dbcd22887bbb418
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=9bb22ce7d9f372c1ee2b28722b25f206
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=650d887c3936533a1b8d4e1ea39d2b5c
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=3de91827c10e9a4f5240647ee5221f20
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=aac9e6ccc0074ac0873b9ba85d908bd0
+X1=59ed3f2bb1a0aaa07c9f56c6a504647b
+X2=b714c9048389afd9f9bc5c1d4378e052
+X3=47400c6577b1ee8d8f40b2721e86ff10
+X4=4796cf49464704b5dd91f159bb1b7f95
+len(A)||len(C)=00000000000000000000000000000200
+GHASH(H,A,C)=7f1b32b81b820d02614f8895ac1d4eac
+C=42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091473f5985
+T=4d5c2af327cd64a62cf35abd2ba6fab4
+
+test="Test Case 4"
+K=feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbaddecaf888
+H=b83b533708bf535d0aa6e52980d53b78
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=3247184b3c4f69a44dbcd22887bbb418
+X1=ed56aaf8a72d67049fdb9228edba1322
+X2=cd47221ccef0554ee4bb044c88150352
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=9bb22ce7d9f372c1ee2b28722b25f206
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=650d887c3936533a1b8d4e1ea39d2b5c
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=3de91827c10e9a4f5240647ee5221f20
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=aac9e6ccc0074ac0873b9ba85d908bd0
+X3=54f5e1b2b5a8f9525c23924751a3ca51
+X4=324f585c6ffc1359ab371565d6c45f93
+X5=ca7dd446af4aa70cc3c0cd5abba6aa1c
+X6=1590df9b2eb6768289e57d56274c8570
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=698e57f70e6ecc7fd9463b7260a9ae5f
+C=42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091
+T=5bc94fbc3221a5db94fae95ae7121a47
+
+test="Test Case 5"
+K=feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbad
+H=b83b533708bf535d0aa6e52980d53b78
+N1=6f288b846e5fed9a18376829c86a6a16
+len({})||len(C)=00000000000000000000000000000040
+Y0=c43a83c4c4badec4354ca984db252f7d
+E(K,Y0)=e94ab9535c72bea9e089c93d48e62fb0
+X1=ed56aaf8a72d67049fdb9228edba1322
+X2=cd47221ccef0554ee4bb044c88150352
+Y1=c43a83c4c4badec4354ca984db252f7e
+E(K,Y1)=b8040969d08295afd226fcda0ddf61cf
+Y2=c43a83c4c4badec4354ca984db252f7f
+E(K,Y2)=ef3c83225af93122192ad5c4f15dfe51
+Y3=c43a83c4c4badec4354ca984db252f80
+E(K,Y3)=6fbc659571f72de104c67b609d2fde67
+Y4=c43a83c4c4badec4354ca984db252f81
+E(K,Y4)=f8e3581441a1e950785c3ea1430c6fa6
+X3=9379e2feae14649c86cf2250e3a81916
+X4=65dde904c92a6b3db877c4817b50a5f4
+X5=48c53cf863b49a1b0bbfc48c3baaa89d
+X6=08c873f1c8cec3effc209a07468caab1
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=df586bb4c249b92cb6922877e444d37b
+C=61353b4c2806934a777ff51fa22a4755699b2a714fcdc6f83766e5f97b6c742373806900e49f24b22b097544d4896b424989b5e1ebac0f07c23f4598
+T=3612d2e79e3b0785561be14aaca2fccb
+
+test="Test Case 6"
+K=feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
+H=b83b533708bf535d0aa6e52980d53b78
+N1=004d6599d7fb1634756e1e299d81630f
+N2=88ffe8a3c8033df4b54d732f7f88408e
+N3=24e694cfab657beabba8055aad495e23
+N4=d8349a5eda24943c8fbb2ef5168b20cb
+len({})||len(IV)=000000000000000000000000000001e0
+Y0=3bab75780a31c059f83d2a44752f9864
+7dc63b399f2d98d57ab073b6baa4138e
+X1=ed56aaf8a72d67049fdb9228edba1322
+X2=cd47221ccef0554ee4bb044c88150352
+Y1=3bab75780a31c059f83d2a44752f9865
+E(K,Y1)=55d37bbd9ad21353a6f93a690eca9e0e
+Y2=3bab75780a31c059f83d2a44752f9866
+E(K,Y2)=3836bbf6d696e672946a1a01404fa6d5
+Y3=3bab75780a31c059f83d2a44752f9867
+E(K,Y3)=1dd8a5316ecc35c3e313bca59d2ac94a
+Y4=3bab75780a31c059f83d2a44752f9868
+E(K,Y4)=6742982706a9f154f657d5dc94b746db
+X3=31727669c63c6f078b5d22adbbbca384
+X4=480c00db2679065a7ed2f771a53acacd
+X5=1c1ae3c355e2214466a9923d2ba6ab35
+X6=0694c6f16bb0275a48891d06590344b0
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=1c5afe9760d3932f3c9a878aac3dc3de
+C=8ce24998625615b603a033aca13fb894be9112a5c3a211a8ba262a3cca7e2ca701e4a9a4fba43c90ccdcb281d48c7c6fd62875d2aca417034c34aee5
+T=619cc5aefffe0bfa462af43c1699d050
+
+test="Test Case 7"
+K=000000000000000000000000000000000000000000000000000000000000000000000000
+P=
+IV=aae06992acbf52a3e8f4a96ec9300bd7
+H=00000000000000000000000000000001
+Y0=cd33b28ac773f74ba00ed1f312572435
+E(K,Y0)=00000000000000000000000000000000
+GHASH(H,A,C)=00000000000000000000000000000000
+C=
+T=cd33b28ac773f74ba00ed1f31257243
+
+test="Test Case 8"
+K=000000000000000000000000000000000000000000000000
+P=00000000000000000000000000000000
+IV=000000000000000000000000
+H=aae06992acbf52a3e8f4a96ec9300bd7
+Y0=00000000000000000000000000000001
+E(K,Y0)=cd33b28ac773f74ba00ed1f312572435
+Y1=00000000000000000000000000000002
+E(K,Y1)=98e7247c07f0fe411c267e4384b0f600
+X1=90e87315fb7d4e1b4092ec0cbfda5d7d
+len(A)||len(C)=00000000000000000000000000000080
+GHASH(H,A,C)=e2c63f0ac44ad0e02efa05ab6743d4ce
+C=98e7247c07f0fe411c267e4384b0f600
+T=2ff58d80033927ab8ef4d4587514f0fb
+
+
+test="Test Case 9"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
+IV=cafebabefacedbaddecaf888
+H=466923ec9ae682214f2c082badb39249
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=c835aa88aebbc94f5a02e179fdcfc3e4
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=e0b1f82ec484eea44e5ff30128df01cd
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=0339b5b9b3db2e5e4cc9a38986906bee
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=614b3195542ccc7683ae933c81ec8a62
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=a988a97e85eec28e76b95c29b6023003
+X1=dddca3f91c17821ffac4a6d0fed176f7
+X2=a4e84ac60e2730f4a7e0e1eef708b198
+X3=e67592048dd7153973a0dbbb8804bee2
+X4=503e86628536625fb746ce3cecea433f
+len(A)||len(C)=00000000000000000000000000000200
+GHASH(H,A,C)=51110d40f6c8fff0eb1ae33445a889f0
+C=3980ca0b3c00e841eb06fac4872a2757859e1ceaa6efd984628593b40ca1e19c7d773d00c144c525ac619d18c84a3f4718e2448b2fe324d9ccda2710acade256
+T=9924a7c8587336bfb118024db8674a14
+
+test="Test Case 10"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbaddecaf888
+H=466923ec9ae682214f2c082badb39249
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=c835aa88aebbc94f5a02e179fdcfc3e4
+X1=f3bf7ba3e305aeb05ed0d2e4fe076666
+X2=20a51fa2302e9c01b87c48f2c3d91a56
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=e0b1f82ec484eea44e5ff30128df01cd
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=0339b5b9b3db2e5e4cc9a38986906bee
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=614b3195542ccc7683ae933c81ec8a62
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=a988a97e85eec28e76b95c29b6023003
+X3=714f9700ddf520f20695f6180c6e669d
+X4=e858680b7b240d2ecf7e06bbad4524e2
+X5=3f4865abd6bb3fb9f5c4a816f0a9b778
+X6=4256f67fe87b4f49422ba11af857c973
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=ed2ce3062e4a8ec06db8b4c490e8a268
+C=3980ca0b3c00e841eb06fac4872a2757859e1ceaa6efd984628593b40ca1e19c7d773d00c144c525ac619d18c84a3f4718e2448b2fe324d9ccda2710
+T=2519498e80f1478f37ba55bd6d27618c
+
+test="Test Case 11"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbad
+H=466923ec9ae682214f2c082badb39249
+N1=9473c07b02544299cf007c42c5778218
+len({})||len(IV)=00000000000000000000000000000040
+Y0=a14378078d27258a6292737e1802ada5
+E(K,Y0)=7bb6d647c902427ce7cf26563a337371
+X1=f3bf7ba3e305aeb05ed0d2e4fe076666
+X2=20a51fa2302e9c01b87c48f2c3d91a56
+Y1=a14378078d27258a6292737e1802ada6
+E(K,Y1)=d621c7bc5690a7b1487dbaab8ac76b22
+Y2=a14378078d27258a6292737e1802ada7
+E(K,Y2)=43c1ca7de78f4495ad0b18324e61fa25
+Y3=a14378078d27258a6292737e1802ada8
+E(K,Y3)=e1e0254a0f2f1626e9aa4ff09d7c64ec
+Y4=a14378078d27258a6292737e1802ada9
+E(K,Y4)=5850f4502486a1681a9319ce7d0afa59
+X3=8bdedafd6ee8e529689de3a269b8240d
+X4=6607feb377b49c9ecdbc696344fe22d8
+X5=8a19570a06500ba9405fcece4a73fb48
+X6=8532826e63ce4a5b89b70fa28f8070fe
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=1e6a133806607858ee80eaf237064089
+C=0f10f599ae14a154ed24b36e25324db8c566632ef2bbb34f8347280fc4507057fddc29df9a471f75c66541d4d4dad1c9e93a19a58e8b473fa0f062f7
+T=65dcc57fcf623a24094fcca40d3533f8
+
+test="Test Case 12"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
+H=466923ec9ae682214f2c082badb39249
+N1=19aef0f04763b0c87903c5a217d5314f
+N2=62120253f79efc978625d1feb03b5b5b
+N3=b6ce2a84e366de900fa78a1653df77fb
+N4=374ecad90487f0bb261ba817447e022c
+len({})||len(IV)=000000000000000000000000000001e0
+Y0=4505cdc367a054c5002820e96aebef27
+E(K,Y0)=5ea3194f9dd012a3b9bc5103d6e0284d
+X1=f3bf7ba3e305aeb05ed0d2e4fe076666
+X2=20a51fa2302e9c01b87c48f2c3d91a56
+Y1=4505cdc367a054c5002820e96aebef28
+E(K,Y1)=0b4fba4de46722d9ed691f9f2029df65
+Y2=4505cdc367a054c5002820e96aebef29
+E(K,Y2)=9b4e088bf380b03540bb87a5a257e437
+Y3=4505cdc367a054c5002820e96aebef2a
+E(K,Y3)=9ddb9c873a5cd48acd3f397cd28f9896
+Y4=4505cdc367a054c5002820e96aebef2b
+E(K,Y4)=5716ee92eff7c4b053d44c0294ea88cd
+X3=f70d61693ea7f53f08c866d6eedb1e4b
+X4=dc40bc9a181b35aed66488071ef282ae
+X5=85ffa424b87b35cac7be9c450f0d7aee
+X6=65233cbe5251f7d246bfc967a8678647
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=82567fb0b4cc371801eadec005968e94
+C=d27e88681ce3243c4830165a8fdcf9ff1de9a1d8e6b447ef6ef7b79828666e4581e79012af34ddd9e2f037589b292db3e67c036745fa22e7e9b7373b
+T=dcf566ff291c25bbb8568fc3d376a6d9
+
+test="Test Case 13"
+K=0000000000000000000000000000000000000000000000000000000000000000
+P=
+IV=000000000000000000000000
+H=dc95c078a2408989ad48a21492842087
+Y0=00000000000000000000000000000001
+E(K,Y0)=530f8afbc74536b9a963b4f1c4cb738b
+len(A)||len(C)=00000000000000000000000000000000
+GHASH(H,A,C)=00000000000000000000000000000000
+C=
+T=530f8afbc74536b9a963b4f1c4cb738b
+
+
+test="Test Case 14"
+K=0000000000000000000000000000000000000000000000000000000000000000
+P=00000000000000000000000000000000
+IV=000000000000000000000000
+H=dc95c078a2408989ad48a21492842087
+Y0=00000000000000000000000000000001
+E(K,Y0)=530f8afbc74536b9a963b4f1c4cb738b
+Y1=00000000000000000000000000000002
+E(K,Y1)=cea7403d4d606b6e074ec5d3baf39d18
+X1=fd6ab7586e556dba06d69cfe6223b262
+len(A)||len(C)=00000000000000000000000000000080
+GHASH(H,A,C)=83de425c5edc5d498f382c441041ca92
+C=cea7403d4d606b6e074ec5d3baf39d18
+T=d0d1c8a799996bf0265b98b5d48ab919
+
+test="Test Case 15"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
+IV=cafebabefacedbaddecaf888
+H=acbef20579b4b8ebce889bac8732dad7
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=fd2caa16a5832e76aa132c1453eeda7e
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=8b1cf3d561d27be251263e66857164e7
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=e29d258faad137135bd49280af645bd8
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=908c82ddcc65b26e887f85341f243d1d
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=749cf39639b79c5d06aa8d5b932fc7f8
+X1=fcbefb78635d598eddaf982310670f35
+X2=29de812309d3116a6eff7ec844484f3e
+X3=45fad9deeda9ea561b8f199c3613845b
+X4=ed95f8e164bf3213febc740f0bd9c6af
+len(A)||len(C)=00000000000000000000000000000200
+GHASH(H,A,C)=4db870d37cb75fcb46097c36230d1612
+C=522dc1f099567d07f47f37a32a84427d643a8cdcbfe5c0c97598a2bd2555d1aa8cb08e48590dbb3da7b08b1056828838c5f61e6393ba7a0abcc9f662898015ad
+T=b094dac5d93471bdec1a502270e3cc6c
+
+test="Test Case 16"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbaddecaf888
+H=acbef20579b4b8ebce889bac8732dad7
+Y0=cafebabefacedbaddecaf88800000001
+E(K,Y0)=fd2caa16a5832e76aa132c1453eeda7e
+X1=5165d242c2592c0a6375e2622cf925d2
+X2=8efa30ce83298b85fe71abefc0cdd01d
+Y1=cafebabefacedbaddecaf88800000002
+E(K,Y1)=8b1cf3d561d27be251263e66857164e7
+Y2=cafebabefacedbaddecaf88800000003
+E(K,Y2)=e29d258faad137135bd49280af645bd8
+Y3=cafebabefacedbaddecaf88800000004
+E(K,Y3)=908c82ddcc65b26e887f85341f243d1d
+Y4=cafebabefacedbaddecaf88800000005
+E(K,Y4)=749cf39639b79c5d06aa8d5b932fc7f8
+X3=abe07e0bb62354177480b550f9f6cdcc
+X4=3978e4f141b95f3b4699756b1c3c2082
+X5=8abf3c48901debe76837d8a05c7d6e87
+X6=9249beaf520c48b912fa120bbf391dc8
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=8bd0c4d8aacd391e67cca447e8c38f65
+C=522dc1f099567d07f47f37a32a84427d643a8cdcbfe5c0c97598a2bd2555d1aa8cb08e48590dbb3da7b08b1056828838c5f61e6393ba7a0abcc9f662
+T=76fc6ece0f4e1768cddf8853bb2d551b
+
+
+test="Test Case 17"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=cafebabefacedbad
+H=acbef20579b4b8ebce889bac8732dad7
+N1=90c22e3d2aca34b971e8bd09708fae5c
+len({})||len(IV)=00000000000000000000000000000040
+Y0=0095df49dd90abe3e4d252475748f5d4
+E(K,Y0)=4f903f37fe611d454217fbfa5cd7d791
+X1=5165d242c2592c0a6375e2622cf925d2
+X2=8efa30ce83298b85fe71abefc0cdd01d
+Y1=0095df49dd90abe3e4d252475748f5d5
+E(K,Y1)=1a471fd432fc7bd70b1ec8fe5e6d6251
+Y2=0095df49dd90abe3e4d252475748f5d6
+E(K,Y2)=29bd481e1ea39d20eb63c7ea118b1792
+Y3=0095df49dd90abe3e4d252475748f5d7
+E(K,Y3)=e2898e46ac5cada3ba83cc1272618a5d
+Y4=0095df49dd90abe3e4d252475748f5d8
+E(K,Y4)=d3c6aefbcea602ce4e1fe026065447bf
+X3=55e1ff68f9249e64b95223858e5cb936
+X4=cef1c034383dc96f733aaa4c99bd3e61
+X5=68588d004fd468f5854515039b08165d
+X6=2378943c034697f72a80fce5059bf3f3
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=75a34288b8c68f811c52b2e9a2f97f63
+C=c3762df1ca787d32ae47c13bf19844cbaf1ae14d0b976afac52ff7d79bba9de0feb582d33934a4f0954cc2363bc73f7862ac430e64abe499f47c9b1f
+T=3a337dbf46a792c45e454913fe2ea8f2
+
+test="Test Case 18"
+K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
+P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
+A=feedfacedeadbeeffeedfacedeadbeefabaddad2
+IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
+H=acbef20579b4b8ebce889bac8732dad7
+N1=0bfe66e2032f195516379f5fb710f987
+N2=f0631554d11409915feec8f9f5102aba
+N3=749b90dda19a1557fd9e9fd31fed1d14
+N4=7a6a833f260d848793b327cb07d1b190
+len({})||len(IV)=000000000000000000000000000001e0
+Y0=0cd953e2140a5976079f8e2406bc8eb4
+E(K,Y0)=71b54d092bb0c3d9ba94538d4096e691
+X1=5165d242c2592c0a6375e2622cf925d2
+X2=8efa30ce83298b85fe71abefc0cdd01d
+Y1=0cd953e2140a5976079f8e2406bc8eb5
+E(K,Y1)=83bcdd0af41a551452047196ca6b0cba
+Y2=0cd953e2140a5976079f8e2406bc8eb6
+E(K,Y2)=68151b79baea93c38e149b72e545e186
+Y3=0cd953e2140a5976079f8e2406bc8eb7
+E(K,Y3)=13fccf22159a4d16026ce5d58c7e99fb
+Y4=0cd953e2140a5976079f8e2406bc8eb8
+E(K,Y4)=132b64628a031e79fecd050675a64f07
+X3=e963941cfa8c417bdaa3b3d94ab4e905
+X4=2178d7f836e5fa105ce0fdf0fc8f0654
+X5=bac14eeba3216f966b3e7e011475b832
+X6=cc9ae9175729a649936e890bd971a8bf
+len(A)||len(C)=00000000000000a000000000000001e0
+GHASH(H,A,C)=d5ffcf6fc5ac4d69722187421a7f170b
+C=5a8def2f0c9e53f1f75d7853659e2a20eeb2b22aafde6419a058ab4f6f746bf40fc0c3b780f244452da3ebf1c5d82cdea2418997200ef82e44ae7e3f
+T=a44a8266ee1c8eb0c8b5d4cf5ae9f19a
+
+
+
+
+