diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-12-05 13:18:17 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-12-05 14:54:46 +0100 |
commit | c5591560ff58201c58379b80630134a1784bb36d (patch) | |
tree | c077de3aa5fcefaa4ca987ed084823ecf2583049 /src/send.c | |
parent | 87e48ccfbfb99a849daade12cb7f192edf8eced8 (diff) |
chacha20poly1305: port to sgmitter for 5.5
I'm not totally comfortable with these changes yet, and it'll require
some more scrutiny. But it's a start.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/send.c')
-rw-r--r-- | src/send.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -207,9 +207,10 @@ static bool encrypt_packet(struct sk_buff *skb, struct noise_keypair *keypair, if (skb_to_sgvec(skb, sg, sizeof(struct message_data), noise_encrypted_len(plaintext_len)) <= 0) return false; - return chacha20poly1305_encrypt_sg(sg, sg, plaintext_len, NULL, 0, - PACKET_CB(skb)->nonce, - keypair->sending.key, simd_context); + return chacha20poly1305_encrypt_sg_inplace(sg, plaintext_len, NULL, 0, + PACKET_CB(skb)->nonce, + keypair->sending.key, + simd_context); } void wg_packet_send_keepalive(struct wg_peer *peer) |