DescriptionPool 64 bits of entropy instead of calling OpenSSL's RNG for one bit
when creating packets. Clean up the entropy bit while I'm at it.
Changes:
1. QuicPacketCreator buffers 64 bits of entropy and consumes them
one-at-a-time. This should resolve the performance issue. Covered
this with a unit test. Removed the RandBool call from QuicRandom.
2. The first packet gets a random entropy bit. We used to never set it
because we failed to test it properly. This was sad because the first
packet deserves the most protection.
3. The entropy hash computation had a TODO to make it stronger, but I'm
convinced the current algorithm is in fact sound. Removed the TODO
and tightened up the implementation to avoid an unpredictable branch
(no behavior change!) Also covered by the test.
4. Fixed the bugs in QuicConnectionTest that prevented setting the bit
in the first packet. Switched tests to properly use MockRandom.
Merge internal change: 57908681
R=rch@chromium.org
Patch Set 1 #
Total comments: 3
Patch Set 2 : Deleted the second MockRandom #
Messages
Total messages: 5 (0 generated)
|