lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201123181236.75616d6d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 23 Nov 2020 18:12:36 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Vadim Fedorenko <vfedorenko@...ek.ru>
Cc:     Boris Pismenny <borisp@...dia.com>,
        Aviad Yehezkel <aviadye@...dia.com>, netdev@...r.kernel.org
Subject: Re: [net-next 4/5] net/tls: add CHACHA20-POLY1305 configuration

The series LGTM, great to see chacha support!

One nit here, and when you post v2 would you mind ccing crypto?

From TLS perspective I think this code is ready to be merged, but
my crypto knowledge is close to none, so best if we give crypto
folks a chance to take a look.

On Sun, 22 Nov 2020 04:57:44 +0300 Vadim Fedorenko wrote:
> +	case TLS_CIPHER_CHACHA20_POLY1305: {
> +		nonce_size = 0;
> +		tag_size = TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE;
> +		iv_size = TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE;
> +		iv = ((struct tls12_crypto_info_chacha20_poly1305 *)crypto_info)->iv;

[1]

> +		rec_seq_size = TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE;
> +		rec_seq =
> +		((struct tls12_crypto_info_chacha20_poly1305 *)crypto_info)->rec_seq;

[2]

> +		chacha20_poly1305_info =
> +		(struct tls12_crypto_info_chacha20_poly1305 *)crypto_info;

Move this line up, and use it in [1] and [2].

You can also make it:

	chacha20_poly1305_info = (void *)crypto_info;

> +		keysize = TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE;
> +		key = chacha20_poly1305_info->key;
> +		salt = chacha20_poly1305_info->salt;
> +		salt_size = TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE;
> +		cipher_name = "rfc7539(chacha20,poly1305)";
> +		break;
> +	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