diff --git a/quic/core/chlo_extractor_test.cc b/quic/core/chlo_extractor_test.cc
index bab1378..57d8925 100644
--- a/quic/core/chlo_extractor_test.cc
+++ b/quic/core/chlo_extractor_test.cc
@@ -81,14 +81,14 @@
           QuicFrame(QuicStreamFrame(stream_id, false, offset, data)));
     } else {
       frames.push_back(
-          QuicFrame(new QuicCryptoFrame(ENCRYPTION_NONE, offset, data)));
+          QuicFrame(new QuicCryptoFrame(ENCRYPTION_INITIAL, offset, data)));
     }
     std::unique_ptr<QuicPacket> packet(
         BuildUnsizedDataPacket(&framer, header_, frames));
     EXPECT_TRUE(packet != nullptr);
     size_t encrypted_length =
-        framer.EncryptPayload(ENCRYPTION_NONE, header_.packet_number, *packet,
-                              buffer_, QUIC_ARRAYSIZE(buffer_));
+        framer.EncryptPayload(ENCRYPTION_INITIAL, header_.packet_number,
+                              *packet, buffer_, QUIC_ARRAYSIZE(buffer_));
     ASSERT_NE(0u, encrypted_length);
     packet_ = QuicMakeUnique<QuicEncryptedPacket>(buffer_, encrypted_length);
     EXPECT_TRUE(packet_ != nullptr);
diff --git a/quic/core/congestion_control/general_loss_algorithm_test.cc b/quic/core/congestion_control/general_loss_algorithm_test.cc
index 91a25da..c6e0145 100644
--- a/quic/core/congestion_control/general_loss_algorithm_test.cc
+++ b/quic/core/congestion_control/general_loss_algorithm_test.cc
@@ -59,7 +59,7 @@
                     const std::vector<uint64_t>& losses_expected) {
     if (unacked_packets_.use_uber_loss_algorithm()) {
       unacked_packets_.MaybeUpdateLargestAckedOfPacketNumberSpace(
-          ENCRYPTION_NONE, QuicPacketNumber(largest_newly_acked));
+          ENCRYPTION_INITIAL, QuicPacketNumber(largest_newly_acked));
     } else if (!unacked_packets_.largest_acked().IsInitialized() ||
                QuicPacketNumber(largest_newly_acked) >
                    unacked_packets_.largest_acked()) {
@@ -216,7 +216,7 @@
   // Early retransmit when the final packet gets acked and the first is nacked.
   if (unacked_packets_.use_uber_loss_algorithm()) {
     unacked_packets_.MaybeUpdateLargestAckedOfPacketNumberSpace(
-        ENCRYPTION_NONE, QuicPacketNumber(2));
+        ENCRYPTION_INITIAL, QuicPacketNumber(2));
   } else {
     unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(2));
   }
@@ -239,7 +239,7 @@
   // Early retransmit when the final packet gets acked and the first is nacked.
   if (unacked_packets_.use_uber_loss_algorithm()) {
     unacked_packets_.MaybeUpdateLargestAckedOfPacketNumberSpace(
-        ENCRYPTION_NONE, QuicPacketNumber(2));
+        ENCRYPTION_INITIAL, QuicPacketNumber(2));
   } else {
     unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(2));
   }
@@ -271,7 +271,7 @@
   clock_.AdvanceTime(rtt_stats_.smoothed_rtt());
   if (unacked_packets_.use_uber_loss_algorithm()) {
     unacked_packets_.MaybeUpdateLargestAckedOfPacketNumberSpace(
-        ENCRYPTION_NONE, QuicPacketNumber(2));
+        ENCRYPTION_INITIAL, QuicPacketNumber(2));
   } else {
     unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(2));
   }
