cfrg / draft-irtf-cfrg-hpke

Hybrid Public Key Encryption
Other
49 stars 29 forks source link

Test vector issue with P256 #207

Closed tomleavy closed 3 years ago

tomleavy commented 3 years ago

One of the test vectors contains a pkRm value of 04dc8b502e23e9bd533918ad19238aa39e334f5fac3114875fcf3be3a67f003fa5215d39a8bb0d42e2a883a0b7f3cea08bf73aaa3b3e057ab6db766e75d2a141e3

When I pass that value to openssl to the EC_POINT_oct2point function specifying the P256 curve I get an error saying point is not on curve

I have tested the code against test vector points from other P256 related test vectors and they have all been ok

chris-wood commented 3 years ago

Please see #208 for a final set of test vectors. Given that these have been verified by other implementations, I'd be surprised if this were an issue with the vector. Closing this for now. Please comment over in that PR if the problem remains!

tomleavy commented 3 years ago

Turns out I was using SECP256K1 instead of X9_62_PRIME256V1 inside OpenSSL. All working now, thanks!