{
byte[] derivation = Hex.decode("202122232425262728292a2b2c2d2e2f");
byte[] encoding = Hex.decode("303132333435363738393a3b3c3d3e3f");
IESCipher c1 = new org.bouncycastle.jcajce.provider.asymmetric.ec.IESCipher.ECIES();
IESCipher c2 = new org.bouncycastle.jcajce.provider.asymmetric.ec.IESCipher.ECIES();
IESParameterSpec params = new IESParameterSpec(derivation,encoding,128);
// Testing ECIES with default curve in streaming mode
KeyPairGenerator g = KeyPairGenerator.getInstance("EC", "BC");
doTest("ECIES with default", g, "ECIES", params);
// Testing ECIES with 192-bit curve in streaming mode
g.initialize(192, new SecureRandom());
doTest("ECIES with 192-bit", g, "ECIES", params);
// Testing ECIES with 256-bit curve in streaming mode
g.initialize(256, new SecureRandom());
doTest("ECIES with 256-bit", g, "ECIES", params);
c1 = new IESCipher(new IESEngine(new ECDHBasicAgreement(),
new KDF2BytesGenerator(new SHA1Digest()),
new HMac(new SHA1Digest()),
new PaddedBufferedBlockCipher(new DESEngine())));
c2 = new IESCipher(new IESEngine(new ECDHBasicAgreement(),
new KDF2BytesGenerator(new SHA1Digest()),
new HMac(new SHA1Digest()),
new PaddedBufferedBlockCipher(new DESEngine())));
params = new IESParameterSpec(derivation, encoding, 128, 128);