diff --git a/quic/core/congestion_control/uber_loss_algorithm_test.cc b/quic/core/congestion_control/uber_loss_algorithm_test.cc
index 9aa2041..ee61e42 100644
--- a/quic/core/congestion_control/uber_loss_algorithm_test.cc
+++ b/quic/core/congestion_control/uber_loss_algorithm_test.cc
@@ -32,7 +32,7 @@
   void SendPacket(uint64_t packet_number, EncryptionLevel encryption_level) {
     QuicStreamFrame frame;
     frame.stream_id =
-        encryption_level == ENCRYPTION_NONE
+        encryption_level == ENCRYPTION_INITIAL
             ? QuicUtils::GetCryptoStreamId(
                   CurrentSupportedVersions()[0].transport_version)
             : QuicUtils::GetHeadersStreamId(
@@ -82,15 +82,15 @@
   // Server receives and buffers packets 2 and 3. Server receives packet 4 and
   // processes handshake asynchronously, so server acks 4 and cannot process
   // packets 2 and 3.
-  SendPacket(1, ENCRYPTION_NONE);
+  SendPacket(1, ENCRYPTION_INITIAL);
   SendPacket(2, ENCRYPTION_ZERO_RTT);
   SendPacket(3, ENCRYPTION_ZERO_RTT);
   unacked_packets_->RemoveFromInFlight(QuicPacketNumber(1));
-  SendPacket(4, ENCRYPTION_NONE);
+  SendPacket(4, ENCRYPTION_INITIAL);
 
   AckPackets({1, 4});
   unacked_packets_->MaybeUpdateLargestAckedOfPacketNumberSpace(
-      ENCRYPTION_NONE, QuicPacketNumber(4));
+      ENCRYPTION_INITIAL, QuicPacketNumber(4));
   // Verify no packet is detected lost.
   VerifyLosses(4, packets_acked_, std::vector<uint64_t>{});
   EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
diff --git a/quic/core/frames/quic_crypto_frame.cc b/quic/core/frames/quic_crypto_frame.cc
index 9d602bc..fafbba8 100644
--- a/quic/core/frames/quic_crypto_frame.cc
+++ b/quic/core/frames/quic_crypto_frame.cc
@@ -9,7 +9,7 @@
 namespace quic {
 
 QuicCryptoFrame::QuicCryptoFrame()
-    : QuicCryptoFrame(ENCRYPTION_NONE, 0, nullptr, 0) {}
+    : QuicCryptoFrame(ENCRYPTION_INITIAL, 0, nullptr, 0) {}
 
 QuicCryptoFrame::QuicCryptoFrame(EncryptionLevel level,
                                  QuicStreamOffset offset,
diff --git a/quic/core/http/quic_spdy_client_session_test.cc b/quic/core/http/quic_spdy_client_session_test.cc
index 1f5b45d..d528d1e 100644
--- a/quic/core/http/quic_spdy_client_session_test.cc
+++ b/quic/core/http/quic_spdy_client_session_test.cc
@@ -211,7 +211,7 @@
   crypto_test_utils::SendHandshakeMessageToStream(
       session_->GetMutableCryptoStream(), rej, Perspective::IS_CLIENT);
   EXPECT_FALSE(session_->IsEncryptionEstablished());
-  EXPECT_EQ(ENCRYPTION_NONE,
+  EXPECT_EQ(ENCRYPTION_INITIAL,
             QuicPacketCreatorPeer::GetEncryptionLevel(
                 QuicConnectionPeer::GetPacketCreator(connection_)));
   // Verify that no new streams may be created.
diff --git a/quic/core/http/quic_spdy_session_test.cc b/quic/core/http/quic_spdy_session_test.cc
index b246a0c..6e0dfff 100644
--- a/quic/core/http/quic_spdy_session_test.cc
+++ b/quic/core/http/quic_spdy_session_test.cc
@@ -1673,7 +1673,7 @@
   if (!QuicVersionUsesCryptoFrames(connection_->transport_version())) {
     session_.OnFrameLost(QuicFrame(frame1));
   } else {
-    QuicCryptoFrame crypto_frame(ENCRYPTION_NONE, 0, 1300);
+    QuicCryptoFrame crypto_frame(ENCRYPTION_INITIAL, 0, 1300);
     session_.OnFrameLost(QuicFrame(&crypto_frame));
   }
   session_.OnFrameLost(QuicFrame(frame2));
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index eef291f..cf72fec 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -232,7 +232,7 @@
       per_packet_options_(nullptr),
       writer_(writer),
       owns_writer_(owns_writer),
-      encryption_level_(ENCRYPTION_NONE),
+      encryption_level_(ENCRYPTION_INITIAL),
       clock_(helper->GetClock()),
       random_generator_(helper->GetRandomGenerator()),
       connection_id_(connection_id),
@@ -242,7 +242,7 @@
       last_packet_decrypted_(false),
       last_size_(0),
       current_packet_data_(nullptr),
-      last_decrypted_packet_level_(ENCRYPTION_NONE),
+      last_decrypted_packet_level_(ENCRYPTION_INITIAL),
       should_last_packet_instigate_acks_(false),
       was_last_packet_missing_(false),
       max_undecryptable_packets_(0),
@@ -900,7 +900,7 @@
     debug_visitor_->OnStreamFrame(frame);
   }
   if (frame.stream_id != QuicUtils::GetCryptoStreamId(transport_version()) &&
-      last_decrypted_packet_level_ == ENCRYPTION_NONE) {
+      last_decrypted_packet_level_ == ENCRYPTION_INITIAL) {
     if (MaybeConsiderAsMemoryCorruption(frame)) {
       CloseConnection(QUIC_MAYBE_CORRUPTED_MEMORY,
                       "Received crypto frame on non crypto stream.",
@@ -1968,7 +1968,7 @@
   }
 
   if (perspective_ == Perspective::IS_SERVER &&
-      encryption_level_ == ENCRYPTION_NONE &&
+      encryption_level_ == ENCRYPTION_INITIAL &&
       last_size_ > packet_generator_.GetCurrentMaxPacketLength()) {
     SetMaxPacketLength(last_size_);
   }
@@ -2433,7 +2433,7 @@
 
   QuicPacketNumber packet_number = packet.packet_number;
   if (encryption_level_ == ENCRYPTION_FORWARD_SECURE &&
-      packet.encryption_level == ENCRYPTION_NONE) {
+      packet.encryption_level == ENCRYPTION_INITIAL) {
     // Drop packets that are NULL encrypted since the peer won't accept them
     // anymore.
     QUIC_DLOG(INFO) << ENDPOINT
@@ -2724,7 +2724,8 @@
 void QuicConnection::MaybeProcessUndecryptablePackets() {
   process_undecryptable_packets_alarm_->Cancel();
 
-  if (undecryptable_packets_.empty() || encryption_level_ == ENCRYPTION_NONE) {
+  if (undecryptable_packets_.empty() ||
+      encryption_level_ == ENCRYPTION_INITIAL) {
     return;
   }
 
@@ -3477,7 +3478,7 @@
 bool QuicConnection::MaybeConsiderAsMemoryCorruption(
     const QuicStreamFrame& frame) {
   if (frame.stream_id == QuicUtils::GetCryptoStreamId(transport_version()) ||
-      last_decrypted_packet_level_ != ENCRYPTION_NONE) {
+      last_decrypted_packet_level_ != ENCRYPTION_INITIAL) {
     return false;
   }
 
@@ -3738,7 +3739,7 @@
     }
     return ENCRYPTION_ZERO_RTT;
   }
-  return ENCRYPTION_NONE;
+  return ENCRYPTION_INITIAL;
 }
 
 size_t QuicConnection::min_received_before_ack_decimation() const {
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index de95792..00a966d 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -96,7 +96,7 @@
 
 QuicLongHeaderType EncryptionlevelToLongHeaderType(EncryptionLevel level) {
   switch (level) {
-    case ENCRYPTION_NONE:
+    case ENCRYPTION_INITIAL:
       return INITIAL;
     case ENCRYPTION_HANDSHAKE:
       return HANDSHAKE;
@@ -345,7 +345,7 @@
     }
 
     if (use_tagging_decrypter_) {
-      framer_.framer()->SetDecrypter(ENCRYPTION_NONE,
+      framer_.framer()->SetDecrypter(ENCRYPTION_INITIAL,
                                      QuicMakeUnique<TaggingDecrypter>());
     }
     EXPECT_TRUE(framer_.ProcessPacket(packet));
@@ -602,8 +602,8 @@
     char buffer[kMaxPacketSize];
     size_t encrypted_length =
         QuicConnectionPeer::GetFramer(this)->EncryptPayload(
-            ENCRYPTION_NONE, QuicPacketNumber(packet_number), *packet, buffer,
-            kMaxPacketSize);
+            ENCRYPTION_INITIAL, QuicPacketNumber(packet_number), *packet,
+            buffer, kMaxPacketSize);
     SerializedPacket serialized_packet(
         QuicPacketNumber(packet_number), PACKET_4BYTE_PACKET_NUMBER, buffer,
         encrypted_length, has_ack, has_pending_frames);
@@ -634,7 +634,7 @@
                                             StreamSendingState state) {
     ScopedPacketFlusher flusher(this, NO_ACK);
     if (id != QuicUtils::GetCryptoStreamId(transport_version()) &&
-        this->encryption_level() == ENCRYPTION_NONE) {
+        this->encryption_level() == ENCRYPTION_INITIAL) {
       this->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
     }
     struct iovec iov;
@@ -673,13 +673,13 @@
           QuicUtils::GetCryptoStreamId(transport_version()), data, offset,
           NO_FIN);
     }
-    producer_.SaveCryptoData(ENCRYPTION_NONE, offset, data);
+    producer_.SaveCryptoData(ENCRYPTION_INITIAL, offset, data);
     size_t bytes_written;
     if (notifier_) {
       bytes_written =
-          notifier_->WriteCryptoData(ENCRYPTION_NONE, data.length(), offset);
+          notifier_->WriteCryptoData(ENCRYPTION_INITIAL, data.length(), offset);
     } else {
-      bytes_written = QuicConnection::SendCryptoData(ENCRYPTION_NONE,
+      bytes_written = QuicConnection::SendCryptoData(ENCRYPTION_INITIAL,
                                                      data.length(), offset);
     }
     return QuicConsumedData(bytes_written, /*fin_consumed*/ false);
@@ -996,7 +996,7 @@
     QuicPacketCreatorPeer::SetSendVersionInPacket(
         &peer_creator_, connection_.perspective() == Perspective::IS_SERVER);
     if (QuicPacketCreatorPeer::GetEncryptionLevel(&peer_creator_) >
-        ENCRYPTION_NONE) {
+        ENCRYPTION_INITIAL) {
       // Set peer_framer_'s corresponding encrypter.
       peer_creator_.SetEncrypter(
           QuicPacketCreatorPeer::GetEncryptionLevel(&peer_creator_),
@@ -1027,11 +1027,11 @@
     QuicPacketCreatorPeer::FillPacketHeader(&peer_creator_, &header);
     char encrypted_buffer[kMaxPacketSize];
     size_t length = peer_framer_.BuildDataPacket(
-        header, frames, encrypted_buffer, kMaxPacketSize, ENCRYPTION_NONE);
+        header, frames, encrypted_buffer, kMaxPacketSize, ENCRYPTION_INITIAL);
     DCHECK_GT(length, 0u);
 
     const size_t encrypted_length = peer_framer_.EncryptInPlace(
-        ENCRYPTION_NONE, header.packet_number,
+        ENCRYPTION_INITIAL, header.packet_number,
         GetStartOfEncryptedData(peer_framer_.version().transport_version,
                                 header),
         length, kMaxPacketSize, encrypted_buffer);
@@ -1068,11 +1068,11 @@
   }
 
   size_t ProcessDataPacket(uint64_t number) {
-    return ProcessDataPacketAtLevel(number, false, ENCRYPTION_NONE);
+    return ProcessDataPacketAtLevel(number, false, ENCRYPTION_INITIAL);
   }
 
   size_t ProcessDataPacket(QuicPacketNumber packet_number) {
-    return ProcessDataPacketAtLevel(packet_number, false, ENCRYPTION_NONE);
+    return ProcessDataPacketAtLevel(packet_number, false, ENCRYPTION_INITIAL);
   }
 
   size_t ProcessDataPacketAtLevel(QuicPacketNumber packet_number,
@@ -1102,9 +1102,9 @@
   void ProcessClosePacket(uint64_t number) {
     std::unique_ptr<QuicPacket> packet(ConstructClosePacket(number));
     char buffer[kMaxPacketSize];
-    size_t encrypted_length =
-        peer_framer_.EncryptPayload(ENCRYPTION_NONE, QuicPacketNumber(number),
-                                    *packet, buffer, kMaxPacketSize);
+    size_t encrypted_length = peer_framer_.EncryptPayload(
+        ENCRYPTION_INITIAL, QuicPacketNumber(number), *packet, buffer,
+        kMaxPacketSize);
     connection_.ProcessUdpPacket(
         kSelfAddress, kPeerAddress,
         QuicReceivedPacket(buffer, encrypted_length, QuicTime::Zero(), false));
@@ -2055,8 +2055,9 @@
   frames.push_back(QuicFrame(padding));
   std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
-  size_t encrypted_length = peer_framer_.EncryptPayload(
-      ENCRYPTION_NONE, QuicPacketNumber(12), *packet, buffer, kMaxPacketSize);
+  size_t encrypted_length =
+      peer_framer_.EncryptPayload(ENCRYPTION_INITIAL, QuicPacketNumber(12),
+                                  *packet, buffer, kMaxPacketSize);
   EXPECT_EQ(kMaxPacketSize, encrypted_length);
 
   framer_.set_version(version());
@@ -2095,8 +2096,9 @@
   frames.push_back(QuicFrame(padding));
   std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
-  size_t encrypted_length = peer_framer_.EncryptPayload(
-      ENCRYPTION_NONE, QuicPacketNumber(12), *packet, buffer, kMaxPacketSize);
+  size_t encrypted_length =
+      peer_framer_.EncryptPayload(ENCRYPTION_INITIAL, QuicPacketNumber(12),
+                                  *packet, buffer, kMaxPacketSize);
   EXPECT_EQ(kMaxPacketSize, encrypted_length);
 
   framer_.set_version(version());
@@ -3392,9 +3394,9 @@
   // is returned.
   const uint64_t received_packet_num = 1;
   const bool has_stop_waiting = false;
-  const EncryptionLevel level = ENCRYPTION_NONE;
+  const EncryptionLevel level = ENCRYPTION_INITIAL;
   std::unique_ptr<QuicPacket> packet(ConstructDataPacket(
-      received_packet_num, has_stop_waiting, ENCRYPTION_NONE));
+      received_packet_num, has_stop_waiting, ENCRYPTION_INITIAL));
   char buffer[kMaxPacketSize];
   size_t encrypted_length =
       peer_framer_.EncryptPayload(level, QuicPacketNumber(received_packet_num),
@@ -3623,7 +3625,7 @@
 
   // A TaggingEncrypter puts kTagSize copies of the given byte (0x01 here) at
   // the end of the packet. We can test this to check which encrypter was used.
-  connection_.SetEncrypter(ENCRYPTION_NONE,
+  connection_.SetEncrypter(ENCRYPTION_INITIAL,
                            QuicMakeUnique<TaggingEncrypter>(0x01));
   SendStreamDataToPeer(
       QuicUtils::GetCryptoStreamId(connection_.transport_version()), "foo", 0,
@@ -3647,7 +3649,7 @@
   // Manually mark both packets for retransmission.
   connection_.RetransmitUnackedPackets(ALL_UNACKED_RETRANSMISSION);
 
-  // Packet should have been sent with ENCRYPTION_NONE.
+  // Packet should have been sent with ENCRYPTION_INITIAL.
   EXPECT_EQ(0x01010101u, writer_->final_bytes_of_previous_packet());
 
   // Packet should have been sent with ENCRYPTION_ZERO_RTT.
@@ -3658,7 +3660,7 @@
   use_tagging_decrypter();
   // A TaggingEncrypter puts kTagSize copies of the given byte (0x01 here) at
   // the end of the packet. We can test this to check which encrypter was used.
-  connection_.SetEncrypter(ENCRYPTION_NONE,
+  connection_.SetEncrypter(ENCRYPTION_INITIAL,
                            QuicMakeUnique<TaggingEncrypter>(0x01));
 
   // Attempt to send a handshake message and have the socket block.
@@ -3688,7 +3690,7 @@
 TEST_P(QuicConnectionTest,
        DropRetransmitsForNullEncryptedPacketAfterForwardSecure) {
   use_tagging_decrypter();
-  connection_.SetEncrypter(ENCRYPTION_NONE,
+  connection_.SetEncrypter(ENCRYPTION_INITIAL,
                            QuicMakeUnique<TaggingEncrypter>(0x01));
   QuicPacketNumber packet_number;
   connection_.SendCryptoStreamData();
@@ -3714,9 +3716,9 @@
 
 TEST_P(QuicConnectionTest, RetransmitPacketsWithInitialEncryption) {
   use_tagging_decrypter();
-  connection_.SetEncrypter(ENCRYPTION_NONE,
+  connection_.SetEncrypter(ENCRYPTION_INITIAL,
                            QuicMakeUnique<TaggingEncrypter>(0x01));
-  connection_.SetDefaultEncryptionLevel(ENCRYPTION_NONE);
+  connection_.SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
 
   SendStreamDataToPeer(
       QuicUtils::GetCryptoStreamId(connection_.transport_version()), "foo", 0,
@@ -4953,10 +4955,10 @@
   // Test that if we send a packet without delay, it is not queued.
   QuicFramerPeer::SetPerspective(&peer_framer_, Perspective::IS_CLIENT);
   std::unique_ptr<QuicPacket> packet =
-      ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_NONE);
+      ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_INITIAL);
   QuicPacketCreatorPeer::SetPacketNumber(creator_, 1);
   EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _));
-  connection_.SendPacket(ENCRYPTION_NONE, 1, std::move(packet),
+  connection_.SendPacket(ENCRYPTION_INITIAL, 1, std::move(packet),
                          HAS_RETRANSMITTABLE_DATA, false, false);
   EXPECT_EQ(0u, connection_.NumQueuedPackets());
 }
@@ -4967,22 +4969,22 @@
   QuicFramerPeer::SetPerspective(&peer_framer_, Perspective::IS_CLIENT);
   EXPECT_CALL(visitor_, OnConnectionClosed(_, _, _)).Times(1);
   std::unique_ptr<QuicPacket> packet =
-      ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_NONE);
+      ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_INITIAL);
   QuicPacketCreatorPeer::SetPacketNumber(creator_, 1);
   writer_->SetShouldWriteFail();
-  connection_.SendPacket(ENCRYPTION_NONE, 1, std::move(packet),
+  connection_.SendPacket(ENCRYPTION_INITIAL, 1, std::move(packet),
                          HAS_RETRANSMITTABLE_DATA, false, false);
 }
 
 TEST_P(QuicConnectionTest, SendSchedulerEAGAIN) {
   QuicFramerPeer::SetPerspective(&peer_framer_, Perspective::IS_CLIENT);
   std::unique_ptr<QuicPacket> packet =
-      ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_NONE);
+      ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_INITIAL);
   QuicPacketCreatorPeer::SetPacketNumber(creator_, 1);
   BlockOnNextWrite();
   EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, QuicPacketNumber(2u), _, _))
       .Times(0);
-  connection_.SendPacket(ENCRYPTION_NONE, 1, std::move(packet),
+  connection_.SendPacket(ENCRYPTION_INITIAL, 1, std::move(packet),
                          HAS_RETRANSMITTABLE_DATA, false, false);
   EXPECT_EQ(1u, connection_.NumQueuedPackets());
 }
@@ -5123,7 +5125,7 @@
   frame1_.stream_id = 3;
 
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(1, !kHasStopWaiting, ENCRYPTION_ZERO_RTT);
 
@@ -5162,7 +5164,7 @@
   frame1_.stream_id = 3;
 
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(1, !kHasStopWaiting, ENCRYPTION_ZERO_RTT);
 
@@ -5247,7 +5249,7 @@
   }
   EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(kFirstDecimatedPacket, !kHasStopWaiting,
                            ENCRYPTION_ZERO_RTT);
@@ -5299,7 +5301,7 @@
   frame1_.stream_id = 3;
 
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(1, !kHasStopWaiting, ENCRYPTION_ZERO_RTT);
 
@@ -5365,7 +5367,7 @@
   }
   EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(kFirstDecimatedPacket, !kHasStopWaiting,
                            ENCRYPTION_ZERO_RTT);
@@ -5441,7 +5443,7 @@
   }
   EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(kFirstDecimatedPacket, !kHasStopWaiting,
                            ENCRYPTION_ZERO_RTT);
@@ -5494,7 +5496,7 @@
   }
   EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(kFirstDecimatedPacket, !kHasStopWaiting,
                            ENCRYPTION_ZERO_RTT);
@@ -5616,7 +5618,7 @@
   }
   EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(kFirstDecimatedPacket, !kHasStopWaiting,
                            ENCRYPTION_ZERO_RTT);
@@ -5700,7 +5702,7 @@
   }
   EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(kFirstDecimatedPacket, !kHasStopWaiting,
                            ENCRYPTION_ZERO_RTT);
@@ -5768,7 +5770,7 @@
   }
   EXPECT_FALSE(connection_.GetAckAlarm()->IsSet());
   // The same as ProcessPacket(1) except that ENCRYPTION_ZERO_RTT is used
