From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] ipsec: Prefer curve448 over curve25519 Date: Mon, 14 Jun 2021 10:33:46 +0100 Message-ID: <20210614093346.11267-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3945039342516008799==" List-Id: --===============3945039342516008799== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Curve448 provides better cryptographic security. For more details see: https://bugzilla.ipfire.org/show_bug.cgi?id=3D12634 Fixes: #12634 Signed-off-by: Michael Tremer --- html/cgi-bin/vpnmain.cgi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 9c5532d68..776ee3249 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -2337,11 +2337,11 @@ END #use default advanced value $cgiparams{'IKE_ENCRYPTION'} =3D 'chacha20poly1305|aes256gcm128|aes256gcm96= |aes256gcm64|aes256|aes192gcm128|aes192gcm96|aes192gcm64|aes192|aes128gcm128|= aes128gcm96|aes128gcm64|aes128'; #[18]; $cgiparams{'IKE_INTEGRITY'} =3D 'sha2_512|sha2_256'; #[19]; - $cgiparams{'IKE_GROUPTYPE'} =3D 'curve25519|curve448|4096|3072|2048'; #[20= ]; + $cgiparams{'IKE_GROUPTYPE'} =3D 'curve448|curve448|4096|3072|2048'; #[20]; $cgiparams{'IKE_LIFETIME'} =3D '3'; #[16]; $cgiparams{'ESP_ENCRYPTION'} =3D 'chacha20poly1305|aes256gcm128|aes256gcm96= |aes256gcm64|aes256|aes192gcm128|aes192gcm96|aes192gcm64|aes192|aes128gcm128|= aes128gcm96|aes128gcm64|aes128'; #[21]; $cgiparams{'ESP_INTEGRITY'} =3D 'sha2_512|sha2_256'; #[22]; - $cgiparams{'ESP_GROUPTYPE'} =3D 'curve25519|curve448|4096|3072|2048'; #[23= ]; + $cgiparams{'ESP_GROUPTYPE'} =3D 'curve448|curve25519|4096|3072|2048'; #[23= ]; $cgiparams{'ESP_KEYLIFE'} =3D '1'; #[17]; $cgiparams{'COMPRESSION'} =3D 'off'; #[13]; $cgiparams{'ONLY_PROPOSED'} =3D 'on'; #[24]; @@ -2722,7 +2722,7 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) || goto ADVANCED_ERROR; } foreach my $val (@temp) { - if ($val !~ /^(curve25519|curve448|e521|e384|e256|e224|e192|e512bp|e384bp= |e256bp|e224bp|768|1024|1536|2048|3072|4096|6144|8192)$/) { + if ($val !~ /^(curve448|curve25519|e521|e384|e256|e224|e192|e512bp|e384bp= |e256bp|e224bp|768|1024|1536|2048|3072|4096|6144|8192)$/) { $errormessage =3D $Lang::tr{'invalid input'}; goto ADVANCED_ERROR; } @@ -2763,7 +2763,7 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) || goto ADVANCED_ERROR; } foreach my $val (@temp) { - if ($val !~ /^(curve25519|curve448|e521|e384|e256|e224|e192|e512bp|e384bp= |e256bp|e224bp|768|1024|1536|2048|3072|4096|6144|8192|none)$/) { + if ($val !~ /^(curve448|curve25519|e521|e384|e256|e224|e192|e512bp|e384bp= |e256bp|e224bp|768|1024|1536|2048|3072|4096|6144|8192|none)$/) { $errormessage =3D $Lang::tr{'invalid input'}; goto ADVANCED_ERROR; } @@ -2903,8 +2903,8 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) || $checked{'IKE_INTEGRITY'}{'aesxcbc'} =3D ''; @temp =3D split('\|', $cgiparams{'IKE_INTEGRITY'}); foreach my $key (@temp) {$checked{'IKE_INTEGRITY'}{$key} =3D "selected=3D's= elected'"; } - $checked{'IKE_GROUPTYPE'}{'curve25519'} =3D ''; $checked{'IKE_GROUPTYPE'}{'curve448'} =3D ''; + $checked{'IKE_GROUPTYPE'}{'curve25519'} =3D ''; $checked{'IKE_GROUPTYPE'}{'768'} =3D ''; $checked{'IKE_GROUPTYPE'}{'1024'} =3D ''; $checked{'IKE_GROUPTYPE'}{'1536'} =3D ''; @@ -2943,8 +2943,8 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) || $checked{'ESP_INTEGRITY'}{'aesxcbc'} =3D ''; @temp =3D split('\|', $cgiparams{'ESP_INTEGRITY'}); foreach my $key (@temp) {$checked{'ESP_INTEGRITY'}{$key} =3D "selected=3D's= elected'"; } - $checked{'ESP_GROUPTYPE'}{'curve25519'} =3D ''; $checked{'ESP_GROUPTYPE'}{'curve448'} =3D ''; + $checked{'ESP_GROUPTYPE'}{'curve25519'} =3D ''; $checked{'ESP_GROUPTYPE'}{'768'} =3D ''; $checked{'ESP_GROUPTYPE'}{'1024'} =3D ''; $checked{'ESP_GROUPTYPE'}{'1536'} =3D ''; @@ -3108,8 +3108,8 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) || $Lang::tr{'grouptype'} - + @@ -3705,7 +3705,7 @@ sub make_algos($$$$$) { =20 if ($grp =3D~ m/^e(.*)$/) { push(@algo, "ecp$1"); - } elsif ($grp =3D~ m/curve(25519|448)/) { + } elsif ($grp =3D~ m/curve(448|25519)/) { push(@algo, "$grp"); } else { push(@algo, "modp$grp"); @@ -3722,7 +3722,7 @@ sub make_algos($$$$$) { # noop } elsif ($grp =3D~ m/^e(.*)$/) { push(@algo, "ecp$1"); - } elsif ($grp =3D~ m/curve(25519|448)/) { + } elsif ($grp =3D~ m/curve(448|25519)/) { push(@algo, "$grp"); } else { push(@algo, "modp$grp"); --=20 2.31.0 --===============3945039342516008799==--