mirror of https://github.com/wolfSSL/wolfssl.git
Fix some spelling
parent
57acf721d4
commit
631eafacb8
|
@ -16,5 +16,5 @@ jobs:
|
||||||
with:
|
with:
|
||||||
check_filenames: true
|
check_filenames: true
|
||||||
check_hidden: true
|
check_hidden: true
|
||||||
# Add comma separated list of words to ignore
|
# Add comma separated list of words to ignore (sorted alphabetically, case sensitive)
|
||||||
ignore_words_list:
|
ignore_words_list: adin,ADn,aNULL,carryIn,cconfiguration,ciph,cLen,cliKs,ede,Fo,haveA,larg,LEAPYEAR,inCreated,parm,parms,rIn,ser,siz,Te,te,TOOM,vie
|
||||||
|
|
|
@ -76,7 +76,7 @@ Public domain.
|
||||||
/* implementation is located in wolfcrypt/src/port/arm/armv8-chacha.c */
|
/* implementation is located in wolfcrypt/src/port/arm/armv8-chacha.c */
|
||||||
|
|
||||||
#elif defined(WOLFSSL_RISCV_ASM)
|
#elif defined(WOLFSSL_RISCV_ASM)
|
||||||
/* implementation located in wolfcrypt/src/port/rsicv/riscv-64-chacha.c */
|
/* implementation located in wolfcrypt/src/port/riscv/riscv-64-chacha.c */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -3172,7 +3172,7 @@ int esp_mp_exptmod(MATH_INT_T* X, MATH_INT_T* Y, MATH_INT_T* M, MATH_INT_T* Z)
|
||||||
|
|
||||||
#endif /* !NO_RSA || HAVE_ECC */
|
#endif /* !NO_RSA || HAVE_ECC */
|
||||||
|
|
||||||
/* Some optional metrics when using RSA HW Accleration */
|
/* Some optional metrics when using RSA HW Acceleration */
|
||||||
#if defined(WOLFSSL_ESP32_CRYPT_RSA_PRI) && defined(WOLFSSL_HW_METRICS)
|
#if defined(WOLFSSL_ESP32_CRYPT_RSA_PRI) && defined(WOLFSSL_HW_METRICS)
|
||||||
int esp_hw_show_mp_metrics(void)
|
int esp_hw_show_mp_metrics(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -100,7 +100,7 @@ int esp_CryptHwMutexInit(wolfSSL_Mutex* mutex) {
|
||||||
/*
|
/*
|
||||||
* Call the ESP-IDF mutex lock; xSemaphoreTake
|
* Call the ESP-IDF mutex lock; xSemaphoreTake
|
||||||
* this is a general mutex locker, used for different mutex objects for
|
* this is a general mutex locker, used for different mutex objects for
|
||||||
* different HW acclerators or other single-use HW features.
|
* different HW accelerators or other single-use HW features.
|
||||||
*
|
*
|
||||||
* We should already have known if the resource is in use or not.
|
* We should already have known if the resource is in use or not.
|
||||||
*
|
*
|
||||||
|
@ -988,7 +988,7 @@ int hexToBinary(byte* toVar, const char* fromHexString, size_t szHexString ) {
|
||||||
sscanf(&fromHexString[i], "%2x", &decimalValue);
|
sscanf(&fromHexString[i], "%2x", &decimalValue);
|
||||||
size_t index = i / 2;
|
size_t index = i / 2;
|
||||||
#if (0)
|
#if (0)
|
||||||
/* Optionall peek at new values */
|
/* Optionally peek at new values */
|
||||||
byte new_val = (decimalValue & 0x0F) << ((i % 2) * 4);
|
byte new_val = (decimalValue & 0x0F) << ((i % 2) * 4);
|
||||||
ESP_LOGI("hex", "Current char = %d", toVar[index]);
|
ESP_LOGI("hex", "Current char = %d", toVar[index]);
|
||||||
ESP_LOGI("hex", "New val = %d", decimalValue);
|
ESP_LOGI("hex", "New val = %d", decimalValue);
|
||||||
|
|
|
@ -1031,7 +1031,7 @@ int wc_MXC_MAA_init(unsigned int len)
|
||||||
return wc_MXC_error(&status); /* Return Status of Init */
|
return wc_MXC_error(&status); /* Return Status of Init */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unlocks mutex and preforms graceful shutdown of hardware */
|
/* Unlocks mutex and performs graceful shutdown of hardware */
|
||||||
int wc_MXC_MAA_Shutdown(void)
|
int wc_MXC_MAA_Shutdown(void)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
@ -1120,7 +1120,7 @@ int wc_MXC_MAA_zeroPad(mp_int* multiplier, mp_int* multiplicand,
|
||||||
}
|
}
|
||||||
XMEMSET(zero_tmp, 0x00, multiplier->size*sizeof(mp_digit));
|
XMEMSET(zero_tmp, 0x00, multiplier->size*sizeof(mp_digit));
|
||||||
|
|
||||||
/* Check for invalid arguments befor padding */
|
/* Check for invalid arguments before padding */
|
||||||
switch ((char)clc) {
|
switch ((char)clc) {
|
||||||
case MXC_TPU_MAA_EXP:
|
case MXC_TPU_MAA_EXP:
|
||||||
/* Cannot be 0 for a^e mod m operation */
|
/* Cannot be 0 for a^e mod m operation */
|
||||||
|
@ -1446,8 +1446,8 @@ int hw_exptmod(mp_int* base, mp_int* exp, mp_int* mod, mp_int* result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* No mod function available with hardware, however preform a submod */
|
/* No mod function available with hardware, however perform a submod */
|
||||||
/* (a - 0) mod m will essentially preform the same operation as a mod m */
|
/* (a - 0) mod m will essentially perform the same operation as a mod m */
|
||||||
int hw_mod(mp_int* a, mp_int* mod, mp_int* result)
|
int hw_mod(mp_int* a, mp_int* mod, mp_int* result)
|
||||||
{
|
{
|
||||||
mp_int b;
|
mp_int b;
|
||||||
|
|
|
@ -1390,10 +1390,10 @@ static void sp_256_mont_inv_10(sp_digit* r, const sp_digit* a, sp_digit* td)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Map the Montgomery form projective co-ordinate point to an affine point.
|
/* Map the Montgomery form projective coordinate point to an affine point.
|
||||||
*
|
*
|
||||||
* r Resulting affine co-ordinate point.
|
* r Resulting affine coordinate point.
|
||||||
* p Montgomery form projective co-ordinate point.
|
* p Montgomery form projective coordinate point.
|
||||||
* t Temporary ordinate data.
|
* t Temporary ordinate data.
|
||||||
*/
|
*/
|
||||||
static void sp_256_map_10(sp_point* r, const sp_point* p, sp_digit* t)
|
static void sp_256_map_10(sp_point* r, const sp_point* p, sp_digit* t)
|
||||||
|
@ -1910,7 +1910,7 @@ static void sp_256_proj_point_add_10(sp_point* r, const sp_point* p, const sp_po
|
||||||
|
|
||||||
#ifdef WOLFSSL_SP_SMALL
|
#ifdef WOLFSSL_SP_SMALL
|
||||||
/* Multiply the point by the scalar and return the result.
|
/* Multiply the point by the scalar and return the result.
|
||||||
* If map is true then convert result to affine co-ordinates.
|
* If map is true then convert result to affine coordinates.
|
||||||
*
|
*
|
||||||
* r Resulting point.
|
* r Resulting point.
|
||||||
* g Point to multiply.
|
* g Point to multiply.
|
||||||
|
@ -2006,7 +2006,7 @@ static int sp_256_ecc_mulmod_10(sp_point* r, const sp_point* g, const sp_digit*
|
||||||
|
|
||||||
#elif !defined(WC_NO_CACHE_RESISTANT)
|
#elif !defined(WC_NO_CACHE_RESISTANT)
|
||||||
/* Multiply the point by the scalar and return the result.
|
/* Multiply the point by the scalar and return the result.
|
||||||
* If map is true then convert result to affine co-ordinates.
|
* If map is true then convert result to affine coordinates.
|
||||||
*
|
*
|
||||||
* r Resulting point.
|
* r Resulting point.
|
||||||
* g Point to multiply.
|
* g Point to multiply.
|
||||||
|
@ -2119,7 +2119,7 @@ typedef struct sp_table_entry {
|
||||||
} sp_table_entry;
|
} sp_table_entry;
|
||||||
|
|
||||||
/* Multiply the point by the scalar and return the result.
|
/* Multiply the point by the scalar and return the result.
|
||||||
* If map is true then convert result to affine co-ordinates.
|
* If map is true then convert result to affine coordinates.
|
||||||
*
|
*
|
||||||
* r Resulting point.
|
* r Resulting point.
|
||||||
* g Point to multiply.
|
* g Point to multiply.
|
||||||
|
@ -2517,7 +2517,7 @@ static int sp_256_gen_stripe_table_10(const sp_point* a,
|
||||||
|
|
||||||
#endif /* FP_ECC */
|
#endif /* FP_ECC */
|
||||||
/* Multiply the point by the scalar and return the result.
|
/* Multiply the point by the scalar and return the result.
|
||||||
* If map is true then convert result to affine co-ordinates.
|
* If map is true then convert result to affine coordinates.
|
||||||
*
|
*
|
||||||
* r Resulting point.
|
* r Resulting point.
|
||||||
* k Scalar to multiply by.
|
* k Scalar to multiply by.
|
||||||
|
@ -2679,7 +2679,7 @@ static void sp_ecc_get_cache(const sp_point* g, sp_cache_t** cache)
|
||||||
#endif /* FP_ECC */
|
#endif /* FP_ECC */
|
||||||
|
|
||||||
/* Multiply the base point of P256 by the scalar and return the result.
|
/* Multiply the base point of P256 by the scalar and return the result.
|
||||||
* If map is true then convert result to affine co-ordinates.
|
* If map is true then convert result to affine coordinates.
|
||||||
*
|
*
|
||||||
* r Resulting point.
|
* r Resulting point.
|
||||||
* g Point to multiply.
|
* g Point to multiply.
|
||||||
|
@ -2735,7 +2735,7 @@ static int sp_256_ecc_mulmod_10(sp_point* r, const sp_point* g, const sp_digit*
|
||||||
|
|
||||||
#ifdef WOLFSSL_SP_SMALL
|
#ifdef WOLFSSL_SP_SMALL
|
||||||
/* Multiply the base point of P256 by the scalar and return the result.
|
/* Multiply the base point of P256 by the scalar and return the result.
|
||||||
* If map is true then convert result to affine co-ordinates.
|
* If map is true then convert result to affine coordinates.
|
||||||
*
|
*
|
||||||
* r Resulting point.
|
* r Resulting point.
|
||||||
* k Scalar to multiply by.
|
* k Scalar to multiply by.
|
||||||
|
@ -4033,7 +4033,7 @@ static const sp_table_entry p256_table[256] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Multiply the base point of P256 by the scalar and return the result.
|
/* Multiply the base point of P256 by the scalar and return the result.
|
||||||
* If map is true then convert result to affine co-ordinates.
|
* If map is true then convert result to affine coordinates.
|
||||||
*
|
*
|
||||||
* r Resulting point.
|
* r Resulting point.
|
||||||
* k Scalar to multiply by.
|
* k Scalar to multiply by.
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
* WOLFSSL_SMALL_STACK Default: OFF
|
* WOLFSSL_SMALL_STACK Default: OFF
|
||||||
* Use less stack by dynamically allocating local variables.
|
* Use less stack by dynamically allocating local variables.
|
||||||
*
|
*
|
||||||
* WOLFSSL_KYBER_NTT_UNROLL Defualt: OFF
|
* WOLFSSL_KYBER_NTT_UNROLL Default: OFF
|
||||||
* Enable an alternative NTT implementation that may be faster on some
|
* Enable an alternative NTT implementation that may be faster on some
|
||||||
* platforms and is smaller in code size.
|
* platforms and is smaller in code size.
|
||||||
* WOLFSSL_KYBER_INVNTT_UNROLL Default: OFF
|
* WOLFSSL_KYBER_INVNTT_UNROLL Default: OFF
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
/* WOLFSSL_USER_SETTINGS must be defined, typically in the CMakeLists.txt: */
|
/* WOLFSSL_USER_SETTINGS must be defined, typically in the CMakeLists.txt: */
|
||||||
/* set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS") */
|
/* set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS") */
|
||||||
#ifndef WOLFSSL_USER_SETTINGS
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
#error "WOLFSSL_USER_SETTINGS must be defined for Espressif targts"
|
#error "WOLFSSL_USER_SETTINGS must be defined for Espressif targets"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* FreeRTOS */
|
/* FreeRTOS */
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#if defined(WOLFSSL_ESPIDF) /* Entire file is only for Espressif EDP-IDF */
|
#if defined(WOLFSSL_ESPIDF) /* Entire file is only for Espressif EDP-IDF */
|
||||||
|
|
||||||
#ifndef WOLFSSL_USER_SETTINGS
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
#error "WOLFSSL_USER_SETTINGS must be defined for Espressif targts"
|
#error "WOLFSSL_USER_SETTINGS must be defined for Espressif targets"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sdkconfig.h" /* ensure ESP-IDF settings are available everywhere */
|
#include "sdkconfig.h" /* ensure ESP-IDF settings are available everywhere */
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
#if defined(WOLFSSL_ESPIDF) /* Entire file is only for Espressif EDP-IDF */
|
#if defined(WOLFSSL_ESPIDF) /* Entire file is only for Espressif EDP-IDF */
|
||||||
|
|
||||||
#ifndef WOLFSSL_USER_SETTINGS
|
#ifndef WOLFSSL_USER_SETTINGS
|
||||||
#error "WOLFSSL_USER_SETTINGS must be defined for Espressif targts"
|
#error "WOLFSSL_USER_SETTINGS must be defined for Espressif targets"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_ESP_TLS_USING_WOLFSSL) || \
|
#if defined(CONFIG_ESP_TLS_USING_WOLFSSL) || \
|
||||||
|
|
|
@ -232,15 +232,15 @@
|
||||||
/* Store 8 Vector register. */
|
/* Store 8 Vector register. */
|
||||||
#define VS8R_V(vs3, rs1) VSR_V(vs3, rs1, 8)
|
#define VS8R_V(vs3, rs1) VSR_V(vs3, rs1, 8)
|
||||||
|
|
||||||
/* Move from vector register to vector registor. */
|
/* Move from vector register to vector register. */
|
||||||
#define VMV_V_V(vd, vs1) \
|
#define VMV_V_V(vd, vs1) \
|
||||||
ASM_WORD((0b1010111 << 0) | (0b000 << 12) | (0b1 << 25) | \
|
ASM_WORD((0b1010111 << 0) | (0b000 << 12) | (0b1 << 25) | \
|
||||||
(0b010111 << 26) | ((vd) << 7) | ((vs1) << 15))
|
(0b010111 << 26) | ((vd) << 7) | ((vs1) << 15))
|
||||||
/* Splat register to each component of the vector registor. */
|
/* Splat register to each component of the vector register. */
|
||||||
#define VMV_V_X(vd, rs1) \
|
#define VMV_V_X(vd, rs1) \
|
||||||
ASM_WORD((0b1010111 << 0) | (0b100 << 12) | (0b1 << 25) | \
|
ASM_WORD((0b1010111 << 0) | (0b100 << 12) | (0b1 << 25) | \
|
||||||
(0b010111 << 26) | ((vd) << 7) | ((rs1) << 15))
|
(0b010111 << 26) | ((vd) << 7) | ((rs1) << 15))
|
||||||
/* Splat immediate to each component of the vector registor. */
|
/* Splat immediate to each component of the vector register. */
|
||||||
#define VMV_V_I(vd, imm) \
|
#define VMV_V_I(vd, imm) \
|
||||||
ASM_WORD((0b1010111 << 0) | (0b011 << 12) | (0b1 << 25) | \
|
ASM_WORD((0b1010111 << 0) | (0b011 << 12) | (0b1 << 25) | \
|
||||||
(0b010111 << 26) | ((vd) << 7) | ((imm) << 15))
|
(0b010111 << 26) | ((vd) << 7) | ((imm) << 15))
|
||||||
|
@ -403,19 +403,19 @@
|
||||||
* Vector Bit Manipulation
|
* Vector Bit Manipulation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Reverse order of bytes in words of vector regsiter. */
|
/* Reverse order of bytes in words of vector register. */
|
||||||
#define VREV8(vd, vs2) \
|
#define VREV8(vd, vs2) \
|
||||||
ASM_WORD((0b010010 << 26) | (0b1 << 25) | (0b01001<< 15) | \
|
ASM_WORD((0b010010 << 26) | (0b1 << 25) | (0b01001<< 15) | \
|
||||||
(0b010 << 12) | (0b1010111 << 0) | \
|
(0b010 << 12) | (0b1010111 << 0) | \
|
||||||
(vs2 << 20) | (vd << 7))
|
(vs2 << 20) | (vd << 7))
|
||||||
|
|
||||||
/* Rotate left bits of vector regsiter. */
|
/* Rotate left bits of vector register. */
|
||||||
#define VROL_VX(vd, vs2, rs) \
|
#define VROL_VX(vd, vs2, rs) \
|
||||||
ASM_WORD((0b010101 << 26) | (0b1 << 25) | (0b100 << 12) | \
|
ASM_WORD((0b010101 << 26) | (0b1 << 25) | (0b100 << 12) | \
|
||||||
(0b1010111 << 0) | \
|
(0b1010111 << 0) | \
|
||||||
(vs2 << 20) | (rs << 15) | (vd << 7))
|
(vs2 << 20) | (rs << 15) | (vd << 7))
|
||||||
|
|
||||||
/* Rotate right bits of vector regsiter. */
|
/* Rotate right bits of vector register. */
|
||||||
#define VROR_VI(vd, imm, vs2) \
|
#define VROR_VI(vd, imm, vs2) \
|
||||||
ASM_WORD((0b01010 << 27) | (0b1 << 25) | (0b011 << 12) | \
|
ASM_WORD((0b01010 << 27) | (0b1 << 25) | (0b011 << 12) | \
|
||||||
(0b1010111 << 0) | ((imm >> 5) << 26) | \
|
(0b1010111 << 0) | ((imm >> 5) << 26) | \
|
||||||
|
|
Loading…
Reference in New Issue