[erlang-questions] Looking for help with crypto:dh_generate_key/1
Dan Gudmundsson
dgud@REDACTED
Fri Apr 2 09:05:31 CEST 2010
Use crypto:dh_generate_parameters(512,2)
/Dan
On Thu, Apr 1, 2010 at 8:46 PM, Max Lapshin <max.lapshin@REDACTED> wrote:
> I can't understand, what do I need to pass to dh_generate_key for
> generating public and private keys.
>
> Documentation tells: dh_generate_key(DHParams)
>
> DHParameters = [P, G]
> P, G = Mpint
> Where P is the shared prime number and G is the shared generator.
>
> I'm trying
>
> crypto:dh_generate_key([2, 137]).
>
> ** exception error: bad argument
> in function port_control/3
> called as port_control(crypto_drv02,45,[<<0,0,0,0>>,[2,137]])
> in call from crypto:control/2
> in call from crypto:dh_generate_key/2
>
> So, what should I pass? Just an example. Google doesn't tell anything
> interesting.
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
More information about the erlang-questions
mailing list