Add test data for ECDH
authorDr. Stephen Henson <steve@openssl.org>
Sat, 30 Jan 2016 03:34:39 +0000 (03:34 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 30 Jan 2016 16:02:48 +0000 (16:02 +0000)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
test/evptests.txt

index 83452b4..a7d29b8 100644 (file)
@@ -2255,6 +2255,20 @@ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAELBUPQpznDyFsJSz14GLOH2Oc1dFl
 x/iUJAcsJxl9eLM7kg6VzbZk6ZDc8M/qDZTiqOavnQ5YBW5lMQSSW5/myQ==
 -----END PUBLIC KEY-----
 
 x/iUJAcsJxl9eLM7kg6VzbZk6ZDc8M/qDZTiqOavnQ5YBW5lMQSSW5/myQ==
 -----END PUBLIC KEY-----
 
+# Additional EC key for ECDH
+PrivateKey=P-256-Peer
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIP1Ec7tUwzcFBVmd4nSyEgGaRGNL3ydqSwe3/l548pdjoAoGCCqGSM49
+AwEHoUQDQgAEIAbl4UoHiqc/uKYl5WElS78tDU/sCrmVlCNy6lFAldO8IPkSyzGP
+MjSvZI6nIGQ7P3Afm3reuJ0KvnTZ77acRg==
+-----END EC PRIVATE KEY-----
+
+PublicKey=P-256-Peer-PUBLIC
+-----BEGIN PUBLIC KEY-----
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIAbl4UoHiqc/uKYl5WElS78tDU/s
+CrmVlCNy6lFAldO8IPkSyzGPMjSvZI6nIGQ7P3Afm3reuJ0KvnTZ77acRg==
+-----END PUBLIC KEY-----
+
 # DSA key
 PrivateKey=DSA-1024
 
 # DSA key
 PrivateKey=DSA-1024
 
@@ -2956,3 +2970,14 @@ MD=MD5-SHA1
 Seed = 02
 Output = 03
 Result = KDF_DERIVE_ERROR
 Seed = 02
 Output = 03
 Result = KDF_DERIVE_ERROR
+
+
+# ECDH tests
+
+Derive=P-256
+PeerKey=P-256-Peer-PUBLIC
+SharedSecret=E3CC07DFBDDE76A1139811DB9FF5FAF9D17EF39944F1E77D1F6A208524BF7B1B
+
+Derive=P-256-Peer
+PeerKey=P-256-PUBLIC
+SharedSecret=E3CC07DFBDDE76A1139811DB9FF5FAF9D17EF39944F1E77D1F6A208524BF7B1B