-  // instead of ENCRYPTION_NONE.
+  // instead of ENCRYPTION_INITIAL.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   ProcessDataPacketAtLevel(kFirstDecimatedPacket, !kHasStopWaiting,
                            ENCRYPTION_ZERO_RTT);
@@ -6100,10 +6102,10 @@
   EXPECT_FALSE(connection_.connected());
   EXPECT_FALSE(connection_.CanWriteStreamData());
   std::unique_ptr<QuicPacket> packet =
-      ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_NONE);
+      ConstructDataPacket(1, !kHasStopWaiting, ENCRYPTION_INITIAL);
   EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, QuicPacketNumber(1), _, _))
       .Times(0);
-  connection_.SendPacket(ENCRYPTION_NONE, 1, std::move(packet),
+  connection_.SendPacket(ENCRYPTION_INITIAL, 1, std::move(packet),
                          HAS_RETRANSMITTABLE_DATA, false, false);
 }
 
@@ -6312,8 +6314,9 @@
   frames.push_back(QuicFrame(frame1_));
   std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
-  size_t encrypted_length = framer_.EncryptPayload(
-      ENCRYPTION_NONE, QuicPacketNumber(12), *packet, buffer, kMaxPacketSize);
+  size_t encrypted_length =
+      framer_.EncryptPayload(ENCRYPTION_INITIAL, QuicPacketNumber(12), *packet,
+                             buffer, kMaxPacketSize);
 
   framer_.set_version(version());
   // Writer's framer's perspective is client, so that it needs to have the right
@@ -6364,8 +6367,9 @@
   frames.push_back(QuicFrame(frame1_));
   std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
-  size_t encrypted_length = framer_.EncryptPayload(
-      ENCRYPTION_NONE, QuicPacketNumber(12), *packet, buffer, kMaxPacketSize);
+  size_t encrypted_length =
+      framer_.EncryptPayload(ENCRYPTION_INITIAL, QuicPacketNumber(12), *packet,
+                             buffer, kMaxPacketSize);
 
   framer_.set_version(version());
   BlockOnNextWrite();
@@ -6423,8 +6427,9 @@
   frames.push_back(QuicFrame(frame1_));
   std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
-  size_t encryped_length = framer_.EncryptPayload(
-      ENCRYPTION_NONE, QuicPacketNumber(12), *packet, buffer, kMaxPacketSize);
+  size_t encryped_length =
+      framer_.EncryptPayload(ENCRYPTION_INITIAL, QuicPacketNumber(12), *packet,
+                             buffer, kMaxPacketSize);
 
   framer_.set_version(version());
   set_perspective(Perspective::IS_SERVER);
@@ -6477,8 +6482,9 @@
   frames.push_back(QuicFrame(frame1_));
   std::unique_ptr<QuicPacket> packet(ConstructPacket(header, frames));
   char buffer[kMaxPacketSize];
-  size_t encrypted_length = peer_framer_.EncryptPayload(
-      ENCRYPTION_NONE, QuicPacketNumber(12), *packet, buffer, kMaxPacketSize);
+  size_t encrypted_length =
+      peer_framer_.EncryptPayload(ENCRYPTION_INITIAL, QuicPacketNumber(12),
+                                  *packet, buffer, kMaxPacketSize);
   ASSERT_NE(0u, encrypted_length);
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1);
   EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
@@ -6584,7 +6590,7 @@
   EXPECT_TRUE(nullptr != packet);
   char buffer[kMaxPacketSize];
   size_t encrypted_length = peer_framer_.EncryptPayload(
-      ENCRYPTION_NONE, QuicPacketNumber(1), *packet, buffer, kMaxPacketSize);
+      ENCRYPTION_INITIAL, QuicPacketNumber(1), *packet, buffer, kMaxPacketSize);
 
   EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PEER_GOING_AWAY, _,
                                            ConnectionCloseSource::FROM_PEER));
@@ -7856,10 +7862,10 @@
   peer_framer_.set_version_for_tests(
       ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, QUIC_VERSION_43));
   std::unique_ptr<QuicPacket> packet(
-      ConstructDataPacket(2, !kHasStopWaiting, ENCRYPTION_NONE));
+      ConstructDataPacket(2, !kHasStopWaiting, ENCRYPTION_INITIAL));
   char buffer[kMaxPacketSize];
   size_t encrypted_length = peer_framer_.EncryptPayload(
-      ENCRYPTION_NONE, QuicPacketNumber(2), *packet, buffer, kMaxPacketSize);
+      ENCRYPTION_INITIAL, QuicPacketNumber(2), *packet, buffer, kMaxPacketSize);
   // Make sure no stream frame is processed.
   EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(0);
   connection_.ProcessUdpPacket(
diff --git a/quic/core/quic_crypto_client_handshaker.cc b/quic/core/quic_crypto_client_handshaker.cc
index 5d8a647..f59e56c 100644
--- a/quic/core/quic_crypto_client_handshaker.cc
+++ b/quic/core/quic_crypto_client_handshaker.cc
@@ -293,7 +293,7 @@
   }
 
   // Send the client hello in plaintext.
-  session()->connection()->SetDefaultEncryptionLevel(ENCRYPTION_NONE);
+  session()->connection()->SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
   encryption_established_ = false;
   if (num_client_hellos_ > QuicCryptoClientStream::kMaxClientHellos) {
     stream_->CloseConnectionWithDetails(
diff --git a/quic/core/quic_crypto_client_stream_test.cc b/quic/core/quic_crypto_client_stream_test.cc
index 9d852c2..5839477 100644
--- a/quic/core/quic_crypto_client_stream_test.cc
+++ b/quic/core/quic_crypto_client_stream_test.cc
@@ -161,7 +161,7 @@
   stream()->CryptoConnect();
   // Check that a client hello was sent.
   ASSERT_EQ(1u, connection_->encrypted_packets_.size());
-  EXPECT_EQ(ENCRYPTION_NONE, connection_->encryption_level());
+  EXPECT_EQ(ENCRYPTION_INITIAL, connection_->encryption_level());
 }
 
 TEST_F(QuicCryptoClientStreamTest, ClockSkew) {
diff --git a/quic/core/quic_crypto_stream.cc b/quic/core/quic_crypto_stream.cc
index c424a55..836fbac 100644
--- a/quic/core/quic_crypto_stream.cc
+++ b/quic/core/quic_crypto_stream.cc
@@ -29,7 +29,7 @@
                  session,
                  /*is_static=*/true,
                  BIDIRECTIONAL),
-      substreams_{{this, ENCRYPTION_NONE},
+      substreams_{{this, ENCRYPTION_INITIAL},
                   {this, ENCRYPTION_HANDSHAKE},
                   {this, ENCRYPTION_ZERO_RTT},
                   {this, ENCRYPTION_FORWARD_SECURE}} {
@@ -178,14 +178,15 @@
 void QuicCryptoStream::NeuterUnencryptedStreamData() {
   if (!QuicVersionUsesCryptoFrames(
           session()->connection()->transport_version())) {
-    for (const auto& interval : bytes_consumed_[ENCRYPTION_NONE]) {
+    for (const auto& interval : bytes_consumed_[ENCRYPTION_INITIAL]) {
       QuicByteCount newly_acked_length = 0;
       send_buffer().OnStreamDataAcked(
           interval.min(), interval.max() - interval.min(), &newly_acked_length);
     }
     return;
   }
-  QuicStreamSendBuffer* send_buffer = &substreams_[ENCRYPTION_NONE].send_buffer;
+  QuicStreamSendBuffer* send_buffer =
+      &substreams_[ENCRYPTION_INITIAL].send_buffer;
   // TODO(nharper): Consider adding a Clear() method to QuicStreamSendBuffer to
   // replace the following code.
   QuicIntervalSet<QuicStreamOffset> to_ack = send_buffer->bytes_acked();
@@ -215,7 +216,7 @@
     return false;
   }
   for (EncryptionLevel level :
-       {ENCRYPTION_NONE, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
+       {ENCRYPTION_INITIAL, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
     if (substreams_[level].send_buffer.HasPendingRetransmission()) {
       return true;
     }
@@ -230,7 +231,7 @@
   EncryptionLevel current_encryption_level =
       session()->connection()->encryption_level();
   for (EncryptionLevel level :
-       {ENCRYPTION_NONE, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
+       {ENCRYPTION_INITIAL, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
     QuicStreamSendBuffer* send_buffer = &substreams_[level].send_buffer;
     session()->connection()->SetDefaultEncryptionLevel(level);
     while (send_buffer->HasPendingRetransmission()) {
@@ -249,7 +250,7 @@
         send_buffer().NextPendingRetransmission();
     QuicIntervalSet<QuicStreamOffset> retransmission(
         pending.offset, pending.offset + pending.length);
-    EncryptionLevel retransmission_encryption_level = ENCRYPTION_NONE;
+    EncryptionLevel retransmission_encryption_level = ENCRYPTION_INITIAL;
     // Determine the encryption level to write the retransmission
     // at. The retransmission should be written at the same encryption level
     // as the original transmission.
@@ -295,7 +296,7 @@
                                                    offset + data_length);
   // Determine the encryption level to send data. This only needs to be once as
   // [offset, offset + data_length) is guaranteed to be in the same packet.
-  EncryptionLevel send_encryption_level = ENCRYPTION_NONE;
+  EncryptionLevel send_encryption_level = ENCRYPTION_INITIAL;
   for (size_t i = 0; i < NUM_ENCRYPTION_LEVELS; ++i) {
     if (retransmission.Intersects(bytes_consumed_[i])) {
       send_encryption_level = static_cast<EncryptionLevel>(i);
@@ -337,7 +338,7 @@
           session()->connection()->transport_version())) {
     return stream_bytes_read();
   }
-  return substreams_[ENCRYPTION_NONE].sequencer.NumBytesConsumed() +
+  return substreams_[ENCRYPTION_INITIAL].sequencer.NumBytesConsumed() +
          substreams_[ENCRYPTION_ZERO_RTT].sequencer.NumBytesConsumed() +
          substreams_[ENCRYPTION_FORWARD_SECURE].sequencer.NumBytesConsumed();
 }
@@ -413,7 +414,7 @@
     return QuicStream::IsWaitingForAcks();
   }
   for (EncryptionLevel level :
-       {ENCRYPTION_NONE, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
+       {ENCRYPTION_INITIAL, ENCRYPTION_ZERO_RTT, ENCRYPTION_FORWARD_SECURE}) {
     if (substreams_[level].send_buffer.stream_bytes_outstanding()) {
       return true;
     }
diff --git a/quic/core/quic_crypto_stream_test.cc b/quic/core/quic_crypto_stream_test.cc
index ffadea6..f5ab413 100644
--- a/quic/core/quic_crypto_stream_test.cc
+++ b/quic/core/quic_crypto_stream_test.cc
@@ -105,7 +105,7 @@
         /*fin=*/false,
         /*offset=*/0, message_data_->AsStringPiece()));
   } else {
-    stream_->OnCryptoFrame(QuicCryptoFrame(ENCRYPTION_NONE, /*offset*/ 0,
+    stream_->OnCryptoFrame(QuicCryptoFrame(ENCRYPTION_INITIAL, /*offset*/ 0,
                                            message_data_->AsStringPiece()));
   }
   ASSERT_EQ(1u, stream_->messages()->size());
@@ -131,7 +131,8 @@
         QuicUtils::GetCryptoStreamId(connection_->transport_version()),
         /*fin=*/false, /*offset=*/0, bad));
   } else {
-    stream_->OnCryptoFrame(QuicCryptoFrame(ENCRYPTION_NONE, /*offset*/ 0, bad));
+    stream_->OnCryptoFrame(
+        QuicCryptoFrame(ENCRYPTION_INITIAL, /*offset*/ 0, bad));
   }
 }
 
@@ -145,8 +146,8 @@
     return;
   }
   InSequence s;
-  // Send [0, 1350) in ENCRYPTION_NONE.
-  EXPECT_EQ(ENCRYPTION_NONE, connection_->encryption_level());
+  // Send [0, 1350) in ENCRYPTION_INITIAL.
+  EXPECT_EQ(ENCRYPTION_INITIAL, connection_->encryption_level());
   std::string data(1350, 'a');
   EXPECT_CALL(
       session_,
@@ -205,13 +206,13 @@
   }
   EXPECT_CALL(*connection_, SendCryptoData(_, _, _)).Times(0);
   InSequence s;
-  // Send [0, 1350) in ENCRYPTION_NONE.
-  EXPECT_EQ(ENCRYPTION_NONE, connection_->encryption_level());
+  // Send [0, 1350) in ENCRYPTION_INITIAL.
+  EXPECT_EQ(ENCRYPTION_INITIAL, connection_->encryption_level());
   std::string data(1350, 'a');
-  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_NONE, 1350, 0))
+  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_INITIAL, 1350, 0))
       .WillOnce(Invoke(connection_,
                        &MockQuicConnection::QuicConnection_SendCryptoData));
