mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-15 06:26:49 +00:00
wpa_supplicant: Adding SAE modules with testcase
This change ports SAE(Simultaneous Authentication of Equals) feature from wpa_supplicant and makes it work with mbedtls crypto APIs. Currently only group 19 is supported. A sample SAE handshake is included in the testcase. Other minor changes for DH groups are also included.
This commit is contained in:
@@ -25,10 +25,6 @@
|
||||
#include "mbedtls/entropy.h"
|
||||
#include "mbedtls/ctr_drbg.h"
|
||||
|
||||
|
||||
|
||||
#define IANA_SECP256R1 19
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
int crypto_get_random(void *buf, size_t len)
|
||||
{
|
||||
@@ -496,6 +492,8 @@ int crypto_ec_point_solve_y_coord(struct crypto_ec *e,
|
||||
if (y_bit) {
|
||||
MBEDTLS_MPI_CHK(mbedtls_mpi_sub_mpi(y, &e->group.P, y));
|
||||
}
|
||||
MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&((mbedtls_ecp_point* )p)->X, (const mbedtls_mpi*) x));
|
||||
MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&((mbedtls_ecp_point *)p)->Z, 1));
|
||||
} else {
|
||||
ret = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user