Correct misspellings and typos from codespell tool

This commit is contained in:
Eric Blankenhorn
2019-12-24 12:29:33 -06:00
parent 3f13b49fa3
commit b83804cb9d
111 changed files with 489 additions and 491 deletions
+3 -3
View File
@@ -332,11 +332,11 @@ int esp_mp_mulmod(fp_int* X, fp_int* Y, fp_int* M, fp_int* Z)
}
/* calculate r_inv = R^2 mode M
* where: R = b^n, and b = 2^32
* accordinalry R^2 = 2^(n*32*2)
* accordingly R^2 = 2^(n*32*2)
*/
ret = mp_init_multi(&tmpZ, &r_inv, NULL, NULL, NULL, NULL);
if(ret == 0 && (ret = esp_get_rinv(&r_inv, M, (hwWords_sz<<6))) != MP_OKAY) {
ESP_LOGE(TAG, "calcurate r_inv failed.");
ESP_LOGE(TAG, "calculate r_inv failed.");
mp_clear(&tmpZ);
mp_clear(&r_inv);
return ret;
@@ -407,7 +407,7 @@ int esp_mp_mulmod(fp_int* X, fp_int* Y, fp_int* M, fp_int* Z)
esp_mp_hw_unlock();
/* additional steps */
/* this needs for known issue when Z is greather than M */
/* this needs for known issue when Z is greater than M */
if(mp_cmp(&tmpZ, M)==FP_GT) {
/* Z -= M */
mp_sub(&tmpZ, M, &tmpZ);
+2 -2
View File
@@ -61,14 +61,14 @@ SHA 12 MB took 1.001 seconds, 11.515 MB/s
SHA-256 13 MB took 1.001 seconds, 12.900 MB/s
```
*TLS establishment time with TLS-linked capability*
*Performe full TlS-linked capability*
*Perform full TlS-linked capability*
```
TLS_RSA_WITH_AES_128_CBC_SHA : 0.141 (s)
TLS_RSA_WITH_AES_128_CBC_SHA256 : 0.141 (s)
TLS_RSA_WITH_AES_256_CBC_SHA : 0.141 (s)
TLS_RSA_WITH_AES_256_CBAC_SHA256 : 0.144 (s)
```
*Performe certificate verification by TSIP TLS-linked API*
*Perform certificate verification by TSIP TLS-linked API*
```
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 : 1.721 (s)
```
@@ -149,7 +149,7 @@ byte tsip_checkCA(word32 cmIdx)
return (cmIdx == g_CAscm_Idx? 1:0);
}
/* check if tht root CA has been verified by TSIP, *
/* check if the root CA has been verified by TSIP, *
* and it exists in the CM table. */
byte tsip_rootCAverified( )
{
@@ -423,7 +423,7 @@ int tsip_generateSeesionKey(struct WOLFSSL *ssl)
if (ret != TSIP_SUCCESS) {
WOLFSSL_MSG("R_TSIP_TlsGenerateSessionKey failed\n");
} else {
/* successed creating session keys */
/* succeeded creating session keys */
/* alloc aes instance for both enc and dec */
enc = &ssl->encrypt;
dec = &ssl->decrypt;
@@ -536,7 +536,7 @@ int tsip_generatePremasterSecret(byte *premaster, word32 preSz )
return ret;
}
/* generate encrpted pre-Master secrete by TSIP */
/* generate encrypted pre-Master secrete by TSIP */
int tsip_generateEncryptPreMasterSecret(WOLFSSL *ssl, byte *out, word32 *outSz)
{
int ret;
@@ -634,16 +634,16 @@ int tsip_tls_RootCertVerify(const byte *cert, word32 cert_len,
ret = R_TSIP_TlsRootCertificateVerification(
/* CA cert */
(uint8_t*)cert,
/* lenght of CA cert */
/* length of CA cert */
(uint32_t)cert_len,
/* Byte position of pubic key */
/* Byte position of public key */
key_n_start,
(key_n_start + key_n_len),
key_e_start,
(key_e_start + key_e_len),
/* signature by "RSA 2048 PSS with SHA256" */
(uint8_t*)ca_cert_sig,
/* RSA-2048 public kye used by
/* RSA-2048 public key used by
RSA-2048 PSS with SHA256. 560 Bytes*/
g_encrypted_publicCA_key
);
+1 -1
View File
@@ -211,7 +211,7 @@ static WC_INLINE void wc_Chacha_encrypt_320(const word32* input, const byte* m,
* these registers are later transposed make ADDing the input and XORing the message easier.
* v16-v19: these are helper registers that are used as temporary location to store data
* v20-v23: load the next message block
* v24-v27: the 64 byte intial Chacha block
* v24-v27: the 64 byte initial Chacha block
* v28: vector to increment the counter words of each block
* v29: vector of 5's to increment counters between L_chacha20_arm64_outer_%= loops
* v30: table lookup indices to rotate values by 8
+7 -7
View File
@@ -92,7 +92,7 @@ static WC_INLINE void AddLength(wc_Sha256* sha256, word32 len)
#ifdef __aarch64__
/* ARMv8 hardware accleration */
/* ARMv8 hardware acceleration */
static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 len)
{
word32 add;
@@ -266,7 +266,7 @@ static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 le
"#check if more blocks should be done\n"
"CBZ w8, 2f \n"
"#load in message and schedual updates \n"
"#load in message and schedule updates \n"
"LD1 {v0.2d-v3.2d}, [%[dataIn]], #64 \n"
"MOV v14.16b, v12.16b \n"
"MOV v15.16b, v13.16b \n"
@@ -298,7 +298,7 @@ static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 le
}
}
/* account for possiblity of not used if len = 0 */
/* account for possibility of not used if len = 0 */
(void)add;
(void)numBlocks;
@@ -498,7 +498,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
sizeof(word32));
__asm__ volatile (
"#load in message and schedual updates \n"
"#load in message and schedule updates \n"
"LD1 {v4.2d-v7.2d}, %[buffer] \n"
"MOV v0.16b, v4.16b \n"
"MOV v1.16b, v5.16b \n"
@@ -654,7 +654,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
#else /* not using 64 bit */
/* ARMv8 hardware accleration Aarch32 */
/* ARMv8 hardware acceleration Aarch32 */
static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 len)
{
word32 add;
@@ -838,7 +838,7 @@ static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 le
"CMP r8, #0 \n"
"BEQ 2f \n"
"#load in message and schedual updates \n"
"#load in message and schedule updates \n"
"VLD1.32 {q0}, [%[dataIn]]! \n"
"VLD1.32 {q1}, [%[dataIn]]! \n"
"VLD1.32 {q2}, [%[dataIn]]! \n"
@@ -874,7 +874,7 @@ static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 le
}
}
/* account for possiblity of not used if len = 0 */
/* account for possibility of not used if len = 0 */
(void)add;
(void)numBlocks;
+4 -4
View File
@@ -62,7 +62,7 @@ struct DescStruct {
struct CAAM_DEVICE* caam;
struct buffer buf[MAX_BUF]; /* buffers holding data input address */
UINT4 desc[MAX_DESC_SZ]; /* max size of 64 word32 */
UINT4 aadSzBuf[4]; /* Formated AAD size for CCM */
UINT4 aadSzBuf[4]; /* Formatted AAD size for CCM */
UINT4 alignBuf[ALIGN_BUF]; /* 64 byte buffer for non page
align */
UINT4 iv[MAX_CTX]; /* AES IV and also hash state */
@@ -1043,7 +1043,7 @@ static Error caamAead(struct DescStruct* desc)
/********* handle AAD -- is only done with Init **********************/
if ((state & CAAM_ALG_INIT) == CAAM_ALG_INIT) {
if ((desc->type == CAAM_AESCCM) && (desc->aadSz > 0)) {
/* set formated AAD buffer size for CCM */
/* set formatted AAD buffer size for CCM */
ASP_FlushCaches((Address)desc->aadSzBuf, sizeof(desc->aadSzBuf));
desc->desc[desc->idx++] = CAAM_FIFO_L | CAAM_CLASS1 |
FIFOL_TYPE_AAD + desc->aadSz;
@@ -1561,7 +1561,7 @@ static Error caamTransferFinish(IODeviceVector ioCaam, IORequest req)
/******************************************************************************
IODevice Interupt and Init
IODevice Interrupt and Init
****************************************************************************/
static Error caamTransferWrite(IODeviceVector ioCaam,
@@ -1670,7 +1670,7 @@ void InitCAAM(void)
/* set up job ring */
/* @TODO create partition in physical memory for job rings
current partion security is set to the default */
current partition security is set to the default */
for (i = 1; i < CAAM_PAGE_MAX; i++) {
ret = caamCreatePartition(i, i);
if (ret == 0) {
@@ -31,7 +31,7 @@
/* Setting NO_MAIN_DRIVER here because this file ends up building
* in the library sources which doesn't have NO_MAIN_DRIVER set,
* as the library expects main to be somehwere else. */
* as the library expects main to be somewhere else. */
#undef NO_MAIN_DRIVER
#define NO_MAIN_DRIVER
@@ -82,7 +82,7 @@ static int HashUpdate(void* ctx, int type, const byte* input, word32 inputSz)
}
if ((dev = GetHashContext(ctx, type)) == NULL) {
WOLFSSL_MSG("Unsuported hash type");
WOLFSSL_MSG("Unsupported hash type");
return BAD_FUNC_ARG;
}
@@ -103,7 +103,7 @@ static int GetDigest(void* ctx, int type, byte* out)
struct crypt_op crt;
if ((dev = GetHashContext(ctx, type)) == NULL) {
WOLFSSL_MSG("Unsuported hash type");
WOLFSSL_MSG("Unsupported hash type");
return BAD_FUNC_ARG;
}
+1 -1
View File
@@ -909,7 +909,7 @@ status_t LTC_PKHA_Prime25519SquareRootMod(const uint8_t *A, size_t sizeA,
}
/* I = I - 1 */
XMEMSET(VV, 0xff, sizeof(VV)); /* just temp for maximum integer - for non-modular substract */
XMEMSET(VV, 0xff, sizeof(VV)); /* just temp for maximum integer - for non-modular subtract */
if (0 <= LTC_PKHA_CompareBigNum(I, szI, &one, sizeof(one))) {
if (status == kStatus_Success) {
status = LTC_PKHA_ModSub1(LTC_BASE, I, szI, &one, sizeof(one),
+1 -1
View File
@@ -619,7 +619,7 @@ static void wc_Pic32HashFree(hashUpdCache* cache, void* heap)
}
}
/* API's for compatability with Harmony wrappers - not used */
/* API's for compatibility with Harmony wrappers - not used */
#ifndef NO_MD5
int wc_InitMd5_ex(wc_Md5* md5, void* heap, int devId)
{