-  stream_->WriteCryptoData(ENCRYPTION_NONE, data);
+  stream_->WriteCryptoData(ENCRYPTION_INITIAL, data);
   // Send [1350, 2700) in ENCRYPTION_ZERO_RTT.
   connection_->SetDefaultEncryptionLevel(ENCRYPTION_ZERO_RTT);
   std::unique_ptr<NullEncrypter> encrypter =
@@ -226,20 +227,20 @@
   EXPECT_EQ(ENCRYPTION_FORWARD_SECURE, connection_->encryption_level());
 
   // Lost [0, 1000).
-  QuicCryptoFrame lost_frame(ENCRYPTION_NONE, 0, 1000);
+  QuicCryptoFrame lost_frame(ENCRYPTION_INITIAL, 0, 1000);
   stream_->OnCryptoFrameLost(&lost_frame);
   EXPECT_TRUE(stream_->HasPendingCryptoRetransmission());
   // Lost [1200, 2000).
-  lost_frame = QuicCryptoFrame(ENCRYPTION_NONE, 1200, 150);
+  lost_frame = QuicCryptoFrame(ENCRYPTION_INITIAL, 1200, 150);
   stream_->OnCryptoFrameLost(&lost_frame);
   lost_frame = QuicCryptoFrame(ENCRYPTION_ZERO_RTT, 0, 650);
   stream_->OnCryptoFrameLost(&lost_frame);
-  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_NONE, 1000, 0))
+  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_INITIAL, 1000, 0))
       .WillOnce(Invoke(connection_,
                        &MockQuicConnection::QuicConnection_SendCryptoData));
   // Verify [1200, 2000) are sent in [1200, 1350) and [1350, 2000) because of
   // they are in different encryption levels.
-  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_NONE, 150, 1200))
+  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_INITIAL, 150, 1200))
       .WillOnce(Invoke(connection_,
                        &MockQuicConnection::QuicConnection_SendCryptoData));
   EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_ZERO_RTT, 650, 0))
@@ -255,8 +256,8 @@
   if (QuicVersionUsesCryptoFrames(connection_->transport_version())) {
     return;
   }
-  // Send [0, 1350) in ENCRYPTION_NONE.
-  EXPECT_EQ(ENCRYPTION_NONE, connection_->encryption_level());
+  // Send [0, 1350) in ENCRYPTION_INITIAL.
+  EXPECT_EQ(ENCRYPTION_INITIAL, connection_->encryption_level());
   std::string data(1350, 'a');
   EXPECT_CALL(
       session_,
@@ -297,13 +298,13 @@
   if (!QuicVersionUsesCryptoFrames(connection_->transport_version())) {
     return;
   }
-  // Send [0, 1350) in ENCRYPTION_NONE.
-  EXPECT_EQ(ENCRYPTION_NONE, connection_->encryption_level());
+  // Send [0, 1350) in ENCRYPTION_INITIAL.
+  EXPECT_EQ(ENCRYPTION_INITIAL, connection_->encryption_level());
   std::string data(1350, 'a');
-  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_NONE, 1350, 0))
+  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_INITIAL, 1350, 0))
       .WillOnce(Invoke(connection_,
                        &MockQuicConnection::QuicConnection_SendCryptoData));
-  stream_->WriteCryptoData(ENCRYPTION_NONE, data);
+  stream_->WriteCryptoData(ENCRYPTION_INITIAL, data);
   // Send [1350, 2700) in ENCRYPTION_ZERO_RTT.
   connection_->SetDefaultEncryptionLevel(ENCRYPTION_ZERO_RTT);
   std::unique_ptr<NullEncrypter> encrypter =
@@ -317,7 +318,7 @@
   stream_->WriteCryptoData(ENCRYPTION_ZERO_RTT, data);
 
   // Lost [0, 1350).
-  QuicCryptoFrame lost_frame(ENCRYPTION_NONE, 0, 1350);
+  QuicCryptoFrame lost_frame(ENCRYPTION_INITIAL, 0, 1350);
   stream_->OnCryptoFrameLost(&lost_frame);
   EXPECT_TRUE(stream_->HasPendingCryptoRetransmission());
   // Neuters [0, 1350).
@@ -341,8 +342,8 @@
     return;
   }
   InSequence s;
-  // Send [0, 1350) in ENCRYPTION_NONE.
-  EXPECT_EQ(ENCRYPTION_NONE, connection_->encryption_level());
+  // Send [0, 1350) in ENCRYPTION_INITIAL.
+  EXPECT_EQ(ENCRYPTION_INITIAL, connection_->encryption_level());
   std::string data(1350, 'a');
   EXPECT_CALL(
       session_,
@@ -414,13 +415,13 @@
     return;
   }
   InSequence s;
-  // Send [0, 1350) in ENCRYPTION_NONE.
-  EXPECT_EQ(ENCRYPTION_NONE, connection_->encryption_level());
+  // Send [0, 1350) in ENCRYPTION_INITIAL.
+  EXPECT_EQ(ENCRYPTION_INITIAL, connection_->encryption_level());
   std::string data(1350, 'a');
-  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_NONE, 1350, 0))
+  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_INITIAL, 1350, 0))
       .WillOnce(Invoke(connection_,
                        &MockQuicConnection::QuicConnection_SendCryptoData));
-  stream_->WriteCryptoData(ENCRYPTION_NONE, data);
+  stream_->WriteCryptoData(ENCRYPTION_INITIAL, data);
   // Send [1350, 2700) in ENCRYPTION_ZERO_RTT.
   connection_->SetDefaultEncryptionLevel(ENCRYPTION_ZERO_RTT);
   std::unique_ptr<NullEncrypter> encrypter =
@@ -501,13 +502,13 @@
   if (!QuicVersionUsesCryptoFrames(connection_->transport_version())) {
     return;
   }
-  // Send [0, 1350) in ENCRYPTION_NONE.
-  EXPECT_EQ(ENCRYPTION_NONE, connection_->encryption_level());
+  // Send [0, 1350) in ENCRYPTION_INITIAL.
+  EXPECT_EQ(ENCRYPTION_INITIAL, connection_->encryption_level());
   std::string data(1350, 'a');
-  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_NONE, 1350, 0))
+  EXPECT_CALL(*connection_, SendCryptoData(ENCRYPTION_INITIAL, 1350, 0))
       .WillOnce(Invoke(connection_,
                        &MockQuicConnection::QuicConnection_SendCryptoData));
-  stream_->WriteCryptoData(ENCRYPTION_NONE, data);
+  stream_->WriteCryptoData(ENCRYPTION_INITIAL, data);
   EXPECT_TRUE(stream_->IsWaitingForAcks());
   EXPECT_TRUE(session_.HasUnackedCryptoData());
 }
diff --git a/quic/core/quic_dispatcher.cc b/quic/core/quic_dispatcher.cc
index dd7c2be..5fddab6 100644
--- a/quic/core/quic_dispatcher.cc
+++ b/quic/core/quic_dispatcher.cc
@@ -149,7 +149,7 @@
     time_wait_list_manager_->AddConnectionIdToTimeWait(
         connection_id_, ietf_quic,
         QuicTimeWaitListManager::SEND_TERMINATION_PACKETS,
-        quic::ENCRYPTION_NONE, collector_.packets());
+        quic::ENCRYPTION_INITIAL, collector_.packets());
   }
 
   // Generates a series of termination packets containing the crypto handshake
