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

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Aug 7 07:46:07 CEST 2018


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

> + *
> + */
> +#include "gnutls_int.h"
> +#include <math.h>
> +#include "stek.h"
> +
> +#define T0 0
> +
> +#define NAME_POS (0)
> +#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,
> +		gnutls_datum_t *out)

thanks for updating it to a stack stored value. Note that a convention used all over the lib is to pass such values as an array, e.g., `uint8_t out[MAX_HASH_SIZE]`. The datum form is used when the function assigns the pointers in it. The array form gives also a better hint to compiler and static analyzers about the constraints.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/695#note_92864809
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/20180807/8b6286b1/attachment-0001.html>


More information about the Gnutls-devel mailing list