apple / HomeKitADK

Apache License 2.0
2.55k stars 232 forks source link

PAL/Crypto/MbedTLS: Use mbedtls_mpi constants #113

Closed rojer closed 2 years ago

rojer commented 3 years ago

Use constants N, g, N^g and hash of N.g. This saves some cycles at runtime as well as peak stack and memory usage during pair setup.

Assumes little-endian targets but works for 32-bit and 64-bit word sizes.