[WireGuard] stricter inputs for wg genkey, genpsk, and pubkey

Jason A. Donenfeld Jason at zx2c4.com
Sun Jul 3 19:48:52 CEST 2016


> + memcpy(private_key_normalized, private_key, sizeof(private_key_normalized));
> + curve25519_normalize_secret(private_key_normalized);
> + if (memcmp(private_key_normalized, private_key, sizeof(private_key_normalized))) {
> + fprintf(stderr, "%s %s: private key was not in normalized form\n", PROG_NAME, argv[0]);
> + return 1;
> + }


Do you have a justification for requiring normalized form?
curve25519-donna doesn't care either way.


More information about the WireGuard mailing list