[erlang-questions] crypto ECDSA private key -> public
semmit mondo
semmitmondo@REDACTED
Mon Oct 27 23:24:00 CET 2014
Yes and no. According to the source of the crypto module generate_key/3does accept a private key only for a few encryption method types.This is the only function head that matches ecdh: generate_key(ecdh, Curve, undefined) -> ... There's no definition for ecdh with a 3rd param that is notundefined. ...and generate_key/2 calls the above one: generate_key(Type, Params) ->
generate_key(Type, Params, undefined). It would be the function I'm after...
Ingela Andin <ingela.andin@REDACTED> írta:
>Hi! There is also a function crypto:generate_key/3 that takes a private key as third argument, maybe that is what you want? Regards Ingela Erlang/OTP team - Ericsson AB 2014-10-21 17:00 GMT+02:00 semmit mondo <semmitmondo@REDACTED>:
>>Hi, How can I generate an ECDSA public key from the private one using crypto?All I can do with it is to generate a public and private key pair at once: {Pub, Priv} = crypto:generate_key(ecdh, prime239v3). but can't calculate the public key if the private key was known beforehand. (prime239v3 isn't important, it could be any EC curve...)
>>_______________________________________________
>>erlang-questions mailing list
>>erlang-questions@REDACTED
>>http://erlang.org/mailman/listinfo/erlang-questions
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141027/624efc02/attachment.htm>
More information about the erlang-questions
mailing list