diff options
| author | Jason A. Donenfeld <[email protected]> | 2017-01-08 13:54:02 +0100 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-01-09 13:58:57 -0500 |
| commit | 7cd23e5300c1b95903859a8bdc084e79be66ce16 (patch) | |
| tree | d13c33609d8cb1a9629a72cb10633ef6dadcf660 /tools/perf/scripts/python/bin | |
| parent | 1ae2324f732c9c4e2fa4ebd885fa1001b70d52e1 (diff) | |
secure_seq: use SipHash in place of MD5
This gives a clear speed and security improvement. Siphash is both
faster and is more solid crypto than the aging MD5.
Rather than manually filling MD5 buffers, for IPv6, we simply create
a layout by a simple anonymous struct, for which gcc generates
rather efficient code. For IPv4, we pass the values directly to the
short input convenience functions.
64-bit x86_64:
[ 1.683628] secure_tcpv6_sequence_number_md5# cycles: 99563527
[ 1.717350] secure_tcp_sequence_number_md5# cycles: 92890502
[ 1.741968] secure_tcpv6_sequence_number_siphash# cycles: 67825362
[ 1.762048] secure_tcp_sequence_number_siphash# cycles: 67485526
32-bit x86:
[ 1.600012] secure_tcpv6_sequence_number_md5# cycles: 103227892
[ 1.634219] secure_tcp_sequence_number_md5# cycles: 94732544
[ 1.669102] secure_tcpv6_sequence_number_siphash# cycles: 96299384
[ 1.700165] secure_tcp_sequence_number_siphash# cycles: 86015473
Signed-off-by: Jason A. Donenfeld <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Miller <[email protected]>
Cc: David Laight <[email protected]>
Cc: Tom Herbert <[email protected]>
Cc: Hannes Frederic Sowa <[email protected]>
Cc: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions