[gnutls-devel] GnuTLS | Session ticket key rotation with TOTP (!695)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Fri Sep 14 14:05:56 CEST 2018


Nikos Mavrogiannopoulos started a new discussion on lib/stek.c:

> +#define KEY_POS (TICKET_KEY_NAME_SIZE)
> +#define MAC_SECRET_POS (TICKET_KEY_NAME_SIZE+TICKET_CIPHER_KEY_SIZE)
> +
> +static int totp_sha3(gnutls_session_t session,
> +		uint64_t t,
> +		const gnutls_datum_t *secret,
> +		uint8_t out[TICKET_MASTER_KEY_SIZE])
> +{
> +	int retval;
> +	uint8_t t_be[8];
> +	digest_hd_st hd;
> +	/*
> +	 * We choose SHA3-512 because it outputs 64 bytes,
> +	 * just the same length as the ticket key.
> +	 */
> +	gnutls_digest_algorithm_t algo = GNUTLS_DIG_SHA3_512;

nit: this can be a const

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/695#note_101419379
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20180914/b41a4f3f/attachment.html>


More information about the Gnutls-devel mailing list