066-0006-dragonfly-Disable-use-of-groups-using-Brainpool-curv.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 558518ed63202e5358116ab7e0afd5e85490f2ef Mon Sep 17 00:00:00 2001
  2. From: Jouni Malinen <[email protected]>
  3. Date: Sat, 27 Jul 2019 23:19:17 +0300
  4. Subject: [PATCH 6/6] dragonfly: Disable use of groups using Brainpool curves
  5. Disable groups that use Brainpool curves for now since they leak more
  6. timing information due to the prime not being close to a power of two.
  7. This removes use of groups 28, 29, and 30 from SAE and EAP-pwd.
  8. Signed-off-by: Jouni Malinen <[email protected]>
  9. (cherry picked from commit 876c5eaa6dae1a87a17603fc489a44c29eedc2e3)
  10. ---
  11. src/common/sae.c | 6 ++++--
  12. src/eap_common/eap_pwd_common.c | 3 +--
  13. 2 files changed, 5 insertions(+), 4 deletions(-)
  14. --- a/src/common/sae.c
  15. +++ b/src/common/sae.c
  16. @@ -28,9 +28,11 @@ static int sae_suitable_group(int group)
  17. * purposes: FFC groups whose prime is >= 3072 bits and ECC groups
  18. * defined over a prime field whose prime is >= 256 bits. Furthermore,
  19. * ECC groups defined over a characteristic 2 finite field and ECC
  20. - * groups with a co-factor greater than 1 are not suitable. */
  21. + * groups with a co-factor greater than 1 are not suitable. Disable
  22. + * groups that use Brainpool curves as well for now since they leak more
  23. + * timing information due to the prime not being close to a power of
  24. + * two. */
  25. return group == 19 || group == 20 || group == 21 ||
  26. - group == 28 || group == 29 || group == 30 ||
  27. group == 15 || group == 16 || group == 17 || group == 18;
  28. #endif /* CONFIG_TESTING_OPTIONS */
  29. }
  30. --- a/src/eap_common/eap_pwd_common.c
  31. +++ b/src/eap_common/eap_pwd_common.c
  32. @@ -89,8 +89,7 @@ static int eap_pwd_suitable_group(u16 nu
  33. {
  34. /* Do not allow ECC groups with prime under 256 bits based on guidance
  35. * for the similar design in SAE. */
  36. - return num == 19 || num == 20 || num == 21 ||
  37. - num == 28 || num == 29 || num == 30;
  38. + return num == 19 || num == 20 || num == 21;
  39. }