Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: net/socket/ssl_client_socket_impl.cc

Issue 2101283004: TLS CECPQ1 (experimental post-quantum) ciphers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_impl.cc
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
index 487a406d1f7124593946c9f640526636e0fac185..ce0b9879906f1a1c1326579b367ec5dce160fe0e 100644
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -17,6 +17,7 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
+#include "base/feature_list.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/singleton.h"
@@ -84,6 +85,12 @@ const uint8_t kTbProtocolVersionMinor = 6;
const uint8_t kTbMinProtocolVersionMajor = 0;
const uint8_t kTbMinProtocolVersionMinor = 6;
+// Reviewer: enable or disable by default? Is there an obviously right choice
+// here? I'm defaulting to DISABLED_BY_DEFAULT because it seems like the
+// easiest mechanism to enable this on desktop only.
davidben 2016/06/28 21:23:53 I think disabled by default is probably right?
mab 2016/06/28 22:12:33 Per conversation with agl, I'm removing the Finch
+const base::Feature kPostQuantumExperiment{"SSLPostQuantumExperiment",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
bool EVP_MDToPrivateKeyHash(const EVP_MD* md, SSLPrivateKey::Hash* hash) {
switch (EVP_MD_type(md)) {
case NID_md5_sha1:
@@ -966,7 +973,27 @@ int SSLClientSocketImpl::Init() {
// DHE_RSA_WITH_AES_256_GCM_SHA384. Historically, AES_256_GCM was not
// supported. As DHE is being deprecated, don't add a cipher only to remove it
// immediately.
- std::string command(
+ std::string command;
+ if (base::FeatureList::IsEnabled(kPostQuantumExperiment)) {
+ // These are experimental, non-standard ciphersuites. They are part of an
+ // experiment in post-quantum cryptography. They're not intended to
+ // represent a de-facto standard, and will be removed from BoringSSL in
+ // ~2018.
+ if (EVP_has_aes_hardware()) {
+ command.append(
+ "CECPQ1-RSA-AES256-GCM-SHA384:"
+ "CECPQ1-ECDSA-AES256-GCM-SHA384:");
+ }
+ command.append(
+ "CECPQ1-RSA-CHACHA20-POLY1305-SHA256:"
+ "CECPQ1-ECDSA-CHACHA20-POLY1305-SHA256:");
+ if (!EVP_has_aes_hardware()) {
+ command.append(
+ "CECPQ1-RSA-AES256-GCM-SHA384:"
+ "CECPQ1-ECDSA-AES256-GCM-SHA384:");
+ }
+ }
+ command.append(
"DEFAULT:!SHA256:!SHA384:!DHE-RSA-AES256-GCM-SHA384:!aPSK:!RC4");
davidben 2016/06/28 21:23:53 DEFAULT is kind of dumb and doesn't work if it's n
mab 2016/06/28 22:12:33 Sooo ... I should change this to "ALL"? :-)
if (ssl_config_.require_ecdhe)
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698