Package org.bouncycastle.crypto.test
Example code and test classes for the lightweight API.
-
Class Summary Class Description AEADTestUtil AESFastTest Test vectors from the NIST standard tests and Brian Gladman's vector set http://fp.gladman.plus.com/cryptography_technology/rijndael/AESLightTest Test vectors from the NIST standard tests and Brian Gladman's vector set http://fp.gladman.plus.com/cryptography_technology/rijndael/AESTest Test vectors from the NIST standard tests and Brian Gladman's vector set http://fp.gladman.plus.com/cryptography_technology/rijndael/AESVectorFileTest Test vectors from the NIST standard tests and Brian Gladman's vector set http://fp.gladman.plus.com/cryptography_technology/rijndael/AESWrapPadTest This is a test harness I use because I cannot modify the BC test harness without invalidating the signature on their signed provider library.AESWrapTest Wrap TestAllTests Argon2Test Tests from https://tools.ietf.org/html/draft-irtf-cfrg-argon2-03ARIATest BCryptTest BigIntegersTest BigSkippingCipherTest Blake2bDigestTest Blake2sDigestTest Blake2xsDigestTest BlockCipherMonteCarloTest a basic test that takes a cipher, key parameter, and an input and output string.BlockCipherResetTest Test whether block ciphers implement reset contract on init, encrypt/decrypt and reset.BlockCipherVectorTest a basic test that takes a cipher, key parameter, and an input and output string.BlowfishTest blowfish tester - vectors from https://www.counterpane.com/vectors.txtCamelliaLightTest Camellia tester - vectors from https://www.cosic.esat.kuleuven.be/nessie/testvectors/ and RFC 3713CamelliaTest Camellia tester - vectors from https://www.cosic.esat.kuleuven.be/nessie/testvectors/ and RFC 3713CAST5Test cast tester - vectors from https://www.ietf.org/rfc/rfc2144.txtCAST6Test cast6 tester - vectors from https://www.ietf.org/rfc/rfc2612.txtCCMTest First four test vectors from NIST Special Publication 800-38C.ChaCha20Poly1305Test ChaChaTest ChaCha TestCipherStreamTest CipherTest CMacTest CMAC tester - Official Test Vectors.CramerShoupTest CSHAKETest CSHAKE test vectors from: https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/cSHAKE_samples.pdfCTSTest CTS testerDESedeTest DESede testerDESTest DES tester - vectors from FIPS 81DeterministicDSATest Tests are taken from RFC 6979 - "Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)"DHKEKGeneratorTest DHKEK Generator tests - from RFC 2631.DHTest DigestRandomNumberTest DigestTest DSATest Test based on FIPS 186-2, Appendix 5, an example of DSA, and FIPS 168-3 test vectors.DSTU4145Test DSTU7564Test DSTU7624Test EAXTest ECDHKEKGeneratorTest ECDHKEK Generator tests.ECGOST3410Test ECGOST3410 tests are taken from GOST R 34.10-2001.ECIESKeyEncapsulationTest Tests for the ECIES Key Encapsulation MechanismECIESTest test for ECIES - Elliptic Curve Integrated Encryption SchemeECNRTest ECNR tests.ECTest ECDSA tests are taken from X9.62.Ed25519Test Ed448Test ElGamalTest EqualsHashCodeTest EthereumIESTest test for Ethereum flavor of ECIES - Elliptic Curve Integrated Encryption SchemeGCMReorderTest GCMTest Test vectors from "The Galois/Counter Mode of Operation (GCM)", McGrew/Viega, Appendix BGMacTest Test vectors for AES-GMAC, extracted from NIST CAVP GCM test vectors.GOST28147MacTest GOST 28147 MAC testerGOST28147Test GOST3410Test GOST3411_2012_256DigestTest GOST3411_2012_512DigestTest GOST3411DigestTest GOST3412MacTest see GOST_R_3413-2015GOST3412Test Grain128Test Grain-128 TestGrainv1Test Grain v1 TestGSKKDFTest Haraka256DigestTest Haraka512DigestTest HashCommitmentTest HCFamilyTest HC-128 and HC-256 Tests.HCFamilyVecTest HC-128 and HC-256 Tests.HKDFGeneratorTest HKDF tests - vectors from RFC 5869, + 2 more, 101 and 102IDEATest ISAACTest ISAAC Test - see https://www.burtleburtle.net/bob/rand/isaacafa.htmlISO9796Test test vectors from ISO 9796-1 and ISO 9796-2 edition 1.ISO9797Alg3MacTest IsoTrailerTest JournalingSecureRandomTest KDF1GeneratorTest KDF1 tests - vectors from ISO 18033.KDF2GeneratorTest KDF2 tests - vectors from ISO 18033.KDFCounterGeneratorTest KDFDoublePipelineIteratorGeneratorTest KDFFeedbackGeneratorTest KeccakDigestTest Keccak Digest TestKMACTest KMAC test vectors from:MacTest MD2DigestTest standard vector test for MD2 from RFC1319 by B.Kaliski of RSA Laboratories April 1992MD4DigestTest standard vector test for MD4 from RFC 1320.MD5DigestTest standard vector test for MD5 from "Handbook of Applied Cryptography", page 345.MD5HMacTest MD5 HMac Test, test vectors from RFC 2202MGF1GeneratorTest MGF1 tests - vectors from ISO 18033 for KDF1 (equivalent).ModeTest CFB/OFB Mode test of IV padding.NaccacheSternTest Test case for NaccacheStern cipher.NISTCTSTest CTS testerNISTECCTest NoekeonTest Noekeon testerNonMemoableDigestTest SHA1 HMac Test, test vectors from RFC 2202NullTest OAEPTest OCBTest Test vectors from RFC 7253 on The OCB Authenticated-Encryption AlgorithmOpenBSDBCryptTest OpenSSHKeyParsingTests PaddingTest General Padding tests.PKCS12Test test for PKCS12 key generation - vectors from https://www.drh-consultancy.demon.co.uk/test.txtPKCS5Test A 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).Poly1305Test PSSBlindTest PSSTest RC2Test RC2 tester - vectors from ftp://ftp.isi.edu/in-notes/rfc2268.txt RFC 2268 "A Description of the RC2(r) Encryption Algorithm"RC2WrapTest RC2 wrap testerRC4Test RC4 TestRC5Test RC5 tester - vectors from ftp://ftp.nordu.net/rfc/rfc2040.txt RFC 2040 "The RC5, RC5-CBC, RC5-CBC-Pad, and RC5-CTS Algorithms"RC6Test RC6 Test - test vectors from AES Submitted RSA Reference implementation.RegressionTest ResetTest RFC3211WrapTest Wrap Test based on RFC3211 test vectorsRijndaelTest Test vectors from the NIST standard tests and Brian Gladman's vector set http://fp.gladman.plus.com/cryptography_technology/rijndael/RIPEMD128DigestTest RIPEMD128 Digest TestRIPEMD128HMacTest RIPEMD128 HMac Test, test vectors from RFC 2286RIPEMD160DigestTest RIPEMD160 Digest TestRIPEMD160HMacTest RIPEMD160 HMac Test, test vectors from RFC 2286RIPEMD256DigestTest RIPEMD128 Digest TestRIPEMD320DigestTest RIPEMD320 Digest TestRSABlindedTest RSADigestSignerTest RSAKeyEncapsulationTest Tests for the RSA Key Encapsulation MechanismRSATest Salsa20Test Salsa20 TestSCryptTest SEEDTest SEED tester - vectors https://www.ietf.org/rfc/rfc4009.txtSerpentTest Test vectors based on the NESSIE submissionSHA1DigestTest standard vector test for SHA-1 from "Handbook of Applied Cryptography", page 345.SHA1HMacTest SHA1 HMac Test, test vectors from RFC 2202SHA224DigestTest standard vector test for SHA-224 from RFC 3874 - only the last three are in the RFC.SHA224HMacTest SHA224 HMac TestSHA256DigestTest standard vector test for SHA-256 from FIPS Draft 180-2.SHA256HMacTest SHA256 HMac TestSHA384DigestTest standard vector test for SHA-384 from FIPS Draft 180-2.SHA384HMacTest SHA384 HMac TestSHA3DigestTest SHA3 Digest TestSHA3HMacTest SHA224 HMac TestSHA512DigestTest standard vector test for SHA-512 from FIPS Draft 180-2.SHA512HMacTest SHA512 HMac TestSHA512t224DigestTest standard vector test for SHA-512/224 from FIPS 180-4.SHA512t256DigestTest standard vector test for SHA-512/256 from FIPS 180-4.Shacal2Test Shacal2 tester - vectors from https://www.cosic.esat.kuleuven.be/nessie/testvectors/SHAKEDigestTest SHAKE Digest TestShortenedDigestTest SimpleTestTest SipHash128Test SipHashTest SkeinDigestTest SkeinMacTest SkipjackTest SM2EngineTest SM2KeyExchangeTest SM2SignerTest SM3DigestTest standard vector test for SM3 digest from chinese specificationSM4Test SM4 tester, vectors from http://eprint.iacr.org/2008/329.pdfSRP6Test StreamCipherResetTest Test whether block ciphers implement reset contract on init, encrypt/decrypt and reset.StreamCipherVectorTest a basic test that takes a stream cipher, key parameter, and an input and output string.TEATest TEA tester - based on C implementation results from https://www.simonshepherd.supanet.com/tea.htmThreefish1024Test Threefish256Test Threefish512Test TigerDigestTest Tiger Digest TestTnepresTest Test vectors based on Floppy 4 of the Serpent AES submission.TwofishTest VMPCKSA3Test VMPC TestVMPCMacTest VMPCTest VMPC TestWhirlpoolDigestTest ISO vector test for WhirlpoolX25519Test X448Test X931SignerTest XSalsa20Test XTEATest TEA tester - based on C implementation results from https://www.simonshepherd.supanet.com/tea.htmZucTest Test Cases for Zuc128 and Zuc256.