aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data/pubkey/ecies.vec
blob: 7ae73c30fe22ad2c79cae10577ca54b04ee074c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# random keys created by botan

# ciphertext created with bouncycastle 1.54. example:
#	public static void main( String[] args )
#		throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidCipherTextException
#	{
#		X9ECParameters spec = SECNamedCurves.getByName( "secp160r1" );
#		ECDomainParameters ecDomain = new ECDomainParameters( spec.getCurve(), spec.getG(), spec.getN() );
#		
#		ECPrivateKeyParameters alice = new ECPrivateKeyParameters( new BigInteger( "1239488582848888730519239446720775754920686817364", 10 ), ecDomain );
#		ECPrivateKeyParameters bob = new ECPrivateKeyParameters( new BigInteger( "1255825134563225934367124570783723166851629196761", 10 ), ecDomain );
#		ECPublicKeyParameters alicePublicKey = new ECPublicKeyParameters( alice.getParameters().getG().multiply( alice.getD() ), alice.getParameters() );
#		ECPublicKeyParameters bobPublicKey = new ECPublicKeyParameters( bob.getParameters().getG().multiply( bob.getD() ), bob.getParameters() );
#		
#		byte[] d = new byte[ 0 ];
#		byte[] e = new byte[ 0 ];
#		byte[] iv = new byte[ 16 ];
#		CipherParameters p = new ParametersWithIV( new IESWithCipherParameters( d, e, 160, 256 ), iv );
#		
#		IESEngine ecies =
#			new IESEngine( new ECDHBasicAgreement(), new KDF2BytesGenerator( new SHA1Digest() ), new HMac( new SHA256Digest() ), new PaddedBufferedBlockCipher( new CBCBlockCipher(
#				new AESEngine() ) ) );
#		ecies.init( true, alice, bobPublicKey, p );
#		
#		byte[] message = Hex.decode( "00" );
#		byte[] result = ecies.processBlock( message, 0, message.length );
#		
#		byte[] ephPublicKey = alicePublicKey.getQ().getEncoded( true );
#		byte[] out = Arrays.concatenate( ephPublicKey, result );
#		
#		System.out.println( Hex.toHexString( out ) );
#	}

Curve = secp160r1
PrivateKey = 1239488582848888730519239446720775754920686817364
OtherPrivateKey = 1255825134563225934367124570783723166851629196761
Kdf = KDF2(SHA-1)
Dem = AES-256/CBC
DemKeyLen = 32
Iv = 00000000000000000000000000000000
Mac = HMAC(SHA-256)
MacKeyLen = 20
Format = compressed
CofactorMode = 0
OldCofactorMode = 0
CheckMode = 0
SingleHashMode = 1
Label =
Plaintext = 00
Ciphertext = 02b26eafa6b51a39790c32a75c2f10b3e8e89d698a6da2667af153734225c8922800db5e10b73975848cceac0fc78cef589b2e93a81cc204dbc7b9b901cbaa4509e61141d7

Curve = secp521r1
PrivateKey = 4050298667054381376040649773970530311598264897556821662677634075002761777100287880684822948852132235484464537021197213998300006547176718172344447619746779823
OtherPrivateKey = 2294226772740614508941417891614236736606752960073669253551166842586609531509032791476032516821966982891507407145617606630445744825404691681749451640151380153
Kdf = KDF2(SHA-1)
Dem = Camellia-128/CBC
DemKeyLen = 16
Iv = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Mac = HMAC(SHA-256)
MacKeyLen = 16
Format = uncompressed
CofactorMode = 0
OldCofactorMode = 0
CheckMode = 0
SingleHashMode = 1
Label = Test
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = 0401519eaa0489ff9d51e98e4c22349463e2001cd06f8ce47d81d4007a79acf98e92c814686477cea666efc277dc84e15fc95e38aff8e16d478a44cd5c5f1517f8b1f300000591317f261c3d04a7207f01eae3ec70f23600f82c53cc0b85be7ac9f6ce79ef2ab416e5934d61ba9d346385d7545c57f77c7ea7c58e18c70cbfb0a24ae1b994eda8dbc666713558717077dde021d9252b7f68eef0bc369086f6a6cb991fcc2fbcac3671a122ba18541790974cef7420cb53e7d6f30d1b808dddd58a63413f7b

