diff options
author | nelsonb%netscape.com <devnull@localhost> | 2005-04-06 23:19:22 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2005-04-06 23:19:22 +0000 |
commit | 18ae738833ffed5df36bb5e6660d91dee4dd94ec (patch) | |
tree | 48327625dfbf185aa3ccdb8de11a0c7acaef798a /security/nss | |
parent | 705baae0e4c5ab4186394bffcd910db0dfac8807 (diff) | |
download | nss-hg-18ae738833ffed5df36bb5e6660d91dee4dd94ec.tar.gz |
decouple block size from buffer size for AES/rijndael in bltest.
Bug 289066. r=saul.edwards,rrelyea.
Diffstat (limited to 'security/nss')
-rw-r--r-- | security/nss/cmd/bltest/blapitest.c | 8 | ||||
-rw-r--r-- | security/nss/tests/cipher/hash.txt | 6 | ||||
-rw-r--r-- | security/nss/tests/cipher/symmkey.txt | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/security/nss/cmd/bltest/blapitest.c b/security/nss/cmd/bltest/blapitest.c index a2f968003..2a5a90c73 100644 --- a/security/nss/cmd/bltest/blapitest.c +++ b/security/nss/cmd/bltest/blapitest.c @@ -1223,13 +1223,13 @@ bltest_rc5_init(bltestCipherInfo *cipherInfo, PRBool encrypt) SECStatus bltest_aes_init(bltestCipherInfo *cipherInfo, PRBool encrypt) { - PRIntervalTime time1, time2; bltestSymmKeyParams *aesp = &cipherInfo->params.sk; int minorMode; int i; - /* XXX */ int keylen, blocklen; - keylen = aesp->key.buf.len; - blocklen = cipherInfo->input.pBuf.len; + int keylen = aesp->key.buf.len; + int blocklen = AES_BLOCK_SIZE; + PRIntervalTime time1, time2; + switch (cipherInfo->mode) { case bltestAES_ECB: minorMode = NSS_AES; break; case bltestAES_CBC: minorMode = NSS_AES_CBC; break; diff --git a/security/nss/tests/cipher/hash.txt b/security/nss/tests/cipher/hash.txt index 17c6a41a1..6a785640b 100644 --- a/security/nss/tests/cipher/hash.txt +++ b/security/nss/tests/cipher/hash.txt @@ -3,6 +3,6 @@ # # # mode bufsize repetitions - md2 1024 1000 - md5 1024 100000 - sha1 1024 10000 + md2 10240 5000 + md5 10240 100000 + sha1 10240 100000 diff --git a/security/nss/tests/cipher/symmkey.txt b/security/nss/tests/cipher/symmkey.txt index 741f86880..d1f18ad1c 100644 --- a/security/nss/tests/cipher/symmkey.txt +++ b/security/nss/tests/cipher/symmkey.txt @@ -17,3 +17,7 @@ rc4 8 8192 10000 100000 rc4 16 8192 10000 100000 rc4 24 8192 10000 100000 + aes_ecb 16 8192 10000 100000 + aes_cbc 16 8192 10000 100000 + aes_ecb 32 8192 10000 100000 + aes_cbc 32 8192 10000 100000 |