@@ -46,7 +46,7 @@ int wc_curve25519_make_key(WC_RNG* rng, int keysize, curve25519_key* key);
4646
4747 \brief This function computes a shared secret key given a secret private
4848 key and a received public key. It stores the generated secret key in the
49- buffer out and assigns the variable of the secret key to outlen. Only
49+ buffer out and assigns the length of the secret key to outlen. Only
5050 supports big endian.
5151
5252 \return 0 Returned on successfully computing a shared secret key.
@@ -93,7 +93,7 @@ int wc_curve25519_shared_secret(curve25519_key* private_key,
9393
9494 \brief This function computes a shared secret key given a secret private
9595 key and a received public key. It stores the generated secret key in the
96- buffer out and assigns the variable of the secret key to outlen. Supports
96+ buffer out and assigns the length of the secret key to outlen. Supports
9797 both big and little endian.
9898
9999 \return 0 Returned on successfully computing a shared secret key.
@@ -361,7 +361,7 @@ int wc_curve25519_import_private_raw_ex(const byte* priv, word32 privSz,
361361 \return 0 Returned on successfully exporting the private key from the
362362 curve25519_key structure.
363363 \return BAD_FUNC_ARG Returned if any input parameters are NULL.
364- \return ECC_BAD_ARG_E Returned if wc_curve25519_size() is not equal to key .
364+ \return ECC_BAD_ARG_E Returned if *outLen is less than wc_curve25519_size() .
365365
366366 \param [in] key Pointer to the structure from which to export the key.
367367 \param [out] out Pointer to the buffer in which to store the exported key.
@@ -372,7 +372,7 @@ int wc_curve25519_import_private_raw_ex(const byte* priv, word32 privSz,
372372 \code
373373 int ret;
374374 byte priv[32];
375- int privSz;
375+ word32 privSz;
376376
377377 curve25519_key key;
378378 // initialize and make key
@@ -402,7 +402,7 @@ int wc_curve25519_export_private_raw(curve25519_key* key, byte* out,
402402 \return 0 Returned on successfully exporting the private key from the
403403 curve25519_key structure.
404404 \return BAD_FUNC_ARG Returned if any input parameters are NULL.
405- \return ECC_BAD_ARG_E Returned if wc_curve25519_size() is not equal to key .
405+ \return ECC_BAD_ARG_E Returned if *outLen is less than wc_curve25519_size() .
406406
407407 \param [in] key Pointer to the structure from which to export the key.
408408 \param [out] out Pointer to the buffer in which to store the exported key.
@@ -416,7 +416,7 @@ int wc_curve25519_export_private_raw(curve25519_key* key, byte* out,
416416 int ret;
417417
418418 byte priv[32];
419- int privSz;
419+ word32 privSz;
420420 curve25519_key key;
421421 // initialize and make key
422422 ret = wc_curve25519_export_private_raw_ex(&key, priv, &privSz,
@@ -656,7 +656,7 @@ int wc_curve25519_export_public_ex(curve25519_key* key, byte* out,
656656 \return ECC_BAD_ARG_E Returned if privSz is less than CURVE25519_KEY_SIZE or
657657 pubSz is less than CURVE25519_PUB_KEY_SIZE.
658658
659- \param [in] key Pointer to the curve448_key structure in from which to
659+ \param [in] key Pointer to the curve25519_key structure in from which to
660660 export the key pair.
661661 \param [out] priv Pointer to the buffer in which to store the private key.
662662 \param [in,out] privSz On in, is the size of the priv buffer in bytes.
@@ -702,7 +702,7 @@ int wc_curve25519_export_key_raw(curve25519_key* key,
702702 \return ECC_BAD_ARG_E Returned if privSz is less than CURVE25519_KEY_SIZE or
703703 pubSz is less than CURVE25519_PUB_KEY_SIZE.
704704
705- \param [in] key Pointer to the curve448_key structure in from which to
705+ \param [in] key Pointer to the curve25519_key structure in from which to
706706 export the key pair.
707707 \param [out] priv Pointer to the buffer in which to store the private key.
708708 \param [in,out] privSz On in, is the size of the priv buffer in bytes.
@@ -725,7 +725,7 @@ int wc_curve25519_export_key_raw(curve25519_key* key,
725725 curve25519_key key;
726726 // initialize and make key
727727
728- ret = wc_curve25519_export_key_raw_ex(&key,priv, &privSz, pub, &pubSz,
728+ ret = wc_curve25519_export_key_raw_ex(&key, priv, &privSz, pub, &pubSz,
729729 EC25519_BIG_ENDIAN);
730730 if (ret != 0) {
731731 // error exporting key
0 commit comments