# use secp112r2 - curve with cofactor != 1
Curve = -----BEGIN EC PARAMETERS-----MHMCAQEwGgYHKoZIzj0BAQIPANt8Kr9i415mgHa+rSCLMCAEDmEnwkwF84oKqvZcDvAsBA5R3vGBXbXtdPzDTIXXCQQdBEujCrXokrThZJ3QkoZDrc1G9YguN0fe826VbpcCDjbfCq/YuNdZfKEFINBLAgEE-----END EC PARAMETERS-----
PrivateKey = 656008468895526658474428975817604
OtherPrivateKey = 563449446384594847151017584539074
Kdf = KDF2(SHA-1)
Dem = Camellia-128/CBC
DemKeyLen = 16
Iv = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Mac = HMAC(SHA-256)
MacKeyLen = 16
Format = uncompressed
CofactorMode = 0
OldCofactorMode = 1
CheckMode = 0
SingleHashMode = 1
Label = Test
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = 048c40bda0986dadeb651178b4a8e64b7735fb02f43e621151849ea761a0f79fbb500b76e4eb9cd65281b804406536d04059b60689ed286490afcbf8f7f32dfefff8d37d29d335cb11aef3cc5d65f87571e3c8799974038f9d377a2683

# use secp112r2 - curve with cofactor != 1
Curve = -----BEGIN EC PARAMETERS-----MHMCAQEwGgYHKoZIzj0BAQIPANt8Kr9i415mgHa+rSCLMCAEDmEnwkwF84oKqvZcDvAsBA5R3vGBXbXtdPzDTIXXCQQdBEujCrXokrThZJ3QkoZDrc1G9YguN0fe826VbpcCDjbfCq/YuNdZfKEFINBLAgEE-----END EC PARAMETERS-----
PrivateKey = 656008468895526658474428975817604
OtherPrivateKey = 563449446384594847151017584539074
Kdf = KDF2(SHA-1)
Dem = Camellia-128/CBC
DemKeyLen = 16
Iv = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Mac = HMAC(SHA-256)
MacKeyLen = 16
Format = uncompressed
CofactorMode = 1
OldCofactorMode = 0
CheckMode = 0
SingleHashMode = 1
Label = Test
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = 048c40bda0986dadeb651178b4a8e64b7735fb02f43e621151849ea761230f2bddf1ffa3262673bcb3f468dd8b92c31a32e23935cfd27dfcc123928a18bbc82bdcada733be6d42119d3fb968ac4b77fff9a47d336fa025bfad3ee54286

# bouncycastle does not support aead ciphers with IESEngine -> the following ciphertext has been created with botan (asserts deterministic ciphertext)

Curve = brainpool512r1
PrivateKey = 7978796978847894400103470063598909318992754342406974939475470191530421638356103244921001321651015274653183103561457607601257178840534133802655904526250737
OtherPrivateKey = 2308129338363763325603164530220543667351108423592731601992535938718831256964324847657313285466745344259451280420400800014583532495130674675477133156417282
Kdf = KDF2(SHA-1)
Dem = Twofish/GCM
DemKeyLen = 32
Iv = 00000000000000000000000000000000
Mac = HMAC(SHA-512)
MacKeyLen = 64
Format = compressed
CofactorMode = 0
OldCofactorMode = 0
CheckMode = 0
SingleHashMode = 0
Label = Test
Plaintext = 00
Ciphertext = 02407515774fad019b762e2ba4c04fa6ff35ba7acc356a167cdf83747e5438b5494a6727366f4d031f2c676eed78a99bf74da9e4edd808fc2360927d52213997d35cd8371d89195b5294da4f99ab1126c703093361c9f6067314b39b70762b13fff1d0fb5ad043a67074ad89176af7ea7d562a0f8c5b9f721192c5c5d338ceea8d59c492aebc3de551dd9ed6fc346c02c586