Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1275892
| From | Dave Watson <davejwatson@fb.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 2/2] Crypto kernel tls socket |
| Date | 2015-11-23 22:50 +0100 |
| Message-ID | <qy79M-7sk-9@gated-at.bofh.it> (permalink) |
| References | <qy3pw-51A-13@gated-at.bofh.it> <qy3pw-51A-23@gated-at.bofh.it> <qy4Yi-697-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 11/23/15 02:27 PM, Sowmini Varadhan wrote: > On (11/23/15 09:43), Dave Watson wrote: > > Currently gcm(aes) represents ~80% of our SSL connections. > > > > Userspace interface: > > > > 1) A transform and op socket are created using the userspace crypto interface > > 2) Setsockopt ALG_SET_AUTHSIZE is called > > 3) Setsockopt ALG_SET_KEY is called twice, since we need both send/recv keys > > 4) ALG_SET_IV cmsgs are sent twice, since we need both send/recv IVs. > > To support userspace heartbeats, changeciphersuite, etc, we would also need > > to get these back out, use them, then reset them via CMSG. > > 5) ALG_SET_OP cmsg is overloaded to mean FD to read/write from. > > [from patch 0/2:] > > If a non application-data TLS record is seen, it is left on the TCP > > socket and an error is returned on the ALG socket, and the record is > > left for userspace to manage. > > I'm trying to see how your approach would fit with the RDS-type of > use-case. RDS-TCP is mostly similar in concept to kcm, > except that rds has its own header for multiplexing, and has no > dependancy on BPF for basic things like re-assembling the datagram. > If I were to try to use this for RDS-TCP, the tls_tcp_read_sock() logic > would be merged into the recv_actor callback for RDS, right? Thus tls > control-plane message could be seen in the middle of the > data-stream, so we really have to freeze the processing of the data > stream till the control-plane message is processed? Correct. > In the tls.c example that you have, the opfd is generated from > the accept() on the AF_ALG socket- how would this work if I wanted > my opfd to be a PF_RDS or a PF_KCM or similar? For kcm, opfd is the fd you would pass along in kcm_attach. For rds, it looks like you'd want to use opfd as the sock instead of the new one created by sock_create_kern in rds_tcp_conn_connect. > One concern is that this patchset provides a solution for the "80%" > case but what about the other 20% (and the non x86 platforms)? Almost all the rest are aes sha. The actual encrypt / decrypt code would be similar to this previous patch: http://marc.info/?l=linux-kernel&m=140662647602192&w=2 The software routines in gcm(aes) should work for all platforms without aesni. > E.g., if I get a cipher-suite request outside the aes-ni, what would > happen (punt to uspace?) > > --Sowmini Right, bind() would fail and you would fallback to uspace. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/2] Crypto kernel TLS socket Dave Watson <davejwatson@fb.com> - 2015-11-23 18:50 +0100
[RFC PATCH 1/2] Crypto support aesni rfc5288 Dave Watson <davejwatson@fb.com> - 2015-11-23 18:50 +0100
Re: [RFC PATCH 1/2] Crypto support aesni rfc5288 Herbert Xu <herbert@gondor.apana.org.au> - 2015-11-24 11:40 +0100
[RFC PATCH 2/2] Crypto kernel tls socket Dave Watson <davejwatson@fb.com> - 2015-11-23 18:50 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2015-11-23 20:30 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Dave Watson <davejwatson@fb.com> - 2015-11-23 22:50 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2015-11-23 23:00 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Herbert Xu <herbert@gondor.apana.org.au> - 2015-11-24 11:40 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Stephan Mueller <smueller@chronox.de> - 2015-11-24 12:10 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-11-24 12:30 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Phil Sutter <phil@nwl.cc> - 2015-11-24 13:00 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Stephan Mueller <smueller@chronox.de> - 2015-11-24 13:40 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2015-11-24 13:00 +0100
Re: [RFC PATCH 2/2] Crypto kernel tls socket Stephan Mueller <smueller@chronox.de> - 2015-11-24 13:40 +0100
Re: [RFC PATCH 0/2] Crypto kernel TLS socket Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-11-23 20:20 +0100
csiph-web