Merge pull request #6720 from TakayukiMatsuo/jp6506

Apdate Japanese API comments to match them in PR6506
This commit is contained in:
Hideki Miyazaki 2023-08-23 09:48:05 +09:00 committed by GitHub
commit 827287000c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4656 additions and 1142 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,21 @@
/*!
\ingroup CMAC
\brief Cmac
\return 0
\param cmac Cmac
\param
\param keySz (1624 32)
\param type WC_CMAC_AES = 1
\param 使 使使
\brief Cmac構造体をデフォルト値で初期化します
\return 0
\param cmac Cmac構造体へのポインタ
\param key
\param keySz (1624 32)
\param type WC_CMAC_AES=1
\param unused 使使
_例_
\code
Cmac cmac[1];
ret = wc_InitCmac(cmackeySzWC_CMAC_AESNULL);
(ret == 0) {
ret = wc_InitCmac(cmackeykeySzWC_CMAC_AESNULL);
if (ret == 0) {
ret = wc_CmacUpdate(cmacininSz);
}
(ret == 0) {
if (ret == 0) {
ret = wc_CmacFinal(cmac, out, outSz);
}
\endcode
@ -25,29 +25,29 @@
\sa wc_CmacFinal
*/
int wc_InitCmac(Cmac* cmac,
const byte* word32 keySz
int型void*使);
const byte* keyword32 keySz
int typevoid* unused);
/*!
\ingroup CMAC
\brief Cmac
\return 0
\param cmac Cmac
\param
\param keySz (1624 32)
\param type WC_CMAC_AES = 1
\param 使 使使
\param heap 使 使 NULL
\param devId 使 ID 使INVALID_DEVID
\brief Cmac構造体をデフォルト値で初期化します
\return 0
\param cmac Cmac構造体へのポインタ
\param key
\param keySz (1624 32)
\param type WC_CMAC_AES=1
\param unused 使使
\param heap 使 使 NULLにすることができま
\param devId 使ID使INVALID_DEVIDに設定します
_例_
\code
Cmac cmac[1];
ret = wc_InitCmac_ex(cmackeySzWC_CMAC_AESNULLNULLINVALID_DEVID);
(ret == 0) {
ret = wc_CmacUpdate(cmacininSz);
ret = wc_InitCmac_ex(cmac, key, keySz, WC_CMAC_AES, NULL, NULL, INVALID_DEVID);
if (ret == 0) {
ret = wc_CmacUpdate(cmac, in, inSz);
}
(ret == 0) {
if (ret == 0) {
ret = wc_CmacFinal(cmac, out, &outSz);
}
\endcode
@ -57,15 +57,15 @@ int wc_InitCmac(Cmac* cmac,
\sa wc_CmacFinal
*/
int wc_InitCmac_ex(Cmac* cmac,
const byte* word32 keySz
int void* 使void* int devId);
const byte* key, word32 keySz,
int type, void* unusedvoid* heap, int devId);
/*!
\ingroup CMAC
\brief
\return 0
\param cmac Cmac
\param in
\return 0
\param cmac Cmac構造体へのポインタ
\param in
\param inSz
_例_
@ -81,11 +81,11 @@ int wc_CmacUpdate(Cmac* cmac,
/*!
\ingroup CMAC
\brief 使
\return 0
\param cmac Cmac
\param out
\param outSz (in/out)
\brief 使
\return 0
\param cmac Cmac構造体へのポインタ
\param out
\param outSz (in/out)
_例_
\code
@ -100,14 +100,14 @@ int wc_CmacFinal(Cmac* cmac,
/*!
\ingroup CMAC
\brief CMAC
\return 0
\param out
\brief CMACを生成するためのシングルショット関数
\return 0
\param out
\param outSz (in/out)
\param in
\param in
\param inSz
\param
\param keySz (1624 32)
\param key
\param keySz (1624 32)
_例_
\code
@ -122,14 +122,14 @@ int wc_AesCmacGenerate(byte* out, word32* outSz,
/*!
\ingroup CMAC
\brief CMAC
\return 0
\param
\param checkSz
\brief CMACを検証するためのシングルショット関数
\return 0
\param check CMAC処理結果データへのポイン
\param checkSz CMAC処理結果データのサイ
\param in
\param inSz
\param
\param keySz (1624 32)
\param key
\param keySz (1624 32)
_例_
\code
@ -145,9 +145,10 @@ int wc_AesCmacVerify(const byte* check, word32 checkSz,
/*!
\ingroup CMAC
\brief WOLFSSL_HASH_KEEP 使
\return 0
\param
\brief WOLFSSL_HASH_KEEPマクロ定義時のみ使用可能使
\return 0
\param cmac Cmac構造体へのポインタ
\param in
\param inSz
_例_

View File

@ -1,11 +1,17 @@
/*!
\ingroup ED25519
\brief ED25519公開鍵を生成しますPubkeyに格納しPubkeyszでこのバッファに書き込まれたバイトを設定します
\ingroup ED25519
\brief Ed25519秘密鍵からEd25519公開鍵を生成しますpubkeyに出力します
ed25519_key構造体にはEd25519秘密鍵がインポートされている必要があります
\return 0
\return BAD_FUNC_ARG IFIキーまたはPubKeyがNULLに評価された場合32ED25519に32バイトのキーがあります
\return MEMORY_E
\param [in] ED25519_Keyへのキーポインタ
\param [out]
\return BAD_FUNC_ARG keyまたはpubKeyがNULLの場合32ED25519に32バイトのキーがあります
\return ECC_PRIV_KEY_E ed25519_key構造体にEd25519秘密鍵がインポートされていない場合に返されます
\return MEMORY_E
\param [in] key Ed25519秘密鍵がインポートされているed25519_key構造体へのポインタ
\param [out] pubKey
\param [in] pubKeySz ED25519_PUB_KEY_SIZE(32)
_Example_
\code
int ret;
@ -31,13 +37,14 @@ int wc_ed25519_make_public(ed25519_key* key, unsigned char* pubKey,
word32 pubKeySz);
/*!
\ingroup ED25519
\brief ED25519キーを生成し
\return 0 ED25519_KEYを正常に行うと返されます
\return BAD_FUNC_ARG RNGまたはKEYがNULLに評価された場合32ED25519に32バイトのキーがあります
\return MEMORY_E
\param [in] RNGキーを生成する初期化されたRNGオブジェクトへのポインタ
\param [in] keysize keyの長さを生成しますED25519の場合は常に32になります
\ingroup ED25519
\brief ed25519_key構造体を生成しkeyのバッファに格納します
\return 0 ed25519_key構造体を正常に生成すると返されます
\return BAD_FUNC_ARG RNGまたはKEYがNULLに評価された場合keysizeが32バイトではない場合(Ed25519鍵には常に32バイトを指定する必要があります)
\return MEMORY_E
\param [in] rng RNGキーを生成する初期化されたRNGオブジェクトへのポインタ
\param [in] keysize keyの長さED25519の場合は常に32になります
_Example_
\code
int ret;
@ -58,15 +65,18 @@ int wc_ed25519_make_public(ed25519_key* key, unsigned char* pubKey,
int wc_ed25519_make_key(WC_RNG* rng, int keysize, ed25519_key* key);
/*!
\ingroup ED25519
\brief ED25519_Keyオブジェクトを使用して認証を保証するメッセージに署名します
\ingroup ED25519
\brief ed25519_key構造体を使用してメッセージに署名します
\return 0
\return BAD_FUNC_ARG NULLに評価された場合
\return MEMORY_E
\param [in]
\param [in]
\param [out]
\param [in,out]
\return MEMORY_E
\param [in] in
\param [in] inlen
\param [out] out
\param [in,out] outlen
\param [in] key 使ed25519_key構造体へのポインタ
_Example_
\code
ed25519_key key;
@ -95,17 +105,20 @@ int wc_ed25519_sign_msg(const byte* in, word32 inlen, byte* out,
word32 *outlen, ed25519_key* key);
/*!
\ingroup ED25519
\brief ED25519_Keyオブジェクトを使用して認証を保証するメッセージに署名します
\ingroup ED25519
\brief ed25519_key構造体を使用してメッセージに署名します
\return 0
\return BAD_FUNC_ARG NULLに評価されます
\return MEMORY_E
\param [in]
\param [in]
\param [out]
\param [in,out]
\param [in] ED25519_KEYへのキーポインタ
\param [in]
\return MEMORY_E
\param [in] in
\param [in] inlen
\param [out] out
\param [in,out] outlen
\param [in] key 使ed25519_key構造体へのポインタ
\param [in] context
\param [in] contextLen
_Example_
\code
ed25519_key key;
@ -137,17 +150,24 @@ int wc_ed25519ctx_sign_msg(const byte* in, word32 inlen, byte* out,
const byte* context, byte contextLen);
/*!
\ingroup ED25519
\brief ED25519_Keyオブジェクトを使用してメッセージダイジェストに署名して信頼性を保証します使Shake-256
\ingroup ED25519
\brief ed25519_key構造体を使用してメッセージダイジェストに署名します
使Shake-256
\return 0
\return BAD_FUNC_ARG NULLに評価されます
\return MEMORY_E
\param [in]
\param [in]
\param [out]
\param [in,out]
\param [in] ED25519_KEYへのキーポインタ
\param [in]
\return MEMORY_E
\param [in] hash
\param [in] hashLen
\param [out] out
\param [in,out] outlen
\param [in] key 使ed25519_key構造体へのポインタ
\param [in] context
\param [in] contextLen
_Example_
\code
ed25519_key key;
@ -179,17 +199,19 @@ int wc_ed25519ph_sign_hash(const byte* hash, word32 hashLen, byte* out,
const byte* context, byte contextLen);
/*!
\ingroup ED25519
\brief ED25519_Keyオブジェクトを使用して認証を保証するメッセージに署名します
\ingroup ED25519
\brief ed25519_key構造体を使用して認証を保証するメッセージに署名します
\return 0
\return BAD_FUNC_ARG NULLに評価されます
\return MEMORY_E
\param [in]
\param [in]
\param [out]
\param [in,out]
\param [in] ED25519_KEYへのキーポインタ
\param [in]
\return MEMORY_E
\param [in] in
\param [in] inlen
\param [out] out
\param [in,out] outlen
\param [in] key ed25519_key構造体へのポインタ
\param [in] context
\param [in] contextLen
_Example_
\code
ed25519_key key;
@ -221,16 +243,21 @@ int wc_ed25519ph_sign_msg(const byte* in, word32 inlen, byte* out,
const byte* context, byte contextLen);
/*!
\ingroup ED25519
\brief ED25519署名を確認して信頼性を確保しますRESを介して答えを返し10
\ingroup ED25519
\brief Ed25519署名を検証します
retを介して答えを返し10
\return 0
\return BAD_FUNC_ARG NULLに評価された場合SIGLENが署名の実際の長さと一致しない場合に返されます
\return SIG_VERIFY_E
\param [in] SIGポインタ
\param [in]
\param [in] MSGポインタを確認する
\param [in] MSGlen長
\param [out] RESポインタ1
\param [in] sig
\param [in] siglen
\param [in] msg
\param [in] msgLen
\param [out] ret 1
\param [in] key Ed25519公開鍵へのポインタ
_Example_
\code
ed25519_key key;
@ -257,18 +284,24 @@ int wc_ed25519_verify_msg(const byte* sig, word32 siglen, const byte* msg,
word32 msgLen, int* ret, ed25519_key* key);
/*!
\ingroup ED25519
\brief ED25519署名を確認して信頼性を確保しますRESを介して答えを返し10
\ingroup ED25519
\brief Ed25519署名を検証します
retを介して返され10
\return 0
\return BAD_FUNC_ARG NULLに評価された場合SIGLENが署名の実際の長さと一致しない場合に返されます
\return SIG_VERIFY_E
\param [in] SIGポインタ
\param [in]
\param [in] MSGポインタを確認する
\param [in] MSGlen長
\param [out] RESポインタ1
\param [in] Public ED25519キーへのキーポインタ
\param [in]
\param [in] sig
\param [in] siglen
\param [in] msg
\param [in] msgLen
\param [out] ret 1
\param [in] key Ed25519公開鍵へのポインタ
\param [in] context
\param [in] contextLen
_Example_
\code
ed25519_key key;
@ -297,18 +330,25 @@ int wc_ed25519ctx_verify_msg(const byte* sig, word32 siglen, const byte* msg,
const byte* context, byte contextLen);
/*!
\ingroup ED25519
\brief ED25519シグネチャを確認して使SHA-512RESを介して返され10
\ingroup ED25519
\brief Ed25519署名を検証します
hashは
使SHA-512
retを介して返され10
\return 0
\return BAD_FUNC_ARG NULLに評価された場合SIGLENが署名の実際の長さと一致しない場合に返されます
\return SIG_VERIFY_E
\param [in] SIGポインタ
\param [in]
\param [in]
\param [in]
\param [out] RESポインタ1
\param [in] Public ED25519キーへのキーポインタ
\param [in]
\param [in] sig
\param [in] siglen
\param [in] msg
\param [in] msgLen
\param [out] ret 1
\param [in] key Ed25519公開鍵へのポインタ
\param [in] context
\param [in] contextLen
_Example_
\code
ed25519_key key;
@ -337,18 +377,24 @@ int wc_ed25519ph_verify_hash(const byte* sig, word32 siglen, const byte* hash,
const byte* context, byte contextLen);
/*!
\ingroup ED25519
\brief ED25519署名を確認して信頼性を確保しますRESを介して答えを返し10
\ingroup ED25519
\brief Ed25519署名を検証します
contextは検証すべきデータの一部として含まれています
resを介して返され10
\return 0
\return BAD_FUNC_ARG NULLに評価された場合SIGLENが署名の実際の長さと一致しない場合に返されます
\return SIG_VERIFY_E
\param [in] SIGポインタ
\param [in]
\param [in] MSGポインタを確認する
\param [in] MSGlen長
\param [out] RESポインタ1
\param [in] Public ED25519キーへのキーポインタ
\param [in]
\param [in] sig
\param [in] siglen
\param [in] msg
\param [in] msgLen
\param [out] ret 1
\param [in] key Ed25519公開鍵へのポインタ
\param [in] context
\param [in] contextLen
_Example_
\code
ed25519_key key;
@ -377,10 +423,12 @@ int wc_ed25519ph_verify_msg(const byte* sig, word32 siglen, const byte* msg,
const byte* context, byte contextLen);
/*!
\ingroup ED25519
\brief 使ED25519_Keyオブジェクトを初期化します
\return 0 ED25519_Keyオブジェクトの初期化に成功したときに返されます
\return BAD_FUNC_ARG NULLの場合は返されます
\ingroup ED25519
\brief 使ed25519_key構造体を初期化します
\return 0 ed25519_key構造体の初期化に成功したときに返されます
\return BAD_FUNC_ARG keyがNULLの場合に返されます
\param [in,out] key ed25519_key構造体へのポインタ
_Example_
\code
ed25519_key key;
@ -393,8 +441,10 @@ int wc_ed25519ph_verify_msg(const byte* sig, word32 siglen, const byte* msg,
int wc_ed25519_init(ed25519_key* key);
/*!
\ingroup ED25519
\brief 使ED25519オブジェクトを解放します
\ingroup ED25519
\brief 使ed25519_key構造体を解放します
\param [in,out] key ed25519_key構造体へのポインタ
_Example_
\code
ed25519_key key;
@ -408,12 +458,16 @@ int wc_ed25519_init(ed25519_key* key);
void wc_ed25519_free(ed25519_key* key);
/*!
\ingroup ED25519
\brief Public ED25519_Keyペアをインポートします
\return 0 ED25519_KEYのインポートに成功しました
\return BAD_FUNC_ARG inまたはkeyがnullに評価された場合InlenがED25519キーのサイズよりも小さい場合に返されます
\param [in]
\param [in]
\ingroup ED25519
\brief ed25519公開鍵をed25519_key構造体へインポートします
\return 0 ed25519公開鍵のインポートに成功した場合に返されます
\return BAD_FUNC_ARG inまたはkeyがnullに評価された場合inlenがED25519鍵のサイズよりも小さい場合に返されます
\param [in] in
\param [in] inLen
\param [in,out] key ed25519_key構造体へのポインタ
_Example_
\code
int ret;
@ -426,21 +480,61 @@ void wc_ed25519_free(ed25519_key* key);
// error importing key
}
\endcode
\sa wc_ed25519_import_public_ex
\sa wc_ed25519_import_private_key
\sa wc_ed25519_import_private_key_ex
\sa wc_ed25519_export_public
*/
int wc_ed25519_import_public(const byte* in, word32 inLen, ed25519_key* key);
/*!
\ingroup ED25519
\brief ed25519秘密鍵をバッファからのみインポートします
\return 0 ED25519キーのインポートに成功しました
\ingroup ED25519
\brief ed25519公開鍵をed25519_key構造体へインポートします
trusted引数が1以外の場合は両鍵が対応しているかをチェックします
\return 0 ed25519公開鍵のインポートに成功した場合に返されます
\return BAD_FUNC_ARG Returned inあるいはkeyがNULLの場合,inLenがEd25519鍵のサイズより小さい場合に返されます
\param [in] in
\param [in] inLen
\param [in,out] key ed25519_key構造体へのポインタ
\param [in] trusted
_Example_
\code
int ret;
byte pub[] = { initialize Ed25519 public key };
ed_25519 key;
wc_ed25519_init_key(&key);
ret = wc_ed25519_import_public_ex(pub, sizeof(pub), &key, 1);
if (ret != 0) {
// error importing key
}
\endcode
\sa wc_ed25519_import_public
\sa wc_ed25519_import_private_key
\sa wc_ed25519_import_private_key_ex
\sa wc_ed25519_export_public
*/
int wc_ed25519_import_public_ex(const byte* in, word32 inLen, ed25519_key* key,
int trusted);
/*!
\ingroup ED25519
\brief ed25519秘密鍵のみをバッファからインポートします
\return 0 Ed25519秘密鍵のインポートに成功した際に返されます
\return BAD_FUNC_ARG privまたはkeyがNULLに評価された場合privSzがED25519_KEY_SIZEと異なる場合に返されます
\param [in] PRIVポインタ
\param [in] Privsz長さ
\param [in] Pubポインタ
\param [in] Pubszの長さ
\param [in] priv
\param [in] privSz
_Example_
\code
int ret;
@ -457,19 +551,21 @@ int wc_ed25519_import_public(const byte* in, word32 inLen, ed25519_key* key);
\sa wc_ed25519_import_private_key
\sa wc_ed25519_export_private_only
*/
int wc_ed25519_import_private_only(const byte* priv, word32 privSz,
ed25519_key* key);
/*!
\ingroup ED25519
\brief /ED25519キーペアをインポートします
\return 0 ED25519_KEYのインポートに成功しました
\ingroup ED25519
\brief Ed25519公開鍵/Ed25519鍵ペアをインポートします
\return 0 Ed25519_KEYのインポートに成功しました
\return BAD_FUNC_ARG privまたはkeyがNULLに評価された場合privSzがED25519_KEY_SIZEと異なるあるいはED25519_PRV_KEY_SIZEとも異なる場合pubSzがED25519_PUB_KEY_SIZEよりも小さい場合に返されます
\param [in] PRIVポインタ
\param [in] Privsz長さ
\param [in] Pubポインタ
\param [in] Pubszの長さ
\param [in] priv
\param [in] privSz
\param [in] pub
\param [in] pubSz
_Example_
\code
int ret;
@ -497,12 +593,13 @@ int wc_ed25519_import_private_key(const byte* priv, word32 privSz,
\brief Ed25519公開鍵/trusted引数により信頼されていないとされた場合には秘密鍵に対して検証されます
\return 0 ed25519_keyのインポートに成功しました
\return BAD_FUNC_ARG Returned if privあるいはkeyがNULLに評価された場合privSzがED25519_KEY_SIZEともED25519_PRV_KEY_SIZEとも異なる場合pubSzがED25519_PUB_KEY_SIZEより小さい場合に返されます
\param [in] priv
\param [in] priv
\param [in] privSz
\param [in] pub
\param [in] pub
\param [in] pubSz
\param [in,out] key /ed25519_keyオブジェクトへのポインター
\param [in] trusted
\param [in] trusted
_Example_
\code
int ret;
@ -527,13 +624,16 @@ int wc_ed25519_import_private_key_ex(const byte* priv, word32 privSz,
const byte* pub, word32 pubSz, ed25519_key* key, int trusted);
/*!
\ingroup ED25519
\brief ED25519_Key構造体からエクスポートしますounterenでこのバッファに書き込まれたバイトを設定します
\ingroup ED25519
\brief ed25519_key構造体から公開鍵をエクスポートしますoutに格納しoutLenにこのバッファに書き込まれたバイトを設定します
\return 0
\return BAD_FUNC_ARG NULLに評価された場合に返されます
\return BUFFER_E outlenに必要なサイズを設定します
\param [in] ED25519_Key構造体へのキーポインタ
\param [out]
\return BUFFER_E outlenに必要なサイズを設定します
\param [in] key ed25519_key構造体へのポインタ
\param [out] out
\param [in,out] outLen word32型変数へのポインタ
_Example_
\code
int ret;
@ -555,13 +655,16 @@ int wc_ed25519_import_private_key_ex(const byte* priv, word32 privSz,
int wc_ed25519_export_public(ed25519_key* key, byte* out, word32* outLen);
/*!
\ingroup ED25519
\brief ED25519_Key構造体からの秘密鍵のみをエクスポートしますoutlenにこのバッファに書き込まれたバイトを設定します
\ingroup ED25519
\brief ed25519_key構造体からの秘密鍵のみをエクスポートしますoutlenにこのバッファに書き込まれたバイトを設定します
\return 0
\return BAD_FUNC_ARG NULLに評価された場合に返されます
\return BUFFER_E
\param [in] ED25519_Key構造体へのキーポインタ
\param [out]
\param [in] key ed25519_key構造体へのポインタ
\param [out] out
\param [in,out] outLen word32型変数へのポインタ
_Example_
\code
int ret;
@ -582,13 +685,16 @@ int wc_ed25519_export_public(ed25519_key* key, byte* out, word32* outLen);
int wc_ed25519_export_private_only(ed25519_key* key, byte* out, word32* outLen);
/*!
\ingroup ED25519
\brief ED25519_Key構造体からキーペアをエクスポートしますOUTに格納しounterenでこのバッファに書き込まれたバイトを設定します
\return 0
\ingroup ED25519
\brief ed25519_key構造体から鍵ペアをエクスポートしますoutに格納しounterenでこのバッファに書き込まれたバイトを設定します
\return 0
\return BAD_FUNC_ARG NULLに評価された場合に返されます
\return BUFFER_E
\param [in] ED25519_Key構造体へのキーポインタ
\param [out]
\return BUFFER_E
\param [in] ed25519_key構造体へのポインタ
\param [out]
\param [in,out] outLen word32型変数へのポインタ
_Example_
\code
ed25519_key key;
@ -613,15 +719,21 @@ int wc_ed25519_export_private_only(ed25519_key* key, byte* out, word32* outLen);
int wc_ed25519_export_private(ed25519_key* key, byte* out, word32* outLen);
/*!
\ingroup ED25519
\brief ED25519_KEY構造体とは別にプライベートキーと公開鍵をエクスポートしますPrivに格納しPRIVSZでこのバッファに書き込まれたバイトを設定しますPUBに格納しPubszでこのバッファに書き込まれたバイトを設定します
\return 0
\ingroup ED25519
\brief ed25519_key構造体から秘密鍵と公開鍵を別々にエクスポートします
privに格納しpriovSzにこのバッファに書き込んだバイト数を設定します
pubに格納しpubSzにこのバッファに書き込んだバイト数を設定します
\return 0
\return BAD_FUNC_ARG NULLに評価された場合に返されます
\return BUFFER_E
\param [in] ED25519_Key構造体へのキーポインタ
\param [out] PRIVポインタ
\param [in,out] PRIVSZ PIVINSZポインタサイズが表示されているサイズを持つWord32オブジェクトへのポインタ
\param [out] Pub
\return BUFFER_E
\param [in] key ed25519_key構造体へのポインタ
\param [out] priv
\param [in,out] privSz word32型変数へのポインタ
\param [out] pub
\param [in,out] pubSz word32型変数へのポインタ
_Example_
\code
int ret;
@ -647,11 +759,13 @@ int wc_ed25519_export_key(ed25519_key* key,
byte* pub, word32 *pubSz);
/*!
\ingroup ED25519
\brief ED25519_KEY構造体の公開鍵をチェックします
\ingroup ED25519
\brief ed25519_key構造体の公開鍵をチェックします
\return 0
\return BAD_FUNC_ARG NULLの場合に返されます
\return PUBLIC_KEY_E
\param [in] key ed25519_key構造体へのポインタ
_Example_
\code
int ret;
@ -672,10 +786,13 @@ int wc_ed25519_export_key(ed25519_key* key,
int wc_ed25519_check_key(ed25519_key* key);
/*!
\ingroup ED25519
\brief ED25519 - 32
\ingroup ED25519
\brief Ed25519 - 32
\return ED25519_KEY_SIZE 32
\return BAD_FUNC_ARG NULLの場合に返されます
\return BAD_FUNC_ARG keyがNULLの場合に返されます
\param [in] key ed25519_key構造体へのポインタ
_Example_
\code
int keySz;
@ -692,10 +809,12 @@ int wc_ed25519_check_key(ed25519_key* key);
int wc_ed25519_size(ed25519_key* key);
/*!
\ingroup ED25519
\ingroup ED25519
\brief secret + public
\return ED25519_PRV_KEY_SIZE 64
\return BAD_FUNC_ARG key引数がnullの場合に返されます
\param [in] key ed25519_key構造体へのポインタ
_Example_
\code
ed25519_key key;
@ -713,10 +832,12 @@ int wc_ed25519_size(ed25519_key* key);
int wc_ed25519_priv_size(ed25519_key* key);
/*!
\ingroup ED25519
\ingroup ED25519
\brief
\return ED25519_PUB_KEY_SIZE 32
\return BAD_FUNC_ARG key引数がnullの場合は返します
\param [in] key ed25519_key構造体へのポインタ
_Example_
\code
ed25519_key key;
@ -733,10 +854,12 @@ int wc_ed25519_priv_size(ed25519_key* key);
int wc_ed25519_pub_size(ed25519_key* key);
/*!
\ingroup ED25519
\ingroup ED25519
\brief ED25519シグネチャのサイズ64
\return ED25519_SIG_SIZE ED25519シグネチャ64
\return BAD_FUNC_ARG key引数がnullの場合は返します
\param [in] key ed25519_key構造体へのポインタ
_Example_
\code
int sigSz;

File diff suppressed because it is too large Load Diff

View File

@ -1231,7 +1231,7 @@ int wc_DerToPem(const byte* der, word32 derSz, byte* output,
word32 pemSz;
byte* cipher_info[] { Additional cipher info. }
pemSz = wc_DerToPemEx(der, derSz,pemFormatted,FOURK_BUF, ,CERT_TYPE);
pemSz = wc_DerToPemEx(der, derSz, pemFormatted, FOURK_BUF, cipher_info, CERT_TYPE);
\endcode
\sa wc_PemCertToDer

View File

@ -1,21 +1,21 @@
/*!
\ingroup ED25519
\brief This function generates the Ed25519 public key from the private key.
It stores the public key in the buffer pubKey, and sets the bytes
written to this buffer in pubKeySz.
\brief This function generates the Ed25519 public key from the private key,
stored in the ed25519_key object. It stores the public key in the buffer
pubKey.
\return 0 Returned upon successfully making the public key.
\return BAD_FUNC_ARG Returned ifi key or pubKey evaluate to NULL, or if the
\return BAD_FUNC_ARG Returned if key or pubKey evaluate to NULL, or if the
specified key size is not 32 bytes (Ed25519 has 32 byte keys).
\return ECC_PRIV_KEY_E returned if the ed25519_key object does not have
the private key in it.
\return MEMORY_E Returned if there is an error allocating memory
during function execution.
\param [in] key Pointer to the ed25519_key for which to generate a key.
\param [out] out Pointer to the buffer in which to store the public key.
\param [in,out] outLen Pointer to a word32 object with the size available
in out. Set with the number of bytes written to out after successfully
exporting the public key.
\param [out] pubKey Pointer to the buffer in which to store the public key.
\param [in] pubKeySz Size of the public key. Should be ED25519_PUB_KEY_SIZE.
_Example_
\code
@ -301,7 +301,7 @@ int wc_ed25519ph_sign_msg(const byte* in, word32 inlen, byte* out,
\ingroup ED25519
\brief This function verifies the Ed25519 signature of a message to ensure
authenticity. It returns the answer through res, with 1 corresponding to
authenticity. It returns the answer through ret, with 1 corresponding to
a valid signature, and 0 corresponding to an invalid signature.
\return 0 Returned upon successfully performing the signature
@ -315,7 +315,7 @@ int wc_ed25519ph_sign_msg(const byte* in, word32 inlen, byte* out,
\param [in] siglen Length of the signature to verify.
\param [in] msg Pointer to the buffer containing the message to verify.
\param [in] msgLen Length of the message to verify.
\param [out] res Pointer to the result of the verification. 1 indicates the
\param [out] ret Pointer to the result of the verification. 1 indicates the
message was successfully verified.
\param [in] key Pointer to a public Ed25519 key with which to verify the
signature.
@ -351,7 +351,7 @@ int wc_ed25519_verify_msg(const byte* sig, word32 siglen, const byte* msg,
\brief This function verifies the Ed25519 signature of a message to ensure
authenticity. The context is included as part of the data
verified. It returns the answer through res, with 1 corresponding to
verified. It returns the answer through ret, with 1 corresponding to
a valid signature, and 0 corresponding to an invalid signature.
\return 0 Returned upon successfully performing the signature
@ -365,7 +365,7 @@ int wc_ed25519_verify_msg(const byte* sig, word32 siglen, const byte* msg,
\param [in] siglen Length of the signature to verify.
\param [in] msg Pointer to the buffer containing the message to verify.
\param [in] msgLen Length of the message to verify.
\param [out] res Pointer to the result of the verification. 1 indicates the
\param [out] ret Pointer to the result of the verification. 1 indicates the
message was successfully verified.
\param [in] key Pointer to a public Ed25519 key with which to verify the
signature.
@ -408,7 +408,7 @@ int wc_ed25519ctx_verify_msg(const byte* sig, word32 siglen, const byte* msg,
message to ensure authenticity. The context is included as part of the data
verified. The hash is the pre-hashed message before signature calculation.
The hash algorithm used to create message digest must be SHA-512.
The answer is returned through res, with 1 corresponding to a valid
The answer is returned through ret, with 1 corresponding to a valid
signature, and 0 corresponding to an invalid signature.
@ -424,7 +424,7 @@ int wc_ed25519ctx_verify_msg(const byte* sig, word32 siglen, const byte* msg,
\param [in] hash Pointer to the buffer containing the hash of the message
to verify.
\param [in] hashLen Length of the hash to verify.
\param [out] res Pointer to the result of the verification. 1 indicates the
\param [out] ret Pointer to the result of the verification. 1 indicates the
message was successfully verified.
\param [in] key Pointer to a public Ed25519 key with which to verify the
signature.
@ -466,7 +466,7 @@ int wc_ed25519ph_verify_hash(const byte* sig, word32 siglen, const byte* hash,
\brief This function verifies the Ed25519 signature of a message to ensure
authenticity. The context is included as part of the data
verified. The message is pre-hashed before verification. It returns the
answer through res, with 1 corresponding to a valid signature, and 0
answer through ret, with 1 corresponding to a valid signature, and 0
corresponding to an invalid signature.
\return 0 Returned upon successfully performing the signature
@ -480,7 +480,7 @@ int wc_ed25519ph_verify_hash(const byte* sig, word32 siglen, const byte* hash,
\param [in] siglen Length of the signature to verify.
\param [in] msg Pointer to the buffer containing the message to verify.
\param [in] msgLen Length of the message to verify.
\param [out] res Pointer to the result of the verification. 1 indicates the
\param [out] ret Pointer to the result of the verification. 1 indicates the
message was successfully verified.
\param [in] key Pointer to a public Ed25519 key with which to verify the
signature.
@ -562,7 +562,7 @@ void wc_ed25519_free(ed25519_key* key);
/*!
\ingroup ED25519
\brief This function imports a public ed25519_key pair from a buffer
\brief This function imports a public ed25519_key from a buffer
containing the public key. This function will handle both compressed and
uncompressed keys. The public key is checked that it matches the private
key when one is present.
@ -600,7 +600,7 @@ int wc_ed25519_import_public(const byte* in, word32 inLen, ed25519_key* key);
/*!
\ingroup ED25519
\brief This function imports a public ed25519_key pair from a buffer
\brief This function imports a public ed25519_key from a buffer
containing the public key. This function will handle both compressed and
uncompressed keys. Check public key matches private key, when present,
when not trusted.
@ -649,8 +649,6 @@ int wc_ed25519_import_public_ex(const byte* in, word32 inLen, ed25519_key* key,
\param [in] priv Pointer to the buffer containing the private key.
\param [in] privSz Length of the private key.
\param [in] pub Pointer to the buffer containing the public key.
\param [in] pubSz Length of the public key.
\param [in,out] key Pointer to the ed25519_key object in which to store the
imported private key.

View File

@ -859,7 +859,7 @@ int wolfSSL_dtls_export(WOLFSSL* ssl, unsigned char* buf,
/*!
\brief Used to export a serialized TLS session. This function is for
importing a serialized state of the connection.
exporting a serialized state of the connection.
In most cases wolfSSL_get1_session should be used instead of
wolfSSL_tls_export.
Additional debug info can be displayed with the macro
@ -1164,7 +1164,7 @@ int wolfSSL_CTX_use_PrivateKey_file(WOLFSSL_CTX* ctx, const char* file, int form
\sa wolfSSL_use_certificate_chain_file
*/
int wolfSSL_CTX_load_verify_locations(WOLFSSL_CTX* ctx, const char* file,
const char* format);
const char* path);
/*!
\ingroup CertsKeys
@ -1439,9 +1439,9 @@ int wolfSSL_CTX_use_RSAPrivateKey_file(WOLFSSL_CTX* ctx, const char* file, int f
\brief This function returns the maximum chain depth allowed, which is 9 by
default, for a valid session i.e. there is a non-null session object (ssl).
\return MAX_CHAIN_DEPTH returned if the WOLFSSL_CTX structure is not
\return MAX_CHAIN_DEPTH returned if the WOLFSSL structure is not
NULL. By default the value is 9.
\return BAD_FUNC_ARG returned if the WOLFSSL_CTX structure is NULL.
\return BAD_FUNC_ARG returned if the WOLFSSL structure is NULL.
\param ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
@ -1794,7 +1794,7 @@ WOLFSSL* wolfSSL_new(WOLFSSL_CTX*);
a socket file descriptor.
\return SSL_SUCCESS upon success.
\return Bad_FUNC_ARG upon failure.
\return BAD_FUNC_ARG upon failure.
\param ssl pointer to the SSL session, created with wolfSSL_new().
\param fd file descriptor to use with SSL/TLS connection.
@ -1828,7 +1828,7 @@ int wolfSSL_set_fd(WOLFSSL* ssl, int fd);
addr and addr_len parameters set to NULL.
\return SSL_SUCCESS upon success.
\return Bad_FUNC_ARG upon failure.
\return BAD_FUNC_ARG upon failure.
\param ssl pointer to the SSL session, created with wolfSSL_new().
\param fd file descriptor to use with SSL/TLS connection.
@ -2822,7 +2822,7 @@ int wolfSSL_GetSessionAtIndex(int index, WOLFSSL_SESSION* session);
\return none No return.
\param ctx pointer to the SSL context, created with wolfSSL_CTX_new().
\param mode session timeout value in seconds
\param mode flags indicating verification mode for peer's cert.
\param verify_callback callback to be called when verification fails.
If no callback is desired, the NULL pointer can be used for
verify_callback.
@ -2870,7 +2870,7 @@ void wolfSSL_CTX_set_verify(WOLFSSL_CTX* ctx, int mode,
\return none No return.
\param ssl pointer to the SSL session, created with wolfSSL_new().
\param mode session timeout value in seconds.
\param mode flags indicating verification mode for peer's cert.
\param verify_callback callback to be called when verification fails.
If no callback is desired, the NULL pointer can
be used for verify_callback.
@ -3138,6 +3138,7 @@ long wolfSSL_CTX_set_session_cache_mode(WOLFSSL_CTX* ctx, long mode);
\param ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
\param cb a SessionSecretCb type that is a function pointer with the above
signature.
\param ctx a pointer to the user context to be stored
_Example_
\code
@ -3169,7 +3170,7 @@ int wolfSSL_set_session_secret_cb(WOLFSSL* ssl, SessionSecretCb cb, void* ctx);
\return FWRITE_ERROR returned if XFWRITE failed to write to the file.
\return BAD_MUTEX_E returned if there was a mutex lock failure.
\param name is a constant char pointer that points to a file for writing.
\param fname is a constant char pointer that points to a file for writing.
_Example_
\code
@ -3184,7 +3185,7 @@ int wolfSSL_set_session_secret_cb(WOLFSSL* ssl, SessionSecretCb cb, void* ctx);
\sa wolfSSL_restore_session_cache
\sa wolfSSL_memrestore_session_cache
*/
int wolfSSL_save_session_cache(const char*);
int wolfSSL_save_session_cache(const char* fname);
/*!
\ingroup IO
@ -3214,7 +3215,7 @@ int wolfSSL_save_session_cache(const char*);
\sa XFREAD
\sa XFOPEN
*/
int wolfSSL_restore_session_cache(const char*);
int wolfSSL_restore_session_cache(const char* fname);
/*!
\ingroup IO
@ -3312,7 +3313,7 @@ int wolfSSL_get_session_cache_memsize(void);
\param ctx a pointer to a WOLFSSL_CTX structure, holding the
certificate information.
\param fname the cert cache buffer.
\param fname a constant char pointer that points to a file for writing.
_Example_
\code
@ -3344,7 +3345,7 @@ int wolfSSL_CTX_save_cert_cache(WOLFSSL_CTX* ctx, const char* fname);
\param ctx a pointer to a WOLFSSL_CTX structure, holding the certificate
information.
\param fname the cert cache buffer.
\param fname a constant char pointer that points to a file for reading.
_Example_
\code
@ -3462,7 +3463,7 @@ int wolfSSL_CTX_memrestore_cert_cache(WOLFSSL_CTX* ctx, const void* mem, int sz
\sa CM_GetCertCacheMemSize
*/
int wolfSSL_CTX_get_cert_cache_memsize(WOLFSSL_CTX*);
int wolfSSL_CTX_get_cert_cache_memsize(WOLFSSL_CTX* ctx);
/*!
\ingroup Setup
@ -3599,7 +3600,7 @@ void wolfSSL_dtls_set_using_nonblock(WOLFSSL* ssl, int nonblock);
\sa wolfSSL_dtls_got_timeout
\sa wolfSSL_dtls_set_using_nonblock
*/
int wolfSSL_dtls_get_using_nonblock(WOLFSSL*);
int wolfSSL_dtls_get_using_nonblock(WOLFSSL* ssl);
/*!
\brief This function returns the current timeout value in seconds for
the WOLFSSL object. When using non-blocking sockets, something in the user
@ -3919,7 +3920,7 @@ int wolfSSL_dtls_get_peer(WOLFSSL* ssl, void* peer, unsigned int* peerSz);
\sa wolfSSL_ERR_print_errors_fp
\sa wolfSSL_load_error_strings
*/
char* wolfSSL_ERR_error_string(unsigned long,char*);
char* wolfSSL_ERR_error_string(unsigned long errNumber, char* data);
/*!
\ingroup Debug
@ -3963,7 +3964,7 @@ void wolfSSL_ERR_error_string_n(unsigned long e, char* buf,
structure is within the WOLFSSL structure.
\return 1 SSL_SENT_SHUTDOWN is returned.
\return 2 SS_RECEIVED_SHUTDOWN is returned.
\return 2 SSL_RECEIVED_SHUTDOWN is returned.
\param ssl a constant pointer to a WOLFSSL structure, created using
wolfSSL_new().
@ -3989,7 +3990,7 @@ void wolfSSL_ERR_error_string_n(unsigned long e, char* buf,
\sa wolfSSL_SESSION_free
*/
int wolfSSL_get_shutdown(const WOLFSSL*);
int wolfSSL_get_shutdown(const WOLFSSL* ssl);
/*!
\ingroup IO
@ -4016,7 +4017,7 @@ int wolfSSL_get_shutdown(const WOLFSSL*);
\sa wolfSSL_GetSessionIndex
\sa wolfSSL_memsave_session_cache
*/
int wolfSSL_session_reused(WOLFSSL*);
int wolfSSL_session_reused(WOLFSSL* ssl);
/*!
\ingroup TLS
@ -4046,7 +4047,7 @@ int wolfSSL_session_reused(WOLFSSL*);
\sa wolfSSL_get_keys
\sa wolfSSL_set_shutdown
*/
int wolfSSL_is_init_finished(WOLFSSL*);
int wolfSSL_is_init_finished(WOLFSSL* ssl);
/*!
\ingroup IO
@ -4078,7 +4079,7 @@ int wolfSSL_is_init_finished(WOLFSSL*);
\sa wolfSSL_lib_version
*/
const char* wolfSSL_get_version(WOLFSSL*);
const char* wolfSSL_get_version(WOLFSSL* ssl);
/*!
\ingroup IO
@ -4142,7 +4143,7 @@ int wolfSSL_get_current_cipher_suite(WOLFSSL* ssl);
\sa wolfSSL_get_cipher_name_internal
\sa wolfSSL_get_cipher_name
*/
WOLFSSL_CIPHER* wolfSSL_get_current_cipher(WOLFSSL*);
WOLFSSL_CIPHER* wolfSSL_get_current_cipher(WOLFSSL* ssl);
/*!
\ingroup IO
@ -4482,7 +4483,7 @@ int wolfSSL_BIO_make_bio_pair(WOLFSSL_BIO *b1, WOLFSSL_BIO *b2);
\sa wolfSSL_BIO_new, wolfSSL_BIO_s_mem
\sa wolfSSL_BIO_new, wolfSSL_BIO_free
*/
int wolfSSL_BIO_ctrl_reset_read_request(WOLFSSL_BIO *b);
int wolfSSL_BIO_ctrl_reset_read_request(WOLFSSL_BIO *bio);
/*!
\ingroup IO
@ -4782,7 +4783,7 @@ char* wolfSSL_X509_NAME_oneline(WOLFSSL_X509_NAME* name, char* in, int sz)
\sa wolfSSL_get_peer_certificate
\sa wolfSSL_X509_NAME_oneline
*/
WOLFSSL_X509_NAME* wolfSSL_X509_get_issuer_name(WOLFSSL_X509*);
WOLFSSL_X509_NAME* wolfSSL_X509_get_issuer_name(WOLFSSL_X509* cert);
/*!
\ingroup CertsKeys
@ -4811,7 +4812,7 @@ WOLFSSL_X509_NAME* wolfSSL_X509_get_issuer_name(WOLFSSL_X509*);
\sa wolfSSL_X509_get_isCA
\sa wolfSSL_get_peer_certificate
*/
WOLFSSL_X509_NAME* wolfSSL_X509_get_subject_name(WOLFSSL_X509*);
WOLFSSL_X509_NAME* wolfSSL_X509_get_subject_name(WOLFSSL_X509* cert);
/*!
\ingroup CertsKeys
@ -4823,7 +4824,7 @@ WOLFSSL_X509_NAME* wolfSSL_X509_get_subject_name(WOLFSSL_X509*);
structure is returned.
\return 0 returned if there is not a valid x509 structure passed in.
\param ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
\param cert a pointer to a WOLFSSL_X509 structure.
_Example_
\code
@ -4842,7 +4843,7 @@ WOLFSSL_X509_NAME* wolfSSL_X509_get_subject_name(WOLFSSL_X509*);
\sa wolfSSL_X509_get_issuer_name
\sa wolfSSL_X509_get_isCA
*/
int wolfSSL_X509_get_isCA(WOLFSSL_X509*);
int wolfSSL_X509_get_isCA(WOLFSSL_X509* cert);
/*!
\ingroup CertsKeys
@ -4884,7 +4885,7 @@ int wolfSSL_X509_NAME_get_text_by_NID(WOLFSSL_X509_NAME* name, int nid,
\return int an integer value is returned which was retrieved from
the x509 object.
\param ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
\param cert a pointer to a WOLFSSL_X509 structure.
_Example_
\code
@ -4906,7 +4907,7 @@ int wolfSSL_X509_NAME_get_text_by_NID(WOLFSSL_X509_NAME* name, int nid,
\sa wolfSSL_X509_notAfter
\sa wolfSSL_X509_free
*/
int wolfSSL_X509_get_signature_type(WOLFSSL_X509*);
int wolfSSL_X509_get_signature_type(WOLFSSL_X509* cert);
/*!
\brief This function frees a WOLFSSL_X509 structure.
@ -5192,7 +5193,7 @@ long wolfSSL_CTX_add_extra_chain_cert(WOLFSSL_CTX* ctx, WOLFSSL_X509* x509);
\sa wolfSSL_CTX_free
\sa wolfSSL_CTX_set_read_ahead
*/
int wolfSSL_CTX_get_read_ahead(WOLFSSL_CTX*);
int wolfSSL_CTX_get_read_ahead(WOLFSSL_CTX* ctx);
/*!
\ingroup Setup
@ -5203,6 +5204,7 @@ int wolfSSL_CTX_get_read_ahead(WOLFSSL_CTX*);
\return SSL_FAILURE If ctx is NULL then SSL_FAILURE is returned.
\param ctx WOLFSSL_CTX structure to set read ahead flag.
\param v read ahead flag
_Example_
\code
@ -5333,7 +5335,7 @@ long wolfSSL_set_options(WOLFSSL *s, long op);
\sa wolfSSL_free
\sa wolfSSL_set_options
*/
long wolfSSL_get_options(const WOLFSSL *s);
long wolfSSL_get_options(const WOLFSSL *ssl);
/*!
\ingroup Setup
@ -5359,7 +5361,7 @@ long wolfSSL_get_options(const WOLFSSL *s);
\sa wolfSSL_new
\sa wolfSSL_free
*/
long wolfSSL_set_tlsext_debug_arg(WOLFSSL *s, void *arg);
long wolfSSL_set_tlsext_debug_arg(WOLFSSL *ssl, void *arg);
/*!
\ingroup openSSL
@ -5372,7 +5374,7 @@ long wolfSSL_set_tlsext_debug_arg(WOLFSSL *s, void *arg);
\return 1 upon success.
\return 0 upon error.
\param s pointer to WolfSSL struct which is created by SSL_new() function
\param s pointer to WOLFSSL struct which is created by SSL_new() function
\param type ssl extension type which TLSEXT_STATUSTYPE_ocsp is
only supported.
@ -5518,7 +5520,7 @@ void wolfSSL_ERR_print_errors_cb (
\sa wolfSSL_CTX_set_psk_client_callback
*/
void wolfSSL_CTX_set_psk_client_callback(WOLFSSL_CTX* ctx,
wc_psk_client_callback);
wc_psk_client_callback cb);
/*!
\brief Sets the PSK client side callback.
@ -14427,7 +14429,7 @@ int wolfSSL_get_ephemeral_key(WOLFSSL* ssl, int keyAlgo,
/*!
\ingroup SSL
\brief Sign a message with the chosen message digest, padding, and RSA key
\return WOLFSSL_SUCCESS on success and WOLFSSL_FAILURE on error
\return WOLFSSL_SUCCESS on success and c on error
\param type Hash NID
\param m Message to sign. Most likely this will be the digest of
the message to sign