@@ -171,7 +171,7 @@
         }
         offset += frame.stream_frame.data_length;
       } else {
-        if (!creator_.ConsumeCryptoData(ENCRYPTION_NONE,
+        if (!creator_.ConsumeCryptoData(ENCRYPTION_INITIAL,
                                         reject.length() - offset, offset,
                                         NOT_RETRANSMISSION, &frame)) {
           QUIC_BUG << "Unable to consume crypto data into an empty packet.";
@@ -188,7 +188,7 @@
     }
     time_wait_list_manager_->AddConnectionIdToTimeWait(
         connection_id_, ietf_quic,
-        QuicTimeWaitListManager::SEND_TERMINATION_PACKETS, ENCRYPTION_NONE,
+        QuicTimeWaitListManager::SEND_TERMINATION_PACKETS, ENCRYPTION_INITIAL,
         collector_.packets());
     DCHECK(time_wait_list_manager_->IsConnectionIdInTimeWait(connection_id_));
   }
@@ -735,7 +735,7 @@
                   << ", error_code:" << error_code
                   << ", error_details:" << error_details;
     time_wait_list_manager_->AddConnectionIdToTimeWait(
-        connection_id, format != GOOGLE_QUIC_PACKET, action, ENCRYPTION_NONE,
+        connection_id, format != GOOGLE_QUIC_PACKET, action, ENCRYPTION_INITIAL,
         nullptr);
     return;
   }
@@ -775,7 +775,7 @@
       ParsedQuicVersionVector{UnsupportedQuicVersion()}));
   time_wait_list_manager()->AddConnectionIdToTimeWait(
       connection_id, /*ietf_quic=*/true,
-      QuicTimeWaitListManager::SEND_TERMINATION_PACKETS, ENCRYPTION_NONE,
+      QuicTimeWaitListManager::SEND_TERMINATION_PACKETS, ENCRYPTION_INITIAL,
       &termination_packets);
 }
 
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index 1af1f68..2d1e665 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -461,8 +461,8 @@
       last_version_label_(0),
       version_(PROTOCOL_UNSUPPORTED, QUIC_VERSION_UNSUPPORTED),
       supported_versions_(supported_versions),
-      decrypter_level_(ENCRYPTION_NONE),
-      alternative_decrypter_level_(ENCRYPTION_NONE),
+      decrypter_level_(ENCRYPTION_INITIAL),
+      alternative_decrypter_level_(ENCRYPTION_INITIAL),
       alternative_decrypter_latch_(false),
       perspective_(perspective),
       validate_flags_(true),
@@ -478,7 +478,7 @@
   DCHECK(!supported_versions.empty());
   version_ = supported_versions_[0];
   decrypter_ = QuicMakeUnique<NullDecrypter>(perspective);
-  encrypter_[ENCRYPTION_NONE] = QuicMakeUnique<NullEncrypter>(perspective);
+  encrypter_[ENCRYPTION_INITIAL] = QuicMakeUnique<NullEncrypter>(perspective);
 }
 
 QuicFramer::~QuicFramer() {}
@@ -3951,7 +3951,7 @@
   // level to hand. Both the NullEncrypter and AES-GCM have a tag length of 12.
   size_t min_plaintext_size = ciphertext_size;
 
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; i++) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; i++) {
     if (encrypter_[i] != nullptr) {
       size_t size = encrypter_[i]->GetMaxPlaintextSize(ciphertext_size);
       if (size < min_plaintext_size) {
@@ -4005,7 +4005,7 @@
         // switch back.
         decrypter_ = std::move(alternative_decrypter_);
         decrypter_level_ = alternative_decrypter_level_;
-        alternative_decrypter_level_ = ENCRYPTION_NONE;
+        alternative_decrypter_level_ = ENCRYPTION_INITIAL;
       } else {
         // Switch the alternative decrypter so that we use it first next time.
         decrypter_.swap(alternative_decrypter_);
diff --git a/quic/core/quic_framer.h b/quic/core/quic_framer.h
index 29be82e..312dbb2 100644
--- a/quic/core/quic_framer.h
+++ b/quic/core/quic_framer.h
@@ -218,8 +218,8 @@
 class QUIC_EXPORT_PRIVATE QuicFramer {
  public:
   // Constructs a new framer that installs a kNULL QuicEncrypter and
-  // QuicDecrypter for level ENCRYPTION_NONE. |supported_versions| specifies the
-  // list of supported QUIC versions. |quic_version_| is set to the maximum
+  // QuicDecrypter for level ENCRYPTION_INITIAL. |supported_versions| specifies
+  // the list of supported QUIC versions. |quic_version_| is set to the maximum
   // version in |supported_versions|.
   QuicFramer(const ParsedQuicVersionVector& supported_versions,
              QuicTime creation_time,
diff --git a/quic/core/quic_framer_test.cc b/quic/core/quic_framer_test.cc
index 6365581..360aa47 100644
--- a/quic/core/quic_framer_test.cc
+++ b/quic/core/quic_framer_test.cc
@@ -241,7 +241,7 @@
         new std::string(frame.data_buffer, frame.data_length);
     crypto_data_.push_back(QuicWrapUnique(string_data));
     crypto_frames_.push_back(QuicMakeUnique<QuicCryptoFrame>(
-        ENCRYPTION_NONE, frame.offset, *string_data));
+        ENCRYPTION_INITIAL, frame.offset, *string_data));
     return true;
   }
 
@@ -445,9 +445,9 @@
                 kQuicDefaultConnectionIdLength) {
     SetQuicFlag(&FLAGS_quic_supports_tls_handshake, true);
     framer_.set_version(version_);
-    framer_.SetDecrypter(ENCRYPTION_NONE,
+    framer_.SetDecrypter(ENCRYPTION_INITIAL,
                          std::unique_ptr<QuicDecrypter>(decrypter_));
-    framer_.SetEncrypter(ENCRYPTION_NONE,
+    framer_.SetEncrypter(ENCRYPTION_INITIAL,
                          std::unique_ptr<QuicEncrypter>(encrypter_));
 
     framer_.set_visitor(&visitor_);
@@ -1870,7 +1870,7 @@
     return;
   }
   QuicFramerPeer::SetPerspective(&framer_, Perspective::IS_CLIENT);
-  framer_.SetDecrypter(ENCRYPTION_NONE,
+  framer_.SetDecrypter(ENCRYPTION_INITIAL,
                        QuicMakeUnique<NullDecrypter>(Perspective::IS_CLIENT));
   decrypter_ = new test::TestDecrypter();
   framer_.SetAlternativeDecrypter(
@@ -5251,7 +5251,7 @@
     return;
   }
   QuicFramerPeer::SetPerspective(&framer_, Perspective::IS_CLIENT);
-  framer_.SetDecrypter(ENCRYPTION_NONE,
+  framer_.SetDecrypter(ENCRYPTION_INITIAL,
                        QuicMakeUnique<NullDecrypter>(Perspective::IS_CLIENT));
   decrypter_ = new test::TestDecrypter();
   framer_.SetAlternativeDecrypter(
@@ -5281,7 +5281,7 @@
     return;
   }
   QuicFramerPeer::SetPerspective(&framer_, Perspective::IS_CLIENT);
-  framer_.SetDecrypter(ENCRYPTION_NONE,
+  framer_.SetDecrypter(ENCRYPTION_INITIAL,
                        QuicMakeUnique<NullDecrypter>(Perspective::IS_CLIENT));
   decrypter_ = new test::TestDecrypter();
   framer_.SetAlternativeDecrypter(
@@ -6147,9 +6147,9 @@
   framer_.set_data_producer(&data_producer);
 
   QuicStringPiece crypto_frame_contents("hello world!");
-  QuicCryptoFrame crypto_frame(ENCRYPTION_NONE, kStreamOffset,
+  QuicCryptoFrame crypto_frame(ENCRYPTION_INITIAL, kStreamOffset,
                                crypto_frame_contents.length());
-  data_producer.SaveCryptoData(ENCRYPTION_NONE, kStreamOffset,
+  data_producer.SaveCryptoData(ENCRYPTION_INITIAL, kStreamOffset,
                                crypto_frame_contents);
 
   QuicFrames frames = {QuicFrame(&crypto_frame)};
@@ -8594,7 +8594,7 @@
   std::unique_ptr<char[]> buffer(new char[kMaxPacketSize]);
 
   size_t length = framer_.BuildConnectivityProbingPacket(
-      header, buffer.get(), packet_size, ENCRYPTION_NONE);
+      header, buffer.get(), packet_size, ENCRYPTION_INITIAL);
 
   EXPECT_NE(0u, length);
   QuicPacket data(framer_.transport_version(), buffer.release(), length, true,
@@ -8642,7 +8642,7 @@
 
   size_t length = framer_.BuildPaddedPathChallengePacket(
       header, buffer.get(), QUIC_ARRAYSIZE(packet), &payload, &randomizer,
-      ENCRYPTION_NONE);
+      ENCRYPTION_INITIAL);
   EXPECT_EQ(length, QUIC_ARRAYSIZE(packet));
 
   // Payload has the random bytes that were generated. Copy them into packet,
@@ -8695,7 +8695,7 @@
   payloads.push_back(payload0);
   size_t length = framer_.BuildPathResponsePacket(
       header, buffer.get(), QUIC_ARRAYSIZE(packet), payloads,
-      /*is_padded=*/false, ENCRYPTION_NONE);
+      /*is_padded=*/false, ENCRYPTION_INITIAL);
   EXPECT_EQ(length, QUIC_ARRAYSIZE(packet));
   QuicPacket data(framer_.transport_version(), buffer.release(), length, true,
                   header);
@@ -8741,7 +8741,7 @@
   payloads.push_back(payload0);
   size_t length = framer_.BuildPathResponsePacket(
       header, buffer.get(), QUIC_ARRAYSIZE(packet), payloads,
-      /*is_padded=*/true, ENCRYPTION_NONE);
+      /*is_padded=*/true, ENCRYPTION_INITIAL);
   EXPECT_EQ(length, QUIC_ARRAYSIZE(packet));
   QuicPacket data(framer_.transport_version(), buffer.release(), length, true,
                   header);
@@ -8792,7 +8792,7 @@
   payloads.push_back(payload2);
   size_t length = framer_.BuildPathResponsePacket(
       header, buffer.get(), QUIC_ARRAYSIZE(packet), payloads,
-      /*is_padded=*/false, ENCRYPTION_NONE);
+      /*is_padded=*/false, ENCRYPTION_INITIAL);
   EXPECT_EQ(length, QUIC_ARRAYSIZE(packet));
   QuicPacket data(framer_.transport_version(), buffer.release(), length, true,
                   header);
@@ -8845,7 +8845,7 @@
   payloads.push_back(payload2);
   size_t length = framer_.BuildPathResponsePacket(
       header, buffer.get(), QUIC_ARRAYSIZE(packet), payloads,
-      /*is_padded=*/true, ENCRYPTION_NONE);
+      /*is_padded=*/true, ENCRYPTION_INITIAL);
   EXPECT_EQ(length, QUIC_ARRAYSIZE(packet));
   QuicPacket data(framer_.transport_version(), buffer.release(), length, true,
                   header);
@@ -9211,7 +9211,7 @@
       VARIABLE_LENGTH_INTEGER_LENGTH_0, 0, VARIABLE_LENGTH_INTEGER_LENGTH_0));
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
-      ENCRYPTION_NONE, packet_number, *raw, buffer, kMaxPacketSize);
+      ENCRYPTION_INITIAL, packet_number, *raw, buffer, kMaxPacketSize);
 
   ASSERT_NE(0u, encrypted_length);
   EXPECT_TRUE(CheckEncryption(packet_number, raw.get()));
@@ -9314,7 +9314,7 @@
       VARIABLE_LENGTH_INTEGER_LENGTH_0));
   char buffer[kMaxPacketSize];
   size_t encrypted_length = framer_.EncryptPayload(
-      ENCRYPTION_NONE, packet_number, *raw, buffer, kMaxPacketSize);
+      ENCRYPTION_INITIAL, packet_number, *raw, buffer, kMaxPacketSize);
 
   ASSERT_NE(0u, encrypted_length);
   EXPECT_TRUE(CheckEncryption(packet_number, raw.get()));
