summaryrefslogtreecommitdiff
path: root/drivers/net/wireguard/receive.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-18 18:30:47 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2022-07-07 13:26:41 +0200
commitb7e73a2370c5ae7fd425aaec5fc99e3509044252 (patch)
treeba6ff9d6416d3daa149f17aae26b0143e3134b13 /drivers/net/wireguard/receive.c
parent2ce900eab755e875a6b66162a12611cefe0592b3 (diff)
downloadwireguard-linux-trimmed-b7e73a2370c5ae7fd425aaec5fc99e3509044252.tar.gz
wireguard-linux-trimmed-b7e73a2370c5ae7fd425aaec5fc99e3509044252.zip
wireguard: noise: error out precomputed DH during handshake rather than config
commit c5e5f40e27f6b87324ae89d175879cf35498632c upstream. We precompute the static-static ECDH during configuration time, in order to save an expensive computation later when receiving network packets. However, not all ECDH computations yield a contributory result. Prior, we were just not letting those peers be added to the interface. However, this creates a strange inconsistency, since it was still possible to add other weird points, like a valid public key plus a low-order point, and, like points that result in zeros, a handshake would not complete. In order to make the behavior more uniform and less surprising, simply allow all peers to be added. Then, we'll error out later when doing the crypto if there's an issue. This also adds more separation between the crypto layer and the configuration layer. Discussed-with: Mathias Hall-Andersen <mathias@hall-andersen.dk> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions