Skip to content

Commit

Permalink
Fix some spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Fekete committed Oct 4, 2024
1 parent bdd2b49 commit 24c8c3e
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion wolfcrypt/src/chacha.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/ge_448.c
Original file line number Diff line number Diff line change
Expand Up @@ -10602,7 +10602,7 @@ int ge448_scalarmult_base(ge448_p2* r, const byte* a)
e[112] = carry;
/* each e[i] is between -8 and 8 */

/* Odd indeces first - sum based on even index so multiply by 16 */
/* Odd indices first - sum based on even index so multiply by 16 */
ge448_select(t, 0, e[1]);
fe448_copy(r->X, t->x);
fe448_copy(r->Y, t->y);
Expand All @@ -10617,7 +10617,7 @@ int ge448_scalarmult_base(ge448_p2* r, const byte* a)
ge448_dbl(r, r);
ge448_dbl(r, r);

/* Add even indeces */
/* Add even indices */
for (i = 0; i <= 112; i += 2) {
ge448_select(t, i / 2, e[i]);
ge448_madd(r, r, t);
Expand All @@ -10633,7 +10633,7 @@ int ge448_scalarmult_base(ge448_p2* r, const byte* a)

/* Create to a sliding window for the scalar multiplicaton.
*
* r [in] Array of indeces.
* r [in] Array of indices.
* a [in] Scalar to break up.
*/
static void slide(sword8 *r, const byte *a)
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/port/Espressif/esp32_mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3168,7 +3168,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)
{
Expand Down
4 changes: 2 additions & 2 deletions wolfcrypt/src/port/Espressif/esp32_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions wolfcrypt/src/port/maxim/max3266x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions wolfcrypt/src/sp_dsp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/wc_kyber_poly.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion wolfssl/wolfcrypt/aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ struct Aes {
int alFd; /* server socket to bind to */
int rdFd; /* socket to read from */
struct msghdr msg;
int dir; /* flag for encrpyt or decrypt */
int dir; /* flag for encrypt or decrypt */
#ifdef WOLFSSL_AFALG_XILINX_AES
word32 msgBuf[CMSG_SPACE(4) + CMSG_SPACE(sizeof(struct af_alg_iv) +
GCM_NONCE_MID_SZ)];
Expand Down
2 changes: 1 addition & 1 deletion wolfssl/wolfcrypt/port/Espressif/esp-sdk-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
8 changes: 4 additions & 4 deletions wolfssl/wolfcrypt/port/Espressif/esp_crt_bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define __ESP_CRT_BUNDLE_wolfssl_LIB_H__

/* This file is typically NOT directly used by applications utilizing the
* wolfSSL libraries. It is used when the wolfssl libary component is configured
* wolfSSL libraries. It is used when the wolfssl library component is configured
* to be utilized by the Espressif ESP-IDF, specifically the esp-tls layer.
*
* See:
Expand Down Expand Up @@ -67,7 +67,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) || \
Expand Down Expand Up @@ -129,7 +129,7 @@ esp_err_t esp_crt_bundle_attach(void *conf);
esp_err_t esp_crt_bundle_is_valid(void);

/**
* @brief Return 1 if Cert Bundle loaded, otheriwse 0.
* @brief Return 1 if Cert Bundle loaded, otherwise 0.
*
* Specific to wolfSSL. Not used by ESP-IDF esp-tls layer.
*/
Expand Down Expand Up @@ -170,7 +170,7 @@ void esp_crt_bundle_detach(wolfssl_ssl_config *conf);
*
* @return
* - ESP_OK if adding certificates was successful.
* - Other if an error occured or an action must be taken
* - Other if an error occurred or an action must be taken
* by the calling process.
*/
esp_err_t esp_crt_bundle_set(const uint8_t *x509_bundle, size_t bundle_size);
Expand Down
12 changes: 6 additions & 6 deletions wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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) | \
Expand Down

0 comments on commit 24c8c3e

Please sign in to comment.