[openssl-users] What does EC_KEY_get0_public_key  deliver?
    Christian Weber 
    weber at infotech.de
       
    Thu Jan  8 17:16:08 UTC 2015
    
    
  
Dear OpenSSL-Users,
recently i found a pitfall using EC_KEY_get0_public_key(key->pkey.ec).
The function just returns a copy to a pointer to key->pub_key which is a 
EC_POINT pointer.
The key itself is taken from a certificate using EVP_PKEY *key = 
X509_get_pubkey(cert);
Fine, i assumed, these must be coordinates of the publich key in the 
elements X and Y!
Both are BIGNUMS as expected.
BUT instead i got some tranformed coordinates.
Finally i got the coordinates by using EC_POINT_point2hex() with the 
propoer group and
converting its output.
There seems to be no instantly accessible BIGNUM-pair represesentation 
of a ECDSA
public key, which i would like to gain access to.
What am i missing?
Thanks in advance
-- Chris
    
    
More information about the openssl-users
mailing list