@@ -9344,7 +9344,7 @@
   ASSERT_TRUE(raw_ack_packet != nullptr);
   char buffer[kMaxPacketSize];
   size_t encrypted_length =
-      framer_.EncryptPayload(ENCRYPTION_NONE, header.packet_number,
+      framer_.EncryptPayload(ENCRYPTION_INITIAL, header.packet_number,
                              *raw_ack_packet, buffer, kMaxPacketSize);
   ASSERT_NE(0u, encrypted_length);
   // Now make sure we can turn our ack packet back into an ack frame.
@@ -9384,7 +9384,7 @@
   ASSERT_TRUE(raw_ack_packet != nullptr);
   char buffer[kMaxPacketSize];
   size_t encrypted_length =
-      framer_.EncryptPayload(ENCRYPTION_NONE, header.packet_number,
+      framer_.EncryptPayload(ENCRYPTION_INITIAL, header.packet_number,
                              *raw_ack_packet, buffer, kMaxPacketSize);
   ASSERT_NE(0u, encrypted_length);
   // Now make sure we can turn our ack packet back into an ack frame.
@@ -9422,7 +9422,7 @@
 
   char buffer[kMaxPacketSize];
   size_t encrypted_length =
-      framer_.EncryptPayload(ENCRYPTION_NONE, header.packet_number,
+      framer_.EncryptPayload(ENCRYPTION_INITIAL, header.packet_number,
                              *raw_ack_packet, buffer, kMaxPacketSize);
   ASSERT_NE(0u, encrypted_length);
 
@@ -9639,9 +9639,9 @@
 TEST_P(QuicFramerTest, ConstructEncryptedPacket) {
   // Since we are using ConstructEncryptedPacket, we have to set the framer's
   // crypto to be Null.
-  framer_.SetDecrypter(ENCRYPTION_NONE,
+  framer_.SetDecrypter(ENCRYPTION_INITIAL,
                        QuicMakeUnique<NullDecrypter>(framer_.perspective()));
-  framer_.SetEncrypter(ENCRYPTION_NONE,
+  framer_.SetEncrypter(ENCRYPTION_INITIAL,
                        QuicMakeUnique<NullEncrypter>(framer_.perspective()));
   ParsedQuicVersionVector versions;
   versions.push_back(framer_.version());
@@ -9679,9 +9679,9 @@
 TEST_P(QuicFramerTest, ConstructMisFramedEncryptedPacket) {
   // Since we are using ConstructEncryptedPacket, we have to set the framer's
   // crypto to be Null.
-  framer_.SetDecrypter(ENCRYPTION_NONE,
+  framer_.SetDecrypter(ENCRYPTION_INITIAL,
                        QuicMakeUnique<NullDecrypter>(framer_.perspective()));
-  framer_.SetEncrypter(ENCRYPTION_NONE,
+  framer_.SetEncrypter(ENCRYPTION_INITIAL,
                        QuicMakeUnique<NullEncrypter>(framer_.perspective()));
   ParsedQuicVersionVector versions;
   versions.push_back(framer_.version());
diff --git a/quic/core/quic_ietf_framer_test.cc b/quic/core/quic_ietf_framer_test.cc
index 53fe25b..c1ada6b 100644
--- a/quic/core/quic_ietf_framer_test.cc
+++ b/quic/core/quic_ietf_framer_test.cc
@@ -764,8 +764,8 @@
   QuicStreamOffset offsets[] = {kOffset8, kOffset4, kOffset2, kOffset1,
                                 kOffset0};
   for (QuicStreamOffset offset : offsets) {
-    QuicCryptoFrame frame(ENCRYPTION_NONE, offset, frame_data.length());
-    data_producer.SaveCryptoData(ENCRYPTION_NONE, offset, frame_data);
+    QuicCryptoFrame frame(ENCRYPTION_INITIAL, offset, frame_data.length());
+    data_producer.SaveCryptoData(ENCRYPTION_INITIAL, offset, frame_data);
 
     QuicDataWriter writer(QUIC_ARRAYSIZE(packet_buffer), packet_buffer,
                           NETWORK_BYTE_ORDER);
diff --git a/quic/core/quic_packet_creator.cc b/quic/core/quic_packet_creator.cc
index 3702635..9bd3b11 100644
--- a/quic/core/quic_packet_creator.cc
+++ b/quic/core/quic_packet_creator.cc
@@ -28,7 +28,7 @@
 
 QuicLongHeaderType EncryptionlevelToLongHeaderType(EncryptionLevel level) {
   switch (level) {
-    case ENCRYPTION_NONE:
+    case ENCRYPTION_INITIAL:
       return INITIAL;
     case ENCRYPTION_HANDSHAKE:
       return HANDSHAKE;
@@ -847,7 +847,7 @@
   if (frame.type == STREAM_FRAME &&
       frame.stream_frame.stream_id !=
           QuicUtils::GetCryptoStreamId(framer_->transport_version()) &&
-      packet_.encryption_level == ENCRYPTION_NONE) {
+      packet_.encryption_level == ENCRYPTION_INITIAL) {
     const std::string error_details =
         "Cannot send stream data without encryption.";
     QUIC_BUG << error_details;
diff --git a/quic/core/quic_packet_creator_test.cc b/quic/core/quic_packet_creator_test.cc
index a781c51..1b3b015 100644
--- a/quic/core/quic_packet_creator_test.cc
+++ b/quic/core/quic_packet_creator_test.cc
@@ -270,7 +270,7 @@
                          ::testing::ValuesIn(GetTestParams()));
 
 TEST_P(QuicPacketCreatorTest, SerializeFrames) {
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
     frames_.push_back(QuicFrame(new QuicAckFrame(InitAckFrame(1))));
@@ -324,7 +324,7 @@
   char buffer[kMaxPacketSize];
   QuicPendingRetransmission retransmission(CreateRetransmission(
       frames, true /* has_crypto_handshake */, -1 /* needs full padding */,
-      ENCRYPTION_NONE, PACKET_4BYTE_PACKET_NUMBER));
+      ENCRYPTION_INITIAL, PACKET_4BYTE_PACKET_NUMBER));
   EXPECT_CALL(delegate_, OnSerializedPacket(_))
       .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
   creator_.ReserializeAllFrames(retransmission, buffer, kMaxPacketSize);
@@ -359,12 +359,12 @@
   char buffer[kMaxPacketSize];
   QuicPendingRetransmission retransmission(CreateRetransmission(
       frames, true /* has_crypto_handshake */, -1 /* needs full padding */,
-      ENCRYPTION_NONE,
+      ENCRYPTION_INITIAL,
       QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)));
   EXPECT_CALL(delegate_, OnSerializedPacket(_))
       .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
   creator_.ReserializeAllFrames(retransmission, buffer, kMaxPacketSize);
-  EXPECT_EQ(ENCRYPTION_NONE, serialized_packet_.encryption_level);
+  EXPECT_EQ(ENCRYPTION_INITIAL, serialized_packet_.encryption_level);
 }
 
 TEST_P(QuicPacketCreatorTest, ReserializeFrameWithForwardSecurity) {
@@ -375,7 +375,7 @@
   char buffer[kMaxPacketSize];
   QuicPendingRetransmission retransmission(CreateRetransmission(
       frames, false /* has_crypto_handshake */, 0 /* no padding */,
-      ENCRYPTION_NONE,
+      ENCRYPTION_INITIAL,
       QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)));
   EXPECT_CALL(delegate_, OnSerializedPacket(_))
       .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
@@ -398,7 +398,7 @@
   char buffer[kMaxPacketSize];
   QuicPendingRetransmission retransmission(CreateRetransmission(
       frames, true /* has_crypto_handshake */, -1 /* needs full padding */,
-      ENCRYPTION_NONE,
+      ENCRYPTION_INITIAL,
       QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)));
   EXPECT_CALL(delegate_, OnSerializedPacket(_))
       .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
@@ -425,7 +425,7 @@
     char buffer[kMaxPacketSize];
     QuicPendingRetransmission retransmission(CreateRetransmission(
         frames, false /* has_crypto_handshake */,
-        kNumPaddingBytes1 /* padding bytes */, ENCRYPTION_NONE,
+        kNumPaddingBytes1 /* padding bytes */, ENCRYPTION_INITIAL,
         QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)));
     EXPECT_CALL(delegate_, OnSerializedPacket(_))
         .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
@@ -453,7 +453,7 @@
   char buffer[kMaxPacketSize];
   QuicPendingRetransmission retransmission(CreateRetransmission(
       frames, false /* has_crypto_handshake */,
-      kNumPaddingBytes2 /* padding bytes */, ENCRYPTION_NONE,
+      kNumPaddingBytes2 /* padding bytes */, ENCRYPTION_INITIAL,
       QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)));
   EXPECT_CALL(delegate_, OnSerializedPacket(_))
       .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
@@ -488,7 +488,7 @@
     char buffer[kMaxPacketSize];
     QuicPendingRetransmission retransmission(CreateRetransmission(
         frames, true /* has_crypto_handshake */, -1 /* needs full padding */,
-        ENCRYPTION_NONE,
+        ENCRYPTION_INITIAL,
         QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)));
     EXPECT_CALL(delegate_, OnSerializedPacket(_))
         .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
@@ -516,7 +516,7 @@
   QuicFrames frames;
   frames.push_back(QuicFrame(&frame));
   SerializedPacket serialized = SerializeAllFrames(frames);
-  EXPECT_EQ(ENCRYPTION_NONE, serialized.encryption_level);
+  EXPECT_EQ(ENCRYPTION_INITIAL, serialized.encryption_level);
   ASSERT_EQ(QuicPacketNumber(1u), serialized.packet_number);
   ASSERT_EQ(QuicPacketNumber(1u), creator_.packet_number());
 
@@ -535,7 +535,7 @@
 TEST_P(QuicPacketCreatorTest, ConsumeCryptoData) {
   std::string data = "crypto data";
   QuicFrame frame;
-  ASSERT_TRUE(creator_.ConsumeCryptoData(ENCRYPTION_NONE, data.length(), 0,
+  ASSERT_TRUE(creator_.ConsumeCryptoData(ENCRYPTION_INITIAL, data.length(), 0,
                                          NOT_RETRANSMISSION, &frame));
   EXPECT_EQ(frame.crypto_frame->data_length, data.length());
   EXPECT_TRUE(creator_.HasPendingFrames());
@@ -735,7 +735,7 @@
 }
 
 TEST_P(QuicPacketCreatorTest, SerializeConnectivityProbingPacket) {
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
 
     creator_.set_encryption_level(level);
@@ -778,7 +778,7 @@
   QuicPathFrameBuffer payload = {
       {0xde, 0xad, 0xbe, 0xef, 0xba, 0xdc, 0x0f, 0xee}};
 
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
 
     creator_.set_encryption_level(level);
@@ -809,7 +809,7 @@
   QuicPathFrameBuffer payload0 = {
       {0xde, 0xad, 0xbe, 0xef, 0xba, 0xdc, 0x0f, 0xee}};
 
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
@@ -843,7 +843,7 @@
   QuicPathFrameBuffer payload0 = {
       {0xde, 0xad, 0xbe, 0xef, 0xba, 0xdc, 0x0f, 0xee}};
 
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
@@ -877,7 +877,7 @@
   QuicPathFrameBuffer payload1 = {
       {0xad, 0xbe, 0xef, 0xba, 0xdc, 0x0f, 0xee, 0xde}};
 
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
@@ -914,7 +914,7 @@
   QuicPathFrameBuffer payload1 = {
       {0xad, 0xbe, 0xef, 0xba, 0xdc, 0x0f, 0xee, 0xde}};
 
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
@@ -951,7 +951,7 @@
   QuicPathFrameBuffer payload2 = {
       {0xbe, 0xef, 0xba, 0xdc, 0x0f, 0xee, 0xde, 0xad}};
 
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
@@ -991,7 +991,7 @@
   QuicPathFrameBuffer payload2 = {
       {0xbe, 0xef, 0xba, 0xdc, 0x0f, 0xee, 0xde, 0xad}};
 
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; ++i) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; ++i) {
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
@@ -1259,7 +1259,7 @@
     return;
   }
 
-  creator_.set_encryption_level(ENCRYPTION_NONE);
+  creator_.set_encryption_level(ENCRYPTION_INITIAL);
   EXPECT_CALL(delegate_, OnUnrecoverableError(_, _, _));
   QuicStreamFrame stream_frame(
       QuicUtils::GetHeadersStreamId(client_framer_.transport_version()),
@@ -1344,7 +1344,7 @@
   frames.push_back(QuicFrame(stream_frame));
   char buffer[kMaxPacketSize];
   QuicPendingRetransmission retransmission(CreateRetransmission(
-      frames, true, /*num_padding_bytes=*/0, ENCRYPTION_NONE,
+      frames, true, /*num_padding_bytes=*/0, ENCRYPTION_INITIAL,
       QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)));
   EXPECT_CALL(delegate_, OnSerializedPacket(_))
       .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
@@ -1382,7 +1382,7 @@
   frames.push_back(frame);
   char buffer[kMaxPacketSize];
   QuicPendingRetransmission retransmission(CreateRetransmission(
-      frames, true, /*num_padding_bytes=*/-1, ENCRYPTION_NONE,
+      frames, true, /*num_padding_bytes=*/-1, ENCRYPTION_INITIAL,
       QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)));
   EXPECT_CALL(delegate_, OnSerializedPacket(_))
       .WillRepeatedly(
diff --git a/quic/core/quic_packet_generator_test.cc b/quic/core/quic_packet_generator_test.cc
index a2930c0..bc20bfe 100644
--- a/quic/core/quic_packet_generator_test.cc
+++ b/quic/core/quic_packet_generator_test.cc
@@ -479,7 +479,7 @@
       .WillOnce(Invoke(this, &QuicPacketGeneratorTest::SavePacket));
   std::string data = "crypto data";
   size_t consumed_bytes =
-      generator_.ConsumeCryptoData(ENCRYPTION_NONE, data, 0);
+      generator_.ConsumeCryptoData(ENCRYPTION_INITIAL, data, 0);
   generator_.Flush();
   EXPECT_EQ(data.length(), consumed_bytes);
   EXPECT_FALSE(generator_.HasQueuedFrames());
diff --git a/quic/core/quic_packets.cc b/quic/core/quic_packets.cc
index e3ed6a7..9b2cb09 100644
--- a/quic/core/quic_packets.cc
+++ b/quic/core/quic_packets.cc
@@ -376,7 +376,7 @@
       num_padding_bytes(0),
       packet_number(packet_number),
       packet_number_length(packet_number_length),
-      encryption_level(ENCRYPTION_NONE),
+      encryption_level(ENCRYPTION_INITIAL),
       has_ack(has_ack),
       has_stop_waiting(has_stop_waiting),
       transmission_type(NOT_RETRANSMISSION) {}
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index e078f5f..efe0ab6 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -367,7 +367,7 @@
     for (QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin();
          it != unacked_packets_.end(); ++it, ++packet_number) {
       if (!it->retransmittable_frames.empty() &&
-          it->encryption_level == ENCRYPTION_NONE) {
+          it->encryption_level == ENCRYPTION_INITIAL) {
         // Once the connection swithes to forward secure, no unencrypted packets
         // will be sent. The data has been abandoned in the cryto stream. Remove
         // it from in flight.
@@ -378,7 +378,7 @@
   }
   for (QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin();
        it != unacked_packets_.end(); ++it, ++packet_number) {
-    if (it->encryption_level == ENCRYPTION_NONE &&
+    if (it->encryption_level == ENCRYPTION_INITIAL &&
         unacked_packets_.HasRetransmittableFrames(*it)) {
       // Once you're forward secure, no unencrypted packets will be sent, crypto
       // or otherwise. Unencrypted packets are neutered and abandoned, to ensure
diff --git a/quic/core/quic_session_test.cc b/quic/core/quic_session_test.cc
index ef8a02a..0fb8e37 100644
--- a/quic/core/quic_session_test.cc
+++ b/quic/core/quic_session_test.cc
@@ -1815,7 +1815,7 @@
   if (!QuicVersionUsesCryptoFrames(connection_->transport_version())) {
     session_.OnFrameLost(QuicFrame(frame1));
   } else {
-    QuicCryptoFrame crypto_frame(ENCRYPTION_NONE, 0, 1300);
+    QuicCryptoFrame crypto_frame(ENCRYPTION_INITIAL, 0, 1300);
     session_.OnFrameLost(QuicFrame(&crypto_frame));
   }
   session_.OnFrameLost(QuicFrame(frame2));
diff --git a/quic/core/quic_time_wait_list_manager.cc b/quic/core/quic_time_wait_list_manager.cc
index 932cba7..6fba2eb 100644
--- a/quic/core/quic_time_wait_list_manager.cc
+++ b/quic/core/quic_time_wait_list_manager.cc
@@ -158,14 +158,14 @@
           if (!connection_data->ietf_quic) {
             QUIC_CODE_COUNT(quic_received_short_header_packet_for_gquic);
           }
-          if (connection_data->encryption_level == ENCRYPTION_NONE) {
+          if (connection_data->encryption_level == ENCRYPTION_INITIAL) {
             QUIC_CODE_COUNT(
                 quic_encryption_none_termination_packets_for_short_header);
             if (GetQuicReloadableFlag(quic_always_reset_short_header_packets)) {
               QUIC_RELOADABLE_FLAG_COUNT(
                   quic_always_reset_short_header_packets);
               // Send stateless reset in response to short header packets,
-              // because ENCRYPTION_NONE termination packets will not be
+              // because ENCRYPTION_INITIAL termination packets will not be
               // processed by clients.
               SendPublicReset(self_address, peer_address, connection_id,
                               connection_data->ietf_quic,
@@ -370,7 +370,7 @@
     : num_packets(num_packets),
       ietf_quic(ietf_quic),
       time_added(time_added),
-      encryption_level(ENCRYPTION_NONE),
+      encryption_level(ENCRYPTION_INITIAL),
       action(action) {}
 
 QuicTimeWaitListManager::ConnectionIdData::ConnectionIdData(
diff --git a/quic/core/quic_time_wait_list_manager_test.cc b/quic/core/quic_time_wait_list_manager_test.cc
index 753a832..aa0c911 100644
--- a/quic/core/quic_time_wait_list_manager_test.cc
+++ b/quic/core/quic_time_wait_list_manager_test.cc
@@ -154,7 +154,7 @@
         new QuicEncryptedPacket(nullptr, 0, false)));
     time_wait_list_manager_.AddConnectionIdToTimeWait(
         connection_id, false, QuicTimeWaitListManager::SEND_TERMINATION_PACKETS,
-        ENCRYPTION_NONE, &termination_packets);
+        ENCRYPTION_INITIAL, &termination_packets);
   }
 
   void AddConnectionId(
@@ -164,7 +164,7 @@
       std::vector<std::unique_ptr<QuicEncryptedPacket>>* packets) {
     time_wait_list_manager_.AddConnectionIdToTimeWait(
         connection_id, version.transport_version > QUIC_VERSION_43, action,
-        ENCRYPTION_NONE, packets);
+        ENCRYPTION_INITIAL, packets);
   }
 
   bool IsConnectionIdInTimeWait(QuicConnectionId connection_id) {
@@ -545,7 +545,7 @@
 // Regression test for b/116200989.
 TEST_F(QuicTimeWaitListManagerTest,
        SendStatelessResetInResponseToShortHeaders) {
-  // This test mimics a scenario where an ENCRYPTION_NONE connection close is
+  // This test mimics a scenario where an ENCRYPTION_INITIAL connection close is
   // added as termination packet for an IETF connection ID. However, a short
   // header packet is received later.
   const size_t kConnectionCloseLength = 100;
@@ -554,10 +554,10 @@
   termination_packets.push_back(
       std::unique_ptr<QuicEncryptedPacket>(new QuicEncryptedPacket(
           new char[kConnectionCloseLength], kConnectionCloseLength, true)));
-  // Add an ENCRYPTION_NONE termination packet.
+  // Add an ENCRYPTION_INITIAL termination packet.
   time_wait_list_manager_.AddConnectionIdToTimeWait(
       connection_id_, /*ietf_quic=*/true,
-      QuicTimeWaitListManager::SEND_TERMINATION_PACKETS, ENCRYPTION_NONE,
+      QuicTimeWaitListManager::SEND_TERMINATION_PACKETS, ENCRYPTION_INITIAL,
       &termination_packets);
 
   if (GetQuicReloadableFlag(quic_always_reset_short_header_packets)) {
diff --git a/quic/core/quic_trace_visitor.cc b/quic/core/quic_trace_visitor.cc
index 2c5b06d..246a2e2 100644
--- a/quic/core/quic_trace_visitor.cc
+++ b/quic/core/quic_trace_visitor.cc
@@ -12,7 +12,7 @@
 
 quic_trace::EncryptionLevel EncryptionLevelToProto(EncryptionLevel level) {
   switch (level) {
-    case ENCRYPTION_NONE:
+    case ENCRYPTION_INITIAL:
       return quic_trace::ENCRYPTION_INITIAL;
     case ENCRYPTION_HANDSHAKE:
       return quic_trace::ENCRYPTION_HANDSHAKE;
diff --git a/quic/core/quic_transmission_info.cc b/quic/core/quic_transmission_info.cc
index 6e9d02c..fb5cf67 100644
--- a/quic/core/quic_transmission_info.cc
+++ b/quic/core/quic_transmission_info.cc
@@ -7,7 +7,7 @@
 namespace quic {
 
 QuicTransmissionInfo::QuicTransmissionInfo()
-    : encryption_level(ENCRYPTION_NONE),
+    : encryption_level(ENCRYPTION_INITIAL),
       packet_number_length(PACKET_1BYTE_PACKET_NUMBER),
       bytes_sent(0),
       sent_time(QuicTime::Zero()),
diff --git a/quic/core/quic_types.h b/quic/core/quic_types.h
index 6827ff1..54d1628 100644
--- a/quic/core/quic_types.h
+++ b/quic/core/quic_types.h
@@ -372,7 +372,7 @@
 // to be specified so that it is retransmitted at a level which the peer can
 // understand.
 enum EncryptionLevel : int8_t {
-  ENCRYPTION_NONE = 0,
+  ENCRYPTION_INITIAL = 0,
   ENCRYPTION_HANDSHAKE = 1,
   ENCRYPTION_ZERO_RTT = 2,
   ENCRYPTION_FORWARD_SECURE = 3,
diff --git a/quic/core/quic_unacked_packet_map.cc b/quic/core/quic_unacked_packet_map.cc
index 859bf39..fcd5308 100644
--- a/quic/core/quic_unacked_packet_map.cc
+++ b/quic/core/quic_unacked_packet_map.cc
@@ -512,8 +512,8 @@
     EncryptionLevel encryption_level) const {
   DCHECK(use_uber_loss_algorithm_);
   if (perspective_ == Perspective::IS_CLIENT) {
-    return encryption_level == ENCRYPTION_NONE ? HANDSHAKE_DATA
-                                               : APPLICATION_DATA;
+    return encryption_level == ENCRYPTION_INITIAL ? HANDSHAKE_DATA
+                                                  : APPLICATION_DATA;
   }
   return encryption_level == ENCRYPTION_FORWARD_SECURE ? APPLICATION_DATA
                                                        : HANDSHAKE_DATA;
diff --git a/quic/core/quic_utils.cc b/quic/core/quic_utils.cc
index 2768ca5..6aaa67b 100644
--- a/quic/core/quic_utils.cc
+++ b/quic/core/quic_utils.cc
@@ -142,7 +142,7 @@
 // static
 const char* QuicUtils::EncryptionLevelToString(EncryptionLevel level) {
   switch (level) {
-    RETURN_STRING_LITERAL(ENCRYPTION_NONE);
+    RETURN_STRING_LITERAL(ENCRYPTION_INITIAL);
     RETURN_STRING_LITERAL(ENCRYPTION_HANDSHAKE);
     RETURN_STRING_LITERAL(ENCRYPTION_ZERO_RTT);
     RETURN_STRING_LITERAL(ENCRYPTION_FORWARD_SECURE);
diff --git a/quic/core/tls_client_handshaker.cc b/quic/core/tls_client_handshaker.cc
index ddccd93..a5116ee 100644
--- a/quic/core/tls_client_handshaker.cc
+++ b/quic/core/tls_client_handshaker.cc
@@ -69,9 +69,9 @@
   CryptoUtils::CreateTlsInitialCrypters(
       Perspective::IS_CLIENT, session()->connection()->transport_version(),
       session()->connection_id(), &crypters);
-  session()->connection()->SetEncrypter(ENCRYPTION_NONE,
+  session()->connection()->SetEncrypter(ENCRYPTION_INITIAL,
                                         std::move(crypters.encrypter));
-  session()->connection()->SetDecrypter(ENCRYPTION_NONE,
+  session()->connection()->SetDecrypter(ENCRYPTION_INITIAL,
                                         std::move(crypters.decrypter));
   state_ = STATE_HANDSHAKE_RUNNING;
   // Configure certificate verification.
diff --git a/quic/core/tls_handshaker.cc b/quic/core/tls_handshaker.cc
index 2b6c83f..17e2674 100644
--- a/quic/core/tls_handshaker.cc
+++ b/quic/core/tls_handshaker.cc
@@ -103,7 +103,7 @@
     enum ssl_encryption_level_t level) {
   switch (level) {
     case ssl_encryption_initial:
-      return ENCRYPTION_NONE;
+      return ENCRYPTION_INITIAL;
     case ssl_encryption_early_data:
     case ssl_encryption_handshake:
       return ENCRYPTION_ZERO_RTT;
@@ -116,7 +116,7 @@
 enum ssl_encryption_level_t TlsHandshaker::BoringEncryptionLevel(
     EncryptionLevel level) {
   switch (level) {
-    case ENCRYPTION_NONE:
+    case ENCRYPTION_INITIAL:
       return ssl_encryption_initial;
     case ENCRYPTION_HANDSHAKE:
     case ENCRYPTION_ZERO_RTT:
diff --git a/quic/core/tls_handshaker_test.cc b/quic/core/tls_handshaker_test.cc
index 2640651..6aa83d2 100644
--- a/quic/core/tls_handshaker_test.cc
+++ b/quic/core/tls_handshaker_test.cc
@@ -387,7 +387,7 @@
       0, 0, 0,  // uint24 length
   };
   server_stream_->WriteCryptoData(
-      ENCRYPTION_NONE,
+      ENCRYPTION_INITIAL,
       QuicStringPiece(bogus_handshake_message,
                       QUIC_ARRAYSIZE(bogus_handshake_message)));
   server_stream_->SendCryptoMessagesToPeer(client_stream_);
@@ -405,7 +405,7 @@
       0, 0, 0,  // uint24 length
   };
   client_stream_->WriteCryptoData(
-      ENCRYPTION_NONE,
+      ENCRYPTION_INITIAL,
       QuicStringPiece(bogus_handshake_message,
                       QUIC_ARRAYSIZE(bogus_handshake_message)));
   client_stream_->SendCryptoMessagesToPeer(server_stream_);
diff --git a/quic/core/tls_server_handshaker.cc b/quic/core/tls_server_handshaker.cc
index e3892c3..16c84b1 100644
--- a/quic/core/tls_server_handshaker.cc
+++ b/quic/core/tls_server_handshaker.cc
@@ -65,9 +65,9 @@
   CryptoUtils::CreateTlsInitialCrypters(
       Perspective::IS_SERVER, session->connection()->transport_version(),
       session->connection_id(), &crypters);
-  session->connection()->SetEncrypter(ENCRYPTION_NONE,
+  session->connection()->SetEncrypter(ENCRYPTION_INITIAL,
                                       std::move(crypters.encrypter));
-  session->connection()->SetDecrypter(ENCRYPTION_NONE,
+  session->connection()->SetDecrypter(ENCRYPTION_INITIAL,
                                       std::move(crypters.decrypter));
 
   // Configure the SSL to be a server.
diff --git a/quic/test_tools/quic_framer_peer.cc b/quic/test_tools/quic_framer_peer.cc
index defdab4..9d8ec86 100644
--- a/quic/test_tools/quic_framer_peer.cc
+++ b/quic/test_tools/quic_framer_peer.cc
@@ -305,7 +305,7 @@
 
 // static
 void QuicFramerPeer::SwapCrypters(QuicFramer* framer1, QuicFramer* framer2) {
-  for (int i = ENCRYPTION_NONE; i < NUM_ENCRYPTION_LEVELS; i++) {
+  for (int i = ENCRYPTION_INITIAL; i < NUM_ENCRYPTION_LEVELS; i++) {
     framer1->encrypter_[i].swap(framer2->encrypter_[i]);
   }
   framer1->decrypter_.swap(framer2->decrypter_);
diff --git a/quic/test_tools/quic_test_utils.cc b/quic/test_tools/quic_test_utils.cc
index d74df6a..c80a055 100644
--- a/quic/test_tools/quic_test_utils.cc
+++ b/quic/test_tools/quic_test_utils.cc
@@ -131,7 +131,7 @@
     size_t packet_size) {
   char* buffer = new char[packet_size];
   size_t length = framer->BuildDataPacket(header, frames, buffer, packet_size,
-                                          ENCRYPTION_NONE);
+                                          ENCRYPTION_INITIAL);
   DCHECK_NE(0u, length);
   // Re-construct the data packet with data ownership.
   return QuicMakeUnique<QuicPacket>(
@@ -875,7 +875,7 @@
         0, QuicStringPiece(data)));
     frames.push_back(frame);
   } else {
-    QuicFrame frame(new QuicCryptoFrame(ENCRYPTION_NONE, 0, data));
+    QuicFrame frame(new QuicCryptoFrame(ENCRYPTION_INITIAL, 0, data));
     frames.push_back(frame);
   }
 
@@ -884,7 +884,7 @@
   EXPECT_TRUE(packet != nullptr);
   char* buffer = new char[kMaxPacketSize];
   size_t encrypted_length =
-      framer.EncryptPayload(ENCRYPTION_NONE, QuicPacketNumber(packet_number),
+      framer.EncryptPayload(ENCRYPTION_INITIAL, QuicPacketNumber(packet_number),
                             *packet, buffer, kMaxPacketSize);
   EXPECT_NE(0u, encrypted_length);
   DeleteFrames(&frames);
@@ -945,7 +945,7 @@
 
   char* buffer = new char[kMaxPacketSize];
   size_t encrypted_length =
-      framer.EncryptPayload(ENCRYPTION_NONE, QuicPacketNumber(packet_number),
+      framer.EncryptPayload(ENCRYPTION_INITIAL, QuicPacketNumber(packet_number),
                             *packet, buffer, kMaxPacketSize);
   EXPECT_NE(0u, encrypted_length);
   return new QuicEncryptedPacket(buffer, encrypted_length, true);
diff --git a/quic/test_tools/simple_session_notifier.cc b/quic/test_tools/simple_session_notifier.cc
index d1ee832..7a76194 100644
--- a/quic/test_tools/simple_session_notifier.cc
+++ b/quic/test_tools/simple_session_notifier.cc
@@ -113,7 +113,7 @@
 }
 
 void SimpleSessionNotifier::NeuterUnencryptedData() {
-  for (const auto& interval : crypto_bytes_transferred_[ENCRYPTION_NONE]) {
+  for (const auto& interval : crypto_bytes_transferred_[ENCRYPTION_INITIAL]) {
     // TODO(nharper): Handle CRYPTO frame case.
     QuicStreamFrame stream_frame(
         QuicUtils::GetCryptoStreamId(connection_->transport_version()), false,
@@ -497,7 +497,7 @@
     QuicIntervalSet<QuicStreamOffset> retransmission(
         state.pending_retransmissions.begin()->min(),
         state.pending_retransmissions.begin()->max());
-    EncryptionLevel retransmission_encryption_level = ENCRYPTION_NONE;
+    EncryptionLevel retransmission_encryption_level = ENCRYPTION_INITIAL;
     for (size_t i = 0; i < NUM_ENCRYPTION_LEVELS; ++i) {
       if (retransmission.Intersects(crypto_bytes_transferred_[i])) {
         retransmission_encryption_level = static_cast<EncryptionLevel>(i);
diff --git a/quic/test_tools/simple_session_notifier_test.cc b/quic/test_tools/simple_session_notifier_test.cc
index b20fee6..136544b 100644
--- a/quic/test_tools/simple_session_notifier_test.cc
+++ b/quic/test_tools/simple_session_notifier_test.cc
@@ -102,8 +102,8 @@
 
 TEST_F(SimpleSessionNotifierTest, NeuterUnencryptedData) {
   InSequence s;
-  // Send crypto data [0, 1024) in ENCRYPTION_NONE.
-  connection_.SetDefaultEncryptionLevel(ENCRYPTION_NONE);
+  // Send crypto data [0, 1024) in ENCRYPTION_INITIAL.
+  connection_.SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
   EXPECT_CALL(connection_, SendStreamData(QuicUtils::GetCryptoStreamId(
                                               connection_.transport_version()),
                                           1024, 0, NO_FIN))
@@ -135,8 +135,8 @@
 
 TEST_F(SimpleSessionNotifierTest, OnCanWrite) {
   InSequence s;
-  // Send crypto data [0, 1024) in ENCRYPTION_NONE.
-  connection_.SetDefaultEncryptionLevel(ENCRYPTION_NONE);
+  // Send crypto data [0, 1024) in ENCRYPTION_INITIAL.
+  connection_.SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
   EXPECT_CALL(connection_, SendStreamData(QuicUtils::GetCryptoStreamId(
                                               connection_.transport_version()),
                                           1024, 0, NO_FIN))
diff --git a/quic/tools/quic_packet_printer_bin.cc b/quic/tools/quic_packet_printer_bin.cc
index 77906a1..28bc790 100644
--- a/quic/tools/quic_packet_printer_bin.cc
+++ b/quic/tools/quic_packet_printer_bin.cc
@@ -73,7 +73,7 @@
   }
   void OnDecryptedPacket(EncryptionLevel level) override {
     // This only currently supports "decrypting" null encrypted packets.
-    DCHECK_EQ(ENCRYPTION_NONE, level);
+    DCHECK_EQ(ENCRYPTION_INITIAL, level);
     std::cerr << "OnDecryptedPacket\n";
   }
   bool OnPacketHeader(const QuicPacketHeader& header) override {
