Commit Graph

6 Commits

Author SHA1 Message Date
Peter Grehan
5aaea4b99e Always clamp curve25519 keys prior to use.
This fixes an issue where a private key	contained bits that should
have been cleared by the clamping process, but were passed through
to the scalar multiplication routine and resulted in an	invalid
public key.

Issue diagnosed	(and an	initial	fix proposed) by shamaz.mazum in
PR 252894.

This fix suggested by Jason Donenfeld.

PR:		252894
Reported by:	shamaz.mazum
Reviewed by:	dch
MFC after:	3 days
2021-02-03 19:05:09 +10:00
Mitchell Horne
d89e1db5a3 if_wg: fix modules load on !x86
Only x86 provides optimized implementations via the blake2 module. The
software "reference" implementation is already included in the crypto(4)
module, we can drop the extra MODULE_DEPEND for other platforms.

Without this change, if_wg.ko could not be loaded due to the missing
dependency.

PR:		252156
Reported by:	gbe
Sponsored by:	The FreeBSD Foundation
2021-01-12 18:07:10 -04:00
Ryan Libby
75dd118247 if_wg: appease gcc
- remove -ferror-limit option
 - quiet -Wredundant-decls

Reviewed by:	mmacy
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D27559
2020-12-11 22:52:03 +00:00
Matt Macy
ac042c65ae wireguard: fix zfs_ copy pasta in module init macro
Reported by: Jessica Clarke
2020-11-30 20:58:42 +00:00
Matt Macy
d0c96ffc59 Remove (dead) GPL copyright code from wireguard sources 2020-11-30 20:54:44 +00:00
Matt Macy
2338da0373 Import kernel WireGuard support
Data path largely shared with the OpenBSD implementation by
Matt Dunwoodie <ncon@nconroy.net>

Reviewed by:	grehan@freebsd.org
MFC after:	1 month
Sponsored by:	Rubicon LLC, (Netgate)
Differential Revision:	https://reviews.freebsd.org/D26137
2020-11-29 19:38:03 +00:00