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

Unified Diff: net/quic/core/crypto/aead_base_encrypter.cc

Issue 2679673005: Remove path id from IV in QUIC encrytion algorithms. (Closed)
Patch Set: Created 3 years, 10 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 | « net/quic/core/crypto/aead_base_encrypter.h ('k') | net/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/aead_base_encrypter.cc
diff --git a/net/quic/core/crypto/aead_base_encrypter.cc b/net/quic/core/crypto/aead_base_encrypter.cc
index 1420b009b160de25dd618a707e3c799702cee976..33183898928b54e68460b95df325abfbe5d0ee16 100644
--- a/net/quic/core/crypto/aead_base_encrypter.cc
+++ b/net/quic/core/crypto/aead_base_encrypter.cc
@@ -103,7 +103,6 @@ bool AeadBaseEncrypter::Encrypt(StringPiece nonce,
}
bool AeadBaseEncrypter::EncryptPacket(QuicVersion /*version*/,
- QuicPathId path_id,
QuicPacketNumber packet_number,
StringPiece associated_data,
StringPiece plaintext,
@@ -119,10 +118,8 @@ bool AeadBaseEncrypter::EncryptPacket(QuicVersion /*version*/,
const size_t nonce_size = nonce_prefix_size_ + sizeof(packet_number);
QUIC_ALIGNED(4) char nonce_buffer[kMaxNonceSize];
memcpy(nonce_buffer, nonce_prefix_, nonce_prefix_size_);
- uint64_t path_id_packet_number =
- QuicUtils::PackPathIdAndPacketNumber(path_id, packet_number);
- memcpy(nonce_buffer + nonce_prefix_size_, &path_id_packet_number,
- sizeof(path_id_packet_number));
+ memcpy(nonce_buffer + nonce_prefix_size_, &packet_number,
+ sizeof(packet_number));
if (!Encrypt(StringPiece(nonce_buffer, nonce_size), associated_data,
plaintext, reinterpret_cast<unsigned char*>(output))) {
« no previous file with comments | « net/quic/core/crypto/aead_base_encrypter.h ('k') | net/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698