Authentication using Pre-shared keys is a method to authenticate using usernames and binary keys. This protocol avoids making use of public key infrastructure and expensive calculations, thus it is suitable for constraint clients.
The implementation in GnuTLS is based on [TLSPSK]. The supported PSK key exchange methods are:
Authentication using the PSK protocol.
Authentication using the PSK protocol and Diffie-Hellman key exchange. This method offers perfect forward secrecy.
Authentication using the PSK protocol and Elliptic curve Diffie-Hellman key exchange. This method offers perfect forward secrecy.
Helper functions to generate and maintain PSK keys are also included in GnuTLS.
int gnutls_key_generate (gnutls_datum_t * key, unsigned int key_size)
int gnutls_hex_encode (const gnutls_datum_t * data, char * result, size_t * result_size)
int gnutls_hex_decode (const gnutls_datum_t * hex_data, void * result, size_t * result_size)