Package org.bouncycastle.crypto.test
package org.bouncycastle.crypto.test
Example code and test classes for the lightweight API.
-
ClassesClassDescriptionTest vectors from the NIST standard tests and Brian Gladman's vector set https://fp.gladman.plus.com/cryptography_technology/rijndael/Test vectors from the NIST standard tests and Brian Gladman's vector set https://fp.gladman.plus.com/cryptography_technology/rijndael/Test vectors from the NIST standard tests and Brian Gladman's vector set https://fp.gladman.plus.com/cryptography_technology/rijndael/Test vectors from the NIST standard tests and Brian Gladman's vector set https://fp.gladman.plus.com/cryptography_technology/rijndael/This is a test harness I use because I cannot modify the BC test harness without invalidating the signature on their signed provider library.Wrap TestTests from https://tools.ietf.org/html/draft-irtf-cfrg-argon2-03Test Cases for Blake3.a basic test that takes a cipher, key parameter, and an input and output string.Test whether block ciphers implement reset contract on init, encrypt/decrypt and reset.a basic test that takes a cipher, key parameter, and an input and output string.blowfish tester - vectors from https://www.counterpane.com/vectors.txtCamellia tester - vectors from https://www.cosic.esat.kuleuven.be/nessie/testvectors/ and RFC 3713Camellia tester - vectors from https://www.cosic.esat.kuleuven.be/nessie/testvectors/ and RFC 3713cast tester - vectors from https://www.ietf.org/rfc/rfc2144.txtcast6 tester - vectors from https://www.ietf.org/rfc/rfc2612.txtFirst four test vectors from NIST Special Publication 800-38C.ChaCha TestCMAC tester - Official Test Vectors.CSHAKE test vectors from: https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/cSHAKE_samples.pdfCTS testerDESede testerDES tester - vectors from FIPS 81Tests are taken from RFC 6979 - "Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)"DHKEK Generator tests - from RFC 2631.Test based on FIPS 186-2, Appendix 5, an example of DSA, and FIPS 168-3 test vectors.ECDHKEK Generator tests.ECGOST3410 tests are taken from GOST R 34.10-2001.Tests for the ECIES Key Encapsulation Mechanismtest for ECIES - Elliptic Curve Integrated Encryption SchemeECNR tests.ECDSA tests are taken from X9.62.test for Ethereum flavor of ECIES - Elliptic Curve Integrated Encryption SchemeAES-GCM_SIV test cases.Test vectors from "The Galois/Counter Mode of Operation (GCM)", McGrew/Viega, Appendix BTest vectors for AES-GMAC, extracted from NIST CAVP GCM test vectors.GOST 28147 MAC testersee GOST_R_3413-2015Grain-128 TestGrain v1 TestHC-128 and HC-256 Tests.HC-128 and HC-256 Tests.HKDF tests - vectors from RFC 5869, + 2 more, 101 and 102ISAAC Test - see https://www.burtleburtle.net/bob/rand/isaacafa.htmltest vectors from ISO 9796-1 and ISO 9796-2 edition 1.Test Cases for Kangaroo12.KDF1 tests - vectors from ISO 18033.KDF2 tests - vectors from ISO 18033.Keccak Digest TestKMAC test vectors from:Test Cases for LEA Cipher.standard vector test for MD2 from RFC1319 by B.Kaliski of RSA Laboratories April 1992standard vector test for MD4 from RFC 1320.standard vector test for MD5 from "Handbook of Applied Cryptography", page 345.MD5 HMac Test, test vectors from RFC 2202MGF1 tests - vectors from ISO 18033 for KDF1 (equivalent).CFB/OFB Mode test of IV padding.Test case for NaccacheStern cipher.CTS testerNoekeon testerSHA1 HMac Test, test vectors from RFC 2202Test vectors from RFC 7253 on The OCB Authenticated-Encryption AlgorithmGeneral Padding tests.ParallelHash test vectors from:test for PKCS12 key generation - vectors from https://www.drh-consultancy.demon.co.uk/test.txtA test class for PKCS5 PBES2 with PBKDF2 (PKCS5 v2.0) using test vectors provider at RSA's PKCS5 Page
The vectors are Base 64 encoded and encrypted using the password "password" (without quotes).RC2 tester - vectors from ftp://ftp.isi.edu/in-notes/rfc2268.txt RFC 2268 "A Description of the RC2(r) Encryption Algorithm"RC2 wrap testerRC4 TestRC5 tester - vectors from ftp://ftp.nordu.net/rfc/rfc2040.txt RFC 2040 "The RC5, RC5-CBC, RC5-CBC-Pad, and RC5-CTS Algorithms"RC6 Test - test vectors from AES Submitted RSA Reference implementation.Wrap Test based on RFC3211 test vectorsTest vectors from the NIST standard tests and Brian Gladman's vector set https://fp.gladman.plus.com/cryptography_technology/rijndael/RIPEMD128 Digest TestRIPEMD128 HMac Test, test vectors from RFC 2286RIPEMD160 Digest TestRIPEMD160 HMac Test, test vectors from RFC 2286RIPEMD128 Digest TestRIPEMD320 Digest TestTests for the RSA Key Encapsulation MechanismSalsa20 TestSEED tester - vectors https://www.ietf.org/rfc/rfc4009.txtTest vectors based on the NESSIE submissionstandard vector test for SHA-1 from "Handbook of Applied Cryptography", page 345.SHA1 HMac Test, test vectors from RFC 2202standard vector test for SHA-224 from RFC 3874 - only the last three are in the RFC.SHA224 HMac Teststandard vector test for SHA-256 from FIPS Draft 180-2.SHA256 HMac Teststandard vector test for SHA-384 from FIPS Draft 180-2.SHA384 HMac TestSHA3 Digest TestSHA224 HMac Teststandard vector test for SHA-512 from FIPS Draft 180-2.SHA512 HMac Teststandard vector test for SHA-512/224 from FIPS 180-4.standard vector test for SHA-512/256 from FIPS 180-4.Shacal2 tester - vectors from https://www.cosic.esat.kuleuven.be/nessie/testvectors/SHAKE Digest Teststandard vector test for SM3 digest from chinese specificationSM4 tester, vectors from https://eprint.iacr.org/2008/329.pdfTest whether block ciphers implement reset contract on init, encrypt/decrypt and reset.a basic test that takes a stream cipher, key parameter, and an input and output string.TEA tester - based on C implementation results from https://www.simonshepherd.supanet.com/tea.htmTiger Digest TestTest vectors based on Floppy 4 of the Serpent AES submission.TupleHash test vectors from:VMPC TestVMPC TestISO vector test for WhirlpoolTEA tester - based on C implementation results from https://www.simonshepherd.supanet.com/tea.htmTest Cases for Zuc128 and Zuc256.