public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Watson <davejwatson@fb.com>
To: Vakul Garg <vakul.garg@nxp.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Peter Doliwa <peter.doliwa@nxp.com>,
	Boris Pismenny <borisp@mellanox.com>
Subject: Re: Security enhancement proposal for kernel TLS
Date: Fri, 3 Aug 2018 08:46:32 -0700	[thread overview]
Message-ID: <20180803154632.GA34510@macbook-pro-81.local.dhcp.thefacebook.com> (raw)
In-Reply-To: <DB7PR04MB42522A3C774880D4532F38728B2C0@DB7PR04MB4252.eurprd04.prod.outlook.com>

On 08/02/18 05:23 PM, Vakul Garg wrote:
> > I agree that Boris' patch does what you say it does - it sets keys immediately
> > after CCS instead of after FINISHED message.  I disagree that the kernel tls
> > implementation currently requires that specific ordering, nor do I think that it
> > should require that ordering.
> 
> The current kernel implementation assumes record sequence number to start from '0'.
> If keys have to be set after FINISHED message, then record sequence number need to
> be communicated from user space TLS stack to kernel. IIRC, sequence number is not 
> part of the interface through which key is transferred.

The setsockopt call struct takes the key, iv, salt, and seqno:

struct tls12_crypto_info_aes_gcm_128 {
        struct tls_crypto_info info;
        unsigned char iv[TLS_CIPHER_AES_GCM_128_IV_SIZE];
        unsigned char key[TLS_CIPHER_AES_GCM_128_KEY_SIZE];
        unsigned char salt[TLS_CIPHER_AES_GCM_128_SALT_SIZE];
        unsigned char rec_seq[TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE];
};

      reply	other threads:[~2018-08-03 17:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-22 12:49 Security enhancement proposal for kernel TLS Vakul Garg
2018-07-25 15:59 ` Dave Watson
2018-07-30  6:31   ` Vakul Garg
2018-07-30 21:16     ` Dave Watson
2018-07-31 10:45       ` Vakul Garg
2018-08-01 20:46         ` Dave Watson
2018-08-02 17:23           ` Vakul Garg
2018-08-03 15:46             ` Dave Watson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180803154632.GA34510@macbook-pro-81.local.dhcp.thefacebook.com \
    --to=davejwatson@fb.com \
    --cc=borisp@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.doliwa@nxp.com \
    --cc=vakul.garg@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox