From: "Henri S." Date: 2012-04-01T19:02:36+09:00 Subject: Re: ECDSA encryption with OpenSSL @Martin, you are right. It now works just fine with the modification of the last line as you suggested. Thank you. But this is only the first part of the problem. A HSM (Harware Security Module) gives me a public key point (X,Y) for signed messages verification The code would look like this: ============= # data: being a known message # sig: being the signature of the message # ec_point: being the public_key # curve: string name if the EC curve # key = OpenSSL::PKey::EC.new(curve) #set the public key key.public_key=ec_point # then we verify message signature with key.dsa_verify_asn1(data, sig) ============== the problem is I can't figure out how to generate either a proper OpenSSL::PKey::EC::Point or a suitable OpenSSL::PKey::EC , using the public key point coordinates received by the HSM. since there is no ruby method equivalent for "EC_POINT_set_affine_coordinates_GFp(...) " Could anyone help ? -- Posted via http://www.ruby-forum.com/.