Skip to content

Commit

Permalink
drivers: caam: Update comments in ECC driver
Browse files Browse the repository at this point in the history
There were some typos in comments in the code, updated them

Signed-off-by: Sahil Malhotra <[email protected]>
  • Loading branch information
sahilnxp authored and jforissier committed Nov 5, 2024
1 parent e64a551 commit 7e29b82
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/drivers/crypto/caam/acipher/caam_ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static enum caam_status do_keypub_conv(struct caam_ecc_keypair *outkey,

/*
* Convert Crypto ECC Key to local ECC Keypair Key
* Don't convert the exponent e not used in decrytion
* Don't convert the exponent e not used in decryption
*
* @outkey [out] Output keypair in local format
* @inkey Input key in TEE Crypto format
Expand Down Expand Up @@ -142,6 +142,7 @@ static enum caam_ecc_curve get_caam_curve(uint32_t tee_curve)
* Allocate a ECC keypair
*
* @key Keypair
* @type Type of ECC key
* @size_bits Key size in bits
*/
static TEE_Result do_allocate_keypair(struct ecc_keypair *key,
Expand Down Expand Up @@ -192,6 +193,7 @@ static TEE_Result do_allocate_keypair(struct ecc_keypair *key,
* Allocate an ECC Public Key
*
* @key Public Key
* @type Type of ECC key
* @size_bits Key size in bits
*/
static TEE_Result do_allocate_publickey(struct ecc_public_key *key,
Expand Down Expand Up @@ -299,7 +301,7 @@ static TEE_Result do_gen_keypair(struct ecc_keypair *key, size_t key_size)
goto out;
}

/* Build the descriptor using Predifined ECC curve */
/* Build the descriptor using Predefined ECC curve */
caam_desc_init(desc);
caam_desc_add_word(desc, DESC_HEADER(0));
caam_desc_add_word(desc, PDB_PKGEN_PD1 | PDB_ECC_ECDSEL(curve));
Expand Down Expand Up @@ -527,7 +529,7 @@ static TEE_Result do_sign(struct drvcrypt_sign_data *sdata)

caam_dmaobj_cache_push(&sign_c);

/* Build the descriptor using Predifined ECC curve */
/* Build the descriptor using Predefined ECC curve */
caam_desc_init(desc);
caam_desc_add_word(desc, DESC_HEADER(0));
caam_desc_add_word(desc, PDB_PKSIGN_PD1 | PDB_ECC_ECDSEL(curve) |
Expand Down Expand Up @@ -710,7 +712,7 @@ static TEE_Result do_verify(struct drvcrypt_sign_data *sdata)
goto out;
}

/* Build the descriptor using Predifined ECC curve */
/* Build the descriptor using Predefined ECC curve */
caam_desc_init(desc);
caam_desc_add_word(desc, DESC_HEADER(0));
caam_desc_add_word(desc, PDB_PKVERIFY_PD1 | PDB_ECC_ECDSEL(curve) |
Expand Down Expand Up @@ -830,7 +832,7 @@ static TEE_Result do_shared_secret(struct drvcrypt_secret_data *sdata)

caam_dmaobj_cache_push(&secret);

/* Build the descriptor using Predifined ECC curve */
/* Build the descriptor using Predefined ECC curve */
caam_desc_init(desc);
caam_desc_add_word(desc, DESC_HEADER(0));
caam_desc_add_word(desc, PDB_SHARED_SECRET_PD1 | PDB_ECC_ECDSEL(curve) |
Expand Down

0 comments on commit 7e29b82

Please sign in to comment.