Privacy enhancing man-in-the-middle
In one embodiment, a device in a network receives traffic sent from a first endpoint. The device sends a padding request to the second endpoint indicative of a number of padding bytes. The device receives a padding response from the second endpoint, after sending the padding request to the second endpoint. The device adjusts the received traffic based on the received padding response by adding one or more frames to the received traffic. The device sends the adjusted traffic to the second endpoint.
1. A method comprising:
receiving, by a device in a network, traffic sent from a first endpoint;
sending, by the device, a padding request to a second endpoint indicative of a number of padding bytes;
receiving, at the device, a padding response from the second endpoint, after sending the padding request to the second endpoint;
adjusting, by the device, the received traffic based on the received padding response by adding one or more frames to the received traffic; and
sending, by the device, the adjusted traffic to the second endpoint.
2. The method as in claim 1 , wherein adjusting the received traffic based on the padding response comprises:
padding frames of the received traffic with a number of padding bytes specified by the received padding response, wherein the second endpoint removes the padding bytes from the padded frames.
3. The method as in claim 2 , wherein the padding response specifies a number of padding bytes that is less than the number of padding bytes indicated in the padding request.
4. The method as in claim 1 , wherein the received traffic is encrypted.
5. The method as in claim 1 , wherein the padding response from the second endpoint indicates that the second endpoint will not accommodate the padding request.
6. The method as in claim 5 , wherein adjusting the received traffic based on the received padding response comprises:
adding randomized, previously observed headers sent by the first endpoint to the received traffic.
7. The method as in claim 5 , wherein the padding response comprises an indication that the number of padding bytes indicated by the padding request exceeds a maximum number of padding bytes supported by the second endpoint.
8. The method as in claim 5 , wherein the padding response comprises a lack of communication from the second endpoint within a threshold amount of time after the device sent the padding request.
9. The method as in claim 1 , wherein the one or more frames added to the received traffic comprise at least one of: a PING frame, a SETTINGS frame, or a WINDOWS_UPDATE frame.
10. The method as in claim 1 , wherein the device comprises a proxy, router, or firewall.
11. An apparatus, comprising:
one or more network interfaces to communicate with a network;
a processor coupled to the network interfaces and configured to execute one or more processes; and
a memory configured to store a process executable by the processor, the process when executed configured to:
receive traffic sent from a first endpoint;
send a padding request to a second endpoint indicative of a number of padding bytes;
receive a padding response from the second endpoint, after sending the padding request to the second endpoint;
adjust the received traffic based on the received padding response by adding one or more frames to the received traffic; and
send the adjusted traffic to the second endpoint.
12. The apparatus as in claim 11 , wherein the apparatus adjusts the received traffic based on the padding response by:
padding frames of the received traffic with a number of padding bytes specified by the received padding response, wherein the second endpoint removes the padding bytes from the padded frames.
13. The apparatus as in claim 12 , wherein the padding response specifies a number of padding bytes that is less than the number of padding bytes indicated in the padding request.
14. The apparatus as in claim 11 , wherein the received traffic is encrypted.
15. The apparatus as in claim 11 , wherein the padding response from the second endpoint indicates that the second endpoint will not accommodate the padding request.
16. The apparatus as in claim 15 , wherein the apparatus adjusts the received traffic based on the received padding response by:
adding randomized, previously observed headers sent by the first endpoint to the received traffic.
17. The apparatus as in claim 15 , wherein the padding response comprises an indication that the number of padding bytes indicated by the padding request exceeds a maximum number of padding bytes supported by the second endpoint.
18. The apparatus as in claim 11 , wherein the one or more frames added to the received traffic comprise at least one of: a PING frame, a SETTINGS frame, or a WINDOWS_UPDATE frame.
19. The apparatus as in claim 11 , wherein the apparatus adjusts the received traffic based on the received padding response by:
multiplexing the received traffic with additional traffic.
20. A tangible, non-transitory, computer-readable medium storing program instructions that cause a device in a network to execute a process comprising:
receiving, by the device in the network, traffic sent from a first endpoint;
sending, by the device, a padding request to a second endpoint indicative of a number of padding bytes;
receiving, at the device, a padding response from the second endpoint, after sending the padding request to the second endpoint;
adjusting, by the device, the received traffic based on the received padding response by adding one or more frames to the received traffic; and
sending, by the device, the adjusted traffic to the second endpoint.