diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index ae863f754..d99b3084a 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -16,5 +16,5 @@ jobs: with: check_filenames: true check_hidden: true - # Add comma separated list of words to ignore - ignore_words_list: + # Add comma separated list of words to ignore (sorted alphabetically, case sensitive) + 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 diff --git a/wolfcrypt/src/chacha.c b/wolfcrypt/src/chacha.c index 84b26eb56..ba9aa538f 100644 --- a/wolfcrypt/src/chacha.c +++ b/wolfcrypt/src/chacha.c @@ -76,7 +76,7 @@ Public domain. /* implementation is located in wolfcrypt/src/port/arm/armv8-chacha.c */ #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 diff --git a/wolfcrypt/src/port/Espressif/esp32_mp.c b/wolfcrypt/src/port/Espressif/esp32_mp.c index 458719d3e..6d9d2abb8 100644 --- a/wolfcrypt/src/port/Espressif/esp32_mp.c +++ b/wolfcrypt/src/port/Espressif/esp32_mp.c @@ -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 */ -/* 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) int esp_hw_show_mp_metrics(void) { diff --git a/wolfcrypt/src/port/Espressif/esp32_util.c b/wolfcrypt/src/port/Espressif/esp32_util.c index d5d77edde..f13387529 100644 --- a/wolfcrypt/src/port/Espressif/esp32_util.c +++ b/wolfcrypt/src/port/Espressif/esp32_util.c @@ -100,7 +100,7 @@ int esp_CryptHwMutexInit(wolfSSL_Mutex* mutex) { /* * Call the ESP-IDF mutex lock; xSemaphoreTake * 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. * @@ -988,7 +988,7 @@ int hexToBinary(byte* toVar, const char* fromHexString, size_t szHexString ) { sscanf(&fromHexString[i], "%2x", &decimalValue); size_t index = i / 2; #if (0) - /* Optionall peek at new values */ + /* Optionally peek at new values */ byte new_val = (decimalValue & 0x0F) << ((i % 2) * 4); ESP_LOGI("hex", "Current char = %d", toVar[index]); ESP_LOGI("hex", "New val = %d", decimalValue); diff --git a/wolfcrypt/src/port/maxim/max3266x.c b/wolfcrypt/src/port/maxim/max3266x.c index b43ef6c90..77867b3f2 100644 --- a/wolfcrypt/src/port/maxim/max3266x.c +++ b/wolfcrypt/src/port/maxim/max3266x.c @@ -1031,7 +1031,7 @@ int wc_MXC_MAA_init(unsigned int len) 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 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)); - /* Check for invalid arguments befor padding */ + /* Check for invalid arguments before padding */ switch ((char)clc) { case MXC_TPU_MAA_EXP: /* 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 */ -/* (a - 0) mod m will essentially preform the same operation as a mod m */ +/* No mod function available with hardware, however perform a submod */ +/* (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) { mp_int b; diff --git a/wolfcrypt/src/sp_dsp32.c b/wolfcrypt/src/sp_dsp32.c index 8d8ee67a7..4c3bc9f3c 100644 --- a/wolfcrypt/src/sp_dsp32.c +++ b/wolfcrypt/src/sp_dsp32.c @@ -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. - * p Montgomery form projective co-ordinate point. + * r Resulting affine coordinate point. + * p Montgomery form projective coordinate point. * t Temporary ordinate data. */ 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 /* 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. * 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) /* 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. * g Point to multiply. @@ -2119,7 +2119,7 @@ typedef struct sp_table_entry { } sp_table_entry; /* 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. * g Point to multiply. @@ -2517,7 +2517,7 @@ static int sp_256_gen_stripe_table_10(const sp_point* a, #endif /* FP_ECC */ /* 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. * 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 */ /* 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. * 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 /* 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. * 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. - * If map is true then convert result to affine co-ordinates. + * If map is true then convert result to affine coordinates. * * r Resulting point. * k Scalar to multiply by. diff --git a/wolfcrypt/src/wc_kyber_poly.c b/wolfcrypt/src/wc_kyber_poly.c index 52c8af356..96b50bf05 100644 --- a/wolfcrypt/src/wc_kyber_poly.c +++ b/wolfcrypt/src/wc_kyber_poly.c @@ -49,7 +49,7 @@ * WOLFSSL_SMALL_STACK Default: OFF * 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 * platforms and is smaller in code size. * WOLFSSL_KYBER_INVNTT_UNROLL Default: OFF diff --git a/wolfssl/wolfcrypt/port/Espressif/esp-sdk-lib.h b/wolfssl/wolfcrypt/port/Espressif/esp-sdk-lib.h index 85b4ed121..de37936da 100644 --- a/wolfssl/wolfcrypt/port/Espressif/esp-sdk-lib.h +++ b/wolfssl/wolfcrypt/port/Espressif/esp-sdk-lib.h @@ -31,7 +31,7 @@ /* WOLFSSL_USER_SETTINGS must be defined, typically in the CMakeLists.txt: */ /* set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_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 /* FreeRTOS */ diff --git a/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h b/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h index 99d2ca20a..d49ef3e60 100644 --- a/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h +++ b/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h @@ -30,7 +30,7 @@ #if defined(WOLFSSL_ESPIDF) /* Entire file is only for Espressif EDP-IDF */ #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 #include "sdkconfig.h" /* ensure ESP-IDF settings are available everywhere */ diff --git a/wolfssl/wolfcrypt/port/Espressif/esp_crt_bundle.h b/wolfssl/wolfcrypt/port/Espressif/esp_crt_bundle.h index afeb3526b..6f6e20336 100644 --- a/wolfssl/wolfcrypt/port/Espressif/esp_crt_bundle.h +++ b/wolfssl/wolfcrypt/port/Espressif/esp_crt_bundle.h @@ -76,7 +76,7 @@ #if defined(WOLFSSL_ESPIDF) /* Entire file is only for Espressif EDP-IDF */ #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 #if defined(CONFIG_ESP_TLS_USING_WOLFSSL) || \ diff --git a/wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h b/wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h index 023448d5c..284fe4505 100644 --- a/wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h +++ b/wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h @@ -232,15 +232,15 @@ /* Store 8 Vector register. */ #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) \ ASM_WORD((0b1010111 << 0) | (0b000 << 12) | (0b1 << 25) | \ (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) \ ASM_WORD((0b1010111 << 0) | (0b100 << 12) | (0b1 << 25) | \ (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) \ ASM_WORD((0b1010111 << 0) | (0b011 << 12) | (0b1 << 25) | \ (0b010111 << 26) | ((vd) << 7) | ((imm) << 15)) @@ -403,19 +403,19 @@ * 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) \ ASM_WORD((0b010010 << 26) | (0b1 << 25) | (0b01001<< 15) | \ (0b010 << 12) | (0b1010111 << 0) | \ (vs2 << 20) | (vd << 7)) -/* Rotate left bits of vector regsiter. */ +/* Rotate left bits of vector register. */ #define VROL_VX(vd, vs2, rs) \ ASM_WORD((0b010101 << 26) | (0b1 << 25) | (0b100 << 12) | \ (0b1010111 << 0) | \ (vs2 << 20) | (rs << 15) | (vd << 7)) -/* Rotate right bits of vector regsiter. */ +/* Rotate right bits of vector register. */ #define VROR_VI(vd, imm, vs2) \ ASM_WORD((0b01010 << 27) | (0b1 << 25) | (0b011 << 12) | \ (0b1010111 << 0) | ((imm >> 5) << 26) | \