Advertisement
Guest User

Untitled

a guest
Aug 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. diff --git a/src/sae.c b/src/sae.c
  2. index 62729bd..7e9ad25 100644
  3. --- a/src/sae.c
  4. +++ b/src/sae.c
  5. @@ -266,7 +266,9 @@ static bool sae_compute_pwe(char *password, const uint8_t *addr1,
  6.  
  7. /* create qr/qnr prior to beginning hunting-and-pecking loop */
  8. sae_get_qr(qr);
  9. + l_debug("after qr\n");
  10. sae_get_qnr(qnr);
  11. + l_debug("after qnr\n");
  12.  
  13. do {
  14. /* pwd-seed = H(max(addr1, addr2) || min(addr1, addr2),
  15. @@ -274,15 +276,19 @@ static bool sae_compute_pwe(char *password, const uint8_t *addr1,
  16. * pwd-value = KDF-256(pwd-seed, "SAE Hunting and Pecking", p)
  17. */
  18. sae_pwd_seed(addr1, addr2, base, base_len, counter, pwd_seed);
  19. + l_debug("seed\n");
  20.  
  21. sae_pwd_value(pwd_seed, pwd_value);
  22. + l_debug("value\n");
  23.  
  24. ecc_be2native(pwd_value);
  25.  
  26. /* if (pwd-value < p) { */
  27. if (vli_cmp(pwd_value, curve_p) < 0) {
  28. if (sae_is_quadratic_residue(pwd_value, qr, qnr)) {
  29. + l_debug("is residue\n");
  30. if (found == false) {
  31. + l_debug("found\n");
  32. memcpy(pwe->x, pwd_value, 32);
  33. memcpy(save, pwd_seed, 32);
  34.  
  35. @@ -294,6 +300,7 @@ static bool sae_compute_pwe(char *password, const uint8_t *addr1,
  36. }
  37. }
  38. }
  39. + l_debug("inc\n");
  40.  
  41. counter++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement