help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnutls] Dynamically building the PSK keys


From: Nikos Mavrogiannopoulos
Subject: Re: [Help-gnutls] Dynamically building the PSK keys
Date: Thu, 16 Jul 2009 22:48:00 +0300
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Ram G wrote:
> Finally I could complete the handshake using DHE-PSK. I followed the samples
> ex-client-psk.c and ex-serv-psk.c but instead of hardcoded keys, I
> dynamically assigned the keys as follows:
> 
> char * dynamickeys; //Could be any string with hex characters like DEADBEEF
> atohx(key->data,dynamickeys);

If you want to use passwords for psk please use
gnutls_psk_netconf_derive_key(). If you just want to convert hex to
binary data you can just use gnutls_hex_encode and decode. PSK works
with keys (not passwords) that are usually derived from a device such as
/dev/(u)random.

regards,
Nikos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]