Apdate Japanese API comments to match them in PR6506

This commit is contained in:
TakayukiMatsuo
2023-08-20 15:25:33 +09:00
parent 33e31ed41c
commit 174f0b2ebc
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 \ingroup CMAC
\brief Cmac 構造体をデフォルトで初期化す \brief Cmac構造体をデフォルトで初期化しま
\return 成功したら 0 を返 \return 成功したら0を返しま
\param cmac Cmac 構造体へのポインタ \param cmac Cmac構造体へのポインタ
\param キー キー ポインタ \param key 鍵データへのポインタ
\param keySz キー ポインタのサイズ (16、24、または 32) \param keySz 鍵データのサイズ(16、24、または 32)
\param type 常に WC_CMAC_AES = 1 \param type 常にWC_CMAC_AES=1
\param 未使用 使用されていません。互換性に関する将来の潜在的な使用のために存在します \param unused 使用されていません。互換性に関する将来の潜在的な使用のために存在します
_例_ _例_
\code \code
Cmac cmac[1]; Cmac cmac[1];
ret = wc_InitCmac(cmac、キー、keySz、WC_CMAC_AES、NULL); ret = wc_InitCmac(cmac、key、keySz、WC_CMAC_AES、NULL);
もし (ret == 0) { if (ret == 0) {
ret = wc_CmacUpdate(cmac、in、inSz); ret = wc_CmacUpdate(cmac、in、inSz);
} }
もし (ret == 0) { if (ret == 0) {
ret = wc_CmacFinal(cmac, out, outSz); ret = wc_CmacFinal(cmac, out, outSz);
} }
\endcode \endcode
@ -25,29 +25,29 @@
\sa wc_CmacFinal \sa wc_CmacFinal
*/ */
int wc_InitCmac(Cmac* cmac, int wc_InitCmac(Cmac* cmac,
const byte* word32 keySz const byte* keyword32 keySz
intvoid*使); int typevoid* unused);
/*! /*!
\ingroup CMAC \ingroup CMAC
\brief Cmac 構造体をデフォルトで初期化す \brief Cmac構造体をデフォルトで初期化しま
\return 成功したら 0 を返 \return 成功したら0を返しま
\param cmac Cmac 構造体へのポインタ \param cmac Cmac構造体へのポインタ
\param キー キー ポインタ \param key 鍵データへのポインタ
\param keySz キー ポインタのサイズ (16、24、または 32) \param keySz 鍵データのサイズ(16、24、または 32)
\param type 常に WC_CMAC_AES = 1 \param type 常にWC_CMAC_AES=1
\param 未使用 使用されていません。互換性に関する将来の潜在的な使用のために存在します \param unused 使用されていません。互換性に関する将来の潜在的な使用のために存在します
\param heap 動的割り当てに使用されるヒープ ヒントへのポインタ。 通常、スタティック メモリ オプションで使用されます。 NULL にすることができます。 \param heap 動的割り当てに使用されるヒープヒントへのポインタ。 通常、スタティックメモリオプションで使用されます。 NULLにすることができます。
\param devId 非同期ハードウェアで使用する ID。 非同期ハードウェアを使用していない場合は、INVALID_DEVID に設定します。 \param devId 非同期ハードウェアで使用するID。非同期ハードウェアを使用していない場合は、INVALID_DEVIDに設定します。
_例_ _例_
\code \code
Cmac cmac[1]; Cmac cmac[1];
ret = wc_InitCmac_ex(cmac、キー、keySzWC_CMAC_AESNULLNULLINVALID_DEVID); ret = wc_InitCmac_ex(cmac, key, keySz, WC_CMAC_AES, NULL, NULL, INVALID_DEVID);
もし (ret == 0) { if (ret == 0) {
ret = wc_CmacUpdate(cmac、in、inSz); ret = wc_CmacUpdate(cmac, in, inSz);
} }
もし (ret == 0) { if (ret == 0) {
ret = wc_CmacFinal(cmac, out, &outSz); ret = wc_CmacFinal(cmac, out, &outSz);
} }
\endcode \endcode
@ -57,15 +57,15 @@ int wc_InitCmac(Cmac* cmac,
\sa wc_CmacFinal \sa wc_CmacFinal
*/ */
int wc_InitCmac_ex(Cmac* cmac, int wc_InitCmac_ex(Cmac* cmac,
const byte* word32 keySz const byte* key, word32 keySz,
int void* 使void* int devId); int type, void* unusedvoid* heap, int devId);
/*! /*!
\ingroup CMAC \ingroup CMAC
\brief 暗号ベースのメッセージ認証コード入力データを追加 \brief 暗号ベースのメッセージ認証コード入力データを追加
\return 成功したら 0 を返 \return 成功したら0を返しま
\param cmac Cmac 構造体へのポインタ \param cmac Cmac構造体へのポインタ
\param in 処理する入力データ \param in 処理する入力データへのポインタ
\param inSz 入力データのサイズ \param inSz 入力データのサイズ
_例_ _例_
@ -81,11 +81,11 @@ int wc_CmacUpdate(Cmac* cmac,
/*! /*!
\ingroup CMAC \ingroup CMAC
\brief 暗号ベースのメッセージ認証コードを使用して最終結果を生成す \brief 暗号ベースのメッセージ認証コードを使用して最終結果を生成しま
\return 成功したら 0 を返 \return 成功したら0を返しま
\param cmac Cmac 構造体へのポインタ \param cmac Cmac構造体へのポインタ
\param out 結果を返すポインタ \param out 結果の出力先バッファへのポインタ
\param outSz 出力のポインタサイズ (in/out) \param outSz 結果の出力先バッファサイズ (in/out)
_例_ _例_
\code \code
@ -100,14 +100,14 @@ int wc_CmacFinal(Cmac* cmac,
/*! /*!
\ingroup CMAC \ingroup CMAC
\brief CMAC を生成するためのシングル ショット関数 \brief CMACを生成するためのシングルショット関数
\return 成功したら 0 を返 \return 成功したら0を返しま
\param out 結果を返すポインタ \param out 結果の出力先バッファへのポインタ
\param outSz 出力のポインタサイズ (in/out) \param outSz 出力のポインタサイズ (in/out)
\param in 処理する入力データのポインタ \param in 処理する入力データのポインタ
\param inSz 入力データのサイズ \param inSz 入力データのサイズ
\param キー キー ポインタ \param key 鍵データへのポインタ
\param keySz キー ポインタのサイズ (16、24、または 32) \param keySz 鍵データのサイズ (16、24、または 32)
_例_ _例_
\code \code
@ -122,14 +122,14 @@ int wc_AesCmacGenerate(byte* out, word32* outSz,
/*! /*!
\ingroup CMAC \ingroup CMAC
\brief CMAC を検証するためのシングル ショット機能 \brief CMACを検証するためのシングルショット関数
\return 成功したら 0 を返 \return 成功したら0を返しま
\param 結果を返すチェック ポインタ \param check 検証対象となるCMAC処理結果データへのポインタ
\param checkSz チェックアウト バッファのサイズ \param checkSz CMAC処理結果データのサイズ
\param in 処理する入力データのポインタ \param in 処理する入力データのポインタ
\param inSz 入力データのサイズ \param inSz 入力データのサイズ
\param キー キー ポインタ \param key 鍵データへのポインタ
\param keySz キー ポインタのサイズ (16、24、または 32) \param keySz 鍵データのサイズ (16、24、または 32)
_例_ _例_
\code \code
@ -145,9 +145,10 @@ int wc_AesCmacVerify(const byte* check, word32 checkSz,
/*! /*!
\ingroup CMAC \ingroup CMAC
\brief ハードウェアがシングル ショットを必要とし、更新をメモリにキャッシュする必要がある場合にのみ、WOLFSSL_HASH_KEEP で使用されます \brief WOLFSSL_HASH_KEEPマクロ定義時のみ使用可能。ハードウェアがシングルショットを必要とし、更新をメモリにキャッシュする必要がある場合に使用します
\return 成功したら 0 を返 \return 成功したら0を返しま
処理する入力データの \param \param cmac Cmac構造体へのポインタ
\param in 処理する入力データへのポインタ
\param inSz 入力データのサイズ \param inSz 入力データのサイズ
_例_ _例_

View File

@ -1,11 +1,17 @@
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は秘密鍵からED25519公開鍵を生成します。公開鍵をバッファPubkeyに格納し、Pubkeyszでこのバッファに書き込まれたバイトを設定します。 \brief この関数はEd25519秘密鍵からEd25519公開鍵を生成します。公開鍵をバッファpubkeyに出力します。
この関数の呼び出しに先立ち、ed25519_key構造体にはEd25519秘密鍵がインポートされている必要があります。
\return 0 公開鍵の作成に成功したときに返されます。 \return 0 公開鍵の作成に成功したときに返されます。
\return BAD_FUNC_ARG IFIキーまたはPubKeyがNULLに評価された場合、または指定されたキーサイズが32バイトではない場合ED25519に32バイトのキーがあります \return BAD_FUNC_ARG 引数keyまたはpubKeyがNULL場合、または指定されたサイズが32バイトではない場合ED25519に32バイトのキーがあります
\return MEMORY_E 関数の実行中にメモリを割り当てるエラーがある場合に返されます。 \return ECC_PRIV_KEY_E ed25519_key構造体にEd25519秘密鍵がインポートされていない場合に返されます。
\param [in] キーを生成するED25519_Keyへのキーポインタ \return MEMORY_E 関数の実行中にメモリを割り当てエラーがある場合に返されます
\param [out] 公開鍵を保存するバッファへのポインタ。
\param [in] key Ed25519秘密鍵がインポートされているed25519_key構造体へのポインタ。
\param [out] pubKey 公開鍵を出力するバッファへのポインタ。
\param [in] pubKeySz バッファのサイズ。常にED25519_PUB_KEY_SIZE(32)でなければなりません。
_Example_ _Example_
\code \code
int ret; int ret;
@ -31,13 +37,14 @@ int wc_ed25519_make_public(ed25519_key* key, unsigned char* pubKey,
word32 pubKeySz); word32 pubKeySz);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は新しいED25519キーを生成し、それをキーに格納します。 \brief この関数は新しいed25519_key構造体を生成し、それを引数keyのバッファに格納します。
\return 0 ED25519_KEYを正常に行うと返されます。 \return 0 ed25519_key構造体を正常に生成すると返されます。
\return BAD_FUNC_ARG RNGまたはKEYがNULLに評価された場合、または指定されたキーサイズが32バイトではない場合ED25519に32バイトのキーがあります \return BAD_FUNC_ARG RNGまたはKEYがNULLに評価された場合、または指定されたkeysizeが32バイトではない場合(Ed25519鍵には常に32バイトを指定する必要があります)
\return MEMORY_E 関数の実行中にメモリ割り当てエラーがある場合に返されます。 \return MEMORY_E 関数の実行中にメモリ割り当てエラーが発生した場合に返されます。
\param [in] RNGキーを生成する初期化されたRNGオブジェクトへのポインタ。 \param [in] rng RNGキーを生成する初期化されたRNGオブジェクトへのポインタ。
\param [in] keysize keyの長さを生成します。ED25519の場合は常に32になります。 \param [in] keysize keyの長さ。ED25519の場合は常に32になります。
_Example_ _Example_
\code \code
int ret; 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); int wc_ed25519_make_key(WC_RNG* rng, int keysize, ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519_Keyオブジェクトを使用して認証を保証するメッセージに署名します。 \brief この関数は、ed25519_key構造体を使用してメッセージに署名します。
\return 0 メッセージの署名を正常に生成すると返されます。 \return 0 メッセージの署名を正常に生成すると返されます。
\return BAD_FUNC_ARG 入力パラメータのいずれかがNULLに評価された場合、または出力バッファが小さすぎて生成された署名を保存する場合は返されます。 \return BAD_FUNC_ARG 入力パラメータのいずれかがNULLに評価された場合、または出力バッファが小さすぎて生成された署名を保存する場合は返されます。
\return MEMORY_E 関数の実行中にメモリ割り当てエラーがある場合に返されます。 \return MEMORY_E 関数の実行中にメモリ割り当てエラーが発生した場合に返されます。
\param [in] 署名するメッセージを含むバッファへのポインタ。
\param [in] 署名するメッセージのインレル長 \param [in] in 署名するメッセージを含むバッファへのポインタ
\param [out] 生成された署名を格納するためのバッファー。 \param [in] inlen 署名するメッセージのサイズ
\param [in,out] 出力バッファの最大長の範囲内。メッセージ署名の生成に成功したときに、書き込まれたバイトを保存します \param [out] out 生成された署名を格納するためのバッファ
\param [in,out] outlen 出力バッファの最大長。メッセージ署名の生成に成功したときに、書き込まれたバイト数を保持します。
\param [in] key 署名を生成するために使用する秘密鍵を保持しているed25519_key構造体へのポインタ。
_Example_ _Example_
\code \code
ed25519_key key; ed25519_key key;
@ -95,17 +105,20 @@ int wc_ed25519_sign_msg(const byte* in, word32 inlen, byte* out,
word32 *outlen, ed25519_key* key); word32 *outlen, ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519_Keyオブジェクトを使用して認証を保証するメッセージに署名します。コンテキストは署名されたデータの一部です。 \brief この関数は、ed25519_key構造体を使用してメッセージに署名します。
コンテキストは署名されるデータの一部です。
\return 0 メッセージの署名を正常に生成すると返されます。 \return 0 メッセージの署名を正常に生成すると返されます。
\return BAD_FUNC_ARG 返された入力パラメータはNULLに評価されます。出力バッファが小さすぎて生成された署名を保存するには小さすぎます。 \return BAD_FUNC_ARG 返された入力パラメータはNULLに評価されます。出力バッファが小さすぎて生成された署名を保存するには小さすぎます。
\return MEMORY_E 関数の実行中にメモリ割り当てエラーがある場合に返されます。 \return MEMORY_E 関数の実行中にメモリ割り当てエラーが発生した場合に返されます。
\param [in] 署名するメッセージを含むバッファへのポインタ。 \param [in] in 署名するメッセージを含むバッファへのポインタ。
\param [in] 署名するメッセージのインレル長。 \param [in] inlen 署名するメッセージのサイズ
\param [out] 生成された署名を格納するためのバッファ \param [out] out 生成された署名を格納するためのバッファ。
\param [in,out] 出力バッファの最大長の範囲内。メッセージ署名の生成に成功したときに、書き込まれたバイトを保存します。 \param [in,out] outlen 出力バッファの最大長。メッセージ署名の生成に成功したときに、書き込まれたバイトを保存します。
\param [in] 署名を生成するプライベートED25519_KEYへのキーポインタ。 \param [in] key 署名を生成するために使用する秘密鍵を保持しているed25519_key構造体へのポインタ。
\param [in] メッセージが署名されているコンテキストを含むバッファへのコンテキストポインタ。 \param [in] context メッセージが署名されているコンテキストを含むバッファへのポインタ。
\param [in] contextLen コンテキストバッファのサイズ
_Example_ _Example_
\code \code
ed25519_key key; ed25519_key key;
@ -137,17 +150,24 @@ int wc_ed25519ctx_sign_msg(const byte* in, word32 inlen, byte* out,
const byte* context, byte contextLen); const byte* context, byte contextLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519_Keyオブジェクトを使用してメッセージダイジェストに署名して信頼性を保証します。コンテキストは署名されたデータの一部として含まれています。署名計算の前にメッセージは事前にハッシュされています。メッセージダイジェストを作成するために使用されるハッシュアルゴリズムはShake-256でなければなりません \brief この関数は、ed25519_key構造体を使用してメッセージダイジェストに署名します
コンテキストは署名されるデータの一部として含まれています。
署名計算の前にメッセージは事前にハッシュされています。
メッセージダイジェストを作成するために使用されるハッシュアルゴリズムはShake-256でなければなりません。
\return 0 メッセージダイジェストの署名を正常に生成すると返されます。 \return 0 メッセージダイジェストの署名を正常に生成すると返されます。
\return BAD_FUNC_ARG 返された入力パラメータはNULLに評価されます。出力バッファが小さすぎて生成された署名を保存するには小さすぎます。 \return BAD_FUNC_ARG 返された入力パラメータはNULLに評価されます。出力バッファが小さすぎて生成された署名を保存するには小さすぎます。
\return MEMORY_E 関数の実行中にメモリ割り当てエラーがある場合に返されます。 \return MEMORY_E 関数の実行中にメモリ割り当てエラーが発生した場合に返されます。
\param [in] サインへのメッセージのハッシュを含むバッファへのハッシュポインタ。
\param [in] サインへのメッセージのハッシュのハッシュの長さ \param [in] hash 署名するメッセージのハッシュを含むバッファへのポインタ
\param [out] 生成された署名を格納するためのバッファー。 \param [in] hashLen 署名するメッセージのハッシュのサイズ
\param [in,out] 出力バッファの最大長の範囲内。メッセージ署名の生成に成功したときに、書き込まれたバイトを保存します \param [out] out 生成された署名を格納するためのバッファ
\param [in] 署名生成するプライベートED25519_KEYへのキーポインタ \param [in,out] outlen 出力バッファの最大長。メッセージ署名生成に成功したときに、書き込まれたバイトを保存します
\param [in] メッセージが署名されているコンテキストを含むバッファへのコンテキストポインタ。 \param [in] key 署名を生成するのに使用する秘密鍵を含んだed25519_key構造体へのポインタ。
\param [in] context メッセージが署名されているコンテキストを含むバッファへのポインタ。
\param [in] contextLen コンテキストバッファのサイズ
_Example_ _Example_
\code \code
ed25519_key key; ed25519_key key;
@ -179,17 +199,19 @@ int wc_ed25519ph_sign_hash(const byte* hash, word32 hashLen, byte* out,
const byte* context, byte contextLen); const byte* context, byte contextLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519_Keyオブジェクトを使用して認証を保証するメッセージに署名します。コンテキストは署名されたデータの一部として含まれています。署名計算の前にメッセージは事前にハッシュされています。 \brief この関数は、ed25519_key構造体を使用して認証を保証するメッセージに署名します。コンテキストは署名されたデータの一部として含まれています。署名計算の前にメッセージは事前にハッシュされています。
\return 0 メッセージの署名を正常に生成すると返されます。 \return 0 メッセージの署名を正常に生成すると返されます。
\return BAD_FUNC_ARG 返された入力パラメータはNULLに評価されます。出力バッファが小さすぎて生成された署名を保存するには小さすぎます。 \return BAD_FUNC_ARG 返された入力パラメータはNULLに評価されます。出力バッファが小さすぎて生成された署名を保存するには小さすぎます。
\return MEMORY_E 関数の実行中にメモリを割り当てエラーがある場合に返されます。 \return MEMORY_E 関数の実行中にメモリを割り当てエラーが発生した場合に返されます。
\param [in] 署名するメッセージを含むバッファへのポインタ。 \param [in] in 署名するメッセージを含むバッファへのポインタ。
\param [in] 署名するメッセージのインレル長。 \param [in] inlen 署名するメッセージのインレル長。
\param [out] 生成された署名を格納するためのバッファ \param [out] out 生成された署名を格納するためのバッファ。
\param [in,out] 出力バッファの最大長の範囲内。メッセージ署名の生成に成功したときに、書き込まれたバイトを保存します。 \param [in,out] outlen 出力バッファの最大長。メッセージ署名の生成に成功したときに、書き込まれたバイトを保存します。
\param [in] 署名を生成するプライベートED25519_KEYへのキーポインタ。 \param [in] key 署名を生成するプライベートed25519_key構造体へのポインタ。
\param [in] メッセージが署名されているコンテキストを含むバッファへのコンテキストポインタ。 \param [in] context メッセージが署名されているコンテキストを含むバッファへのポインタ。
\param [in] contextLen コンテキストバッファのサイズ
_Example_ _Example_
\code \code
ed25519_key key; ed25519_key key;
@ -221,16 +243,21 @@ int wc_ed25519ph_sign_msg(const byte* in, word32 inlen, byte* out,
const byte* context, byte contextLen); const byte* context, byte contextLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数はメッセージのED25519署名を確認して信頼性を確保します。RESを介して答えを返し、有効な署名に対応する1、無効な署名に対応する0を返します。 \brief この関数はメッセージのEd25519署名を検証します。
retを介して答えを返し、有効な署名の場合は1、無効な署名の場合には0を返します。
\return 0 署名検証と認証を正常に実行したときに返されます。 \return 0 署名検証と認証を正常に実行したときに返されます。
\return BAD_FUNC_ARG いずれかの入力パラメータがNULLに評価された場合、またはSIGLENが署名の実際の長さと一致しない場合に返されます。 \return BAD_FUNC_ARG いずれかの入力パラメータがNULLに評価された場合、またはSIGLENが署名の実際の長さと一致しない場合に返されます。
\return SIG_VERIFY_E 検証が完了した場合は返されますが、生成された署名は提供された署名と一致しません。 \return SIG_VERIFY_E 検証が完了した場合は返されますが、生成された署名は提供された署名と一致しません。
\param [in] 検証するシグネチャを含むバッファへのSIGポインタ。
\param [in] 検証するシグネチャのシグレンの長さ \param [in] sig 検証するシグネチャを含むバッファへのポインタ
\param [in] メッセージを含むバッファへのMSGポインタを確認する。 \param [in] siglen 検証するシグネチャのサイズ
\param [in] 検証するメッセージのMSGlen長。 \param [in] msg メッセージを含むバッファへのポインタ
\param [out] 検証の結果へのRESポインタ。1メッセージが正常に検証されたことを示します。 \param [in] msgLen 検証するメッセージのサイズ
\param [out] ret 検証の結果を格納する変数へのポインタ。1はメッセージが正常に検証されたことを示します。
\param [in] key 署名を検証するためのEd25519公開鍵へのポインタ。
_Example_ _Example_
\code \code
ed25519_key key; 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); word32 msgLen, int* ret, ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数はメッセージのED25519署名を確認して信頼性を確保します。文脈はデータ検証済みの一部として含まれています。RESを介して答えを返し、有効な署名に対応する1、無効な署名に対応する0を返します。 \brief この関数はメッセージのEd25519署名を検証します。
コンテキストは署名されたデータの一部として含まれています。
答えは変数retを介して返され、署名が有効ならば1、無効ならば0を返します。
\return 0 署名検証と認証を正常に実行したときに返されます。 \return 0 署名検証と認証を正常に実行したときに返されます。
\return BAD_FUNC_ARG いずれかの入力パラメータがNULLに評価された場合、またはSIGLENが署名の実際の長さと一致しない場合に返されます。 \return BAD_FUNC_ARG いずれかの入力パラメータがNULLに評価された場合、またはSIGLENが署名の実際の長さと一致しない場合に返されます。
\return SIG_VERIFY_E 検証が完了した場合は返されますが、生成された署名は提供された署名と一致しません。 \return SIG_VERIFY_E 検証が完了した場合は返されますが、生成された署名は提供された署名と一致しません。
\param [in] 検証するシグネチャを含むバッファへのSIGポインタ。
\param [in] 検証するシグネチャのシグレンの長さ \param [in] sig 検証するシグネチャを含むバッファへのポインタ
\param [in] メッセージを含むバッファへのMSGポインタを確認する。 \param [in] siglen 検証するシグネチャのサイズ
\param [in] 検証するメッセージのMSGlen長。 \param [in] msg メッセージを含むバッファへのポインタ
\param [out] 検証の結果へのRESポインタ。1メッセージが正常に検証されたことを示します。 \param [in] msgLen 検証するメッセージのサイズ
\param [in] 署名を検証するためのPublic ED25519キーへのキーポインタ \param [out] ret 検証の結果を格納する変数へのポインタ。1はメッセージが正常に検証されたことを示します
\param [in] メッセージが署名されたコンテキストを含むバッファへのコンテキストポインタ。 \param [in] key 署名を検証するためのEd25519公開鍵へのポインタ。
\param [in] context メッセージが署名されているコンテキストを含むバッファへのポインタ。
\param [in] contextLen コンテキストバッファのサイズ
_Example_ _Example_
\code \code
ed25519_key key; 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); const byte* context, byte contextLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、メッセージのダイジェストのED25519シグネチャを確認して、信頼性を確保します。文脈はデータ検証済みの一部として含まれています。ハッシュは、署名計算前のプリハッシュメッセージです。メッセージダイジェストを作成するために使用されるハッシュアルゴリズムはSHA-512でなければなりません。答えはRESを介して返され、有効な署名に対応する1、無効な署名に対応する0を返します。 \brief この関数は、メッセージのダイジェストのEd25519署名を検証します。
引数hashは、署名計算前のプリハッシュメッセージです。
メッセージダイジェストを作成するために使用されるハッシュアルゴリズムはSHA-512でなければなりません。
答えは変数retを介して返され、署名が有効ならば1、無効ならば0を返します。
\return 0 署名検証と認証を正常に実行したときに返されます。 \return 0 署名検証と認証を正常に実行したときに返されます。
\return BAD_FUNC_ARG いずれかの入力パラメータがNULLに評価された場合、またはSIGLENが署名の実際の長さと一致しない場合に返されます。 \return BAD_FUNC_ARG いずれかの入力パラメータがNULLに評価された場合、またはSIGLENが署名の実際の長さと一致しない場合に返されます。
\return SIG_VERIFY_E 検証が完了した場合は返されますが、生成された署名は提供された署名と一致しません。 \return SIG_VERIFY_E 検証が完了した場合は返されますが、生成された署名は提供された署名と一致しません。
\param [in] 検証するシグネチャを含むバッファへのSIGポインタ。
\param [in] 検証するシグネチャのシグレンの長さ \param [in] sig 検証するシグネチャを含むバッファへのポインタ
\param [in] 検証するメッセージのハッシュを含むバッファへのハッシュポインタ。 \param [in] siglen 検証するシグネチャのサイズ
\param [in] 検証するハッシュのハッシュレン長。 \param [in] msg メッセージを含むバッファへのポインタ
\param [out] 検証の結果へのRESポインタ。1メッセージが正常に検証されたことを示します。 \param [in] msgLen 検証するメッセージのサイズ
\param [in] 署名を検証するためのPublic ED25519キーへのキーポインタ \param [out] ret 検証の結果を格納する変数へのポインタ。1はメッセージが正常に検証されたことを示します
\param [in] メッセージが署名されたコンテキストを含むバッファへのコンテキストポインタ。 \param [in] key 署名を検証するためのEd25519公開鍵へのポインタ。
\param [in] context メッセージが署名されたコンテキストを含むバッファへのポインタ。
\param [in] contextLen コンテキストのサイズ
_Example_ _Example_
\code \code
ed25519_key key; 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); const byte* context, byte contextLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数はメッセージのED25519署名を確認して信頼性を確保します。文脈はデータ検証済みの一部として含まれています。検証前にメッセージがプリハッシュされています。RESを介して答えを返し、有効な署名に対応する1、無効な署名に対応する0を返します。 \brief この関数はメッセージのダイジェストのEd25519署名を検証します。
引数contextは検証すべきデータの一部として含まれています。
検証前にメッセージがプリハッシュされています。
答えは変数resを介して返され、署名が有効ならば1、無効ならば0を返します。
\return 0 署名検証と認証を正常に実行したときに返されます。 \return 0 署名検証と認証を正常に実行したときに返されます。
\return BAD_FUNC_ARG いずれかの入力パラメータがNULLに評価された場合、またはSIGLENが署名の実際の長さと一致しない場合に返されます。 \return BAD_FUNC_ARG いずれかの入力パラメータがNULLに評価された場合、またはSIGLENが署名の実際の長さと一致しない場合に返されます。
\return SIG_VERIFY_E 検証が完了した場合は返されますが、生成された署名は提供された署名と一致しません。 \return SIG_VERIFY_E 検証が完了した場合は返されますが、生成された署名は提供された署名と一致しません。
\param [in] 検証するシグネチャを含むバッファへのSIGポインタ。 \param [in] sig 検証するシグネチャを含むバッファへのポインタ。
\param [in] 検証するシグネチャのシグレンの長さ。 \param [in] siglen 検証するシグネチャのサイズ
\param [in] メッセージを含むバッファへのMSGポインタを確認する。 \param [in] msg メッセージを含むバッファへのポインタ
\param [in] 検証するメッセージのMSGlen長。 \param [in] msgLen 検証するメッセージのサイズ
\param [out] 検証の結果へのRESポインタ。1メッセージが正常に検証されたことを示します。 \param [out] ret 検証の結果を格納する変数へのポインタ。1メッセージが正常に検証されたことを示します。
\param [in] 署名を検証するためのPublic ED25519キーへのキーポインタ。 \param [in] key 署名を検証するためのEd25519公開鍵へのポインタ。
\param [in] メッセージが署名されたコンテキストを含むバッファへのコンテキストポインタ。 \param [in] context メッセージが署名されたコンテキストを含むバッファへのポインタ。
\param [in] contextLen コンテキストのサイズ
_Example_ _Example_
\code \code
ed25519_key key; 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); const byte* context, byte contextLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、メッセージ検証で将来の使用のためにED25519_Keyオブジェクトを初期化します。 \brief この関数は、後のメッセージ検証で使用のためにed25519_key構造体を初期化します。
\return 0 ED25519_Keyオブジェクトの初期化に成功したときに返されます。 \return 0 ed25519_key構造体の初期化に成功したときに返されます。
\return BAD_FUNC_ARG キーがNULLの場合返されます。 \return BAD_FUNC_ARG 引数keyがNULLの場合返されます。
\param [in,out] key ed25519_key構造体へのポインタ
_Example_ _Example_
\code \code
ed25519_key key; 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); int wc_ed25519_init(ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、使用された後にED25519オブジェクトを解放します。 \brief この関数は、使用済みのed25519_key構造体を解放します。
\param [in,out] key ed25519_key構造体へのポインタ
_Example_ _Example_
\code \code
ed25519_key key; ed25519_key key;
@ -408,12 +458,16 @@ int wc_ed25519_init(ed25519_key* key);
void wc_ed25519_free(ed25519_key* key); void wc_ed25519_free(ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、公開鍵を含むバッファからPublic ED25519_Keyペアをインポートします。この関数は圧縮キーと非圧縮キーの両方を処理します。 \brief この関数はバッファからed25519公開鍵をed25519_key構造体へインポートします。
\return 0 ED25519_KEYのインポートに成功しました 圧縮あるいは非圧縮の両方の形式の鍵を扱います
\return BAD_FUNC_ARG inまたはkeyがnullに評価された場合、またはInlenがED25519キーのサイズよりも小さい場合に返されます。 \return 0 ed25519公開鍵のインポートに成功した場合に返されます。
\param [in] 公開鍵を含むバッファへのポインタ \return BAD_FUNC_ARG inまたはkeyがnullに評価された場合、またはinlenがED25519鍵のサイズよりも小さい場合に返されます
\param [in] 公開鍵を含むバッファのインレル長。
\param [in] in 公開鍵を含んだバッファへのポインタ
\param [in] inLen 公開鍵を含んだバッファのサイズ
\param [in,out] key ed25519_key構造体へのポインタ
_Example_ _Example_
\code \code
int ret; int ret;
@ -426,21 +480,61 @@ void wc_ed25519_free(ed25519_key* key);
// error importing key // error importing key
} }
\endcode \endcode
\sa wc_ed25519_import_public_ex
\sa wc_ed25519_import_private_key \sa wc_ed25519_import_private_key
\sa wc_ed25519_import_private_key_ex
\sa wc_ed25519_export_public \sa wc_ed25519_export_public
*/ */
int wc_ed25519_import_public(const byte* in, word32 inLen, ed25519_key* key); int wc_ed25519_import_public(const byte* in, word32 inLen, ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ed25519秘密鍵をバッファからのみインポートします。
\return 0 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と異なる場合に返されます。 \return BAD_FUNC_ARG privまたはkeyがNULLに評価された場合、またはprivSzがED25519_KEY_SIZEと異なる場合に返されます。
\param [in] 秘密鍵を含むバッファへのPRIVポインタ。 \param [in] priv 秘密鍵を含むバッファへのポインタ。
\param [in] 秘密鍵のPrivsz長さ。 \param [in] privSz 秘密鍵を含むバッファのサイズ
\param [in] 公開鍵を含むバッファへのPubポインタ。
\param [in] 公開鍵のPubszの長さ。
_Example_ _Example_
\code \code
int ret; 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_import_private_key
\sa wc_ed25519_export_private_only \sa wc_ed25519_export_private_only
*/ */
int wc_ed25519_import_private_only(const byte* priv, word32 privSz, int wc_ed25519_import_private_only(const byte* priv, word32 privSz,
ed25519_key* key); ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、一対のバッファからパブリック/プライベートED25519キーペアをインポートします。この関数は圧縮キーと非圧縮キーの両方を処理します。 \brief この関数は、Ed25519公開鍵/秘密鍵をそれぞれ含む一対のバッファからEd25519ペアをインポートします。
\return 0 ED25519_KEYのインポートに成功しました この関数は圧縮と非圧縮の両方の鍵を処理します
\return 0 Ed25519_KEYのインポートに成功しました。
\return BAD_FUNC_ARG privまたはkeyがNULLに評価された場合、privSzがED25519_KEY_SIZEと異なるあるいはED25519_PRV_KEY_SIZEとも異なる場合、pubSzがED25519_PUB_KEY_SIZEよりも小さい場合に返されます。 \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] priv 秘密鍵を含むバッファへのポインタ。
\param [in] 秘密鍵のPrivsz長さ。 \param [in] privSz 秘密鍵バッファのサイズ
\param [in] 公開鍵を含むバッファへのPubポインタ。 \param [in] pub 公開鍵を含むバッファへのポインタ。
\param [in] 公開鍵のPubszの長さ。 \param [in] pubSz 公開鍵バッファのサイズ
_Example_ _Example_
\code \code
int ret; int ret;
@ -497,12 +593,13 @@ int wc_ed25519_import_private_key(const byte* priv, word32 privSz,
\brief この関数は一対のバッファからEd25519公開鍵/秘密鍵ペアをインポートします。この関数は圧縮キーと非圧縮キーの両方を処理します。公開鍵はtrusted引数により信頼されていないとされた場合には秘密鍵に対して検証されます。 \brief この関数は一対のバッファからEd25519公開鍵/秘密鍵ペアをインポートします。この関数は圧縮キーと非圧縮キーの両方を処理します。公開鍵はtrusted引数により信頼されていないとされた場合には秘密鍵に対して検証されます。
\return 0 ed25519_keyのインポートに成功しました。 \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より小さい場合に返されます。 \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] privSz 秘密鍵バッファのサイズ
\param [in] pub 公開鍵を保持するバッファへのポインタ \param [in] pub 公開鍵を保持するバッファへのポインタ
\param [in] pubSz 公開鍵バッファのサイズ \param [in] pubSz 公開鍵バッファのサイズ
\param [in,out] key インポートされた公開鍵/秘密鍵を保持するed25519_keyオブジェクトへのポインター \param [in,out] key インポートされた公開鍵/秘密鍵を保持するed25519_keyオブジェクトへのポインター
\param [in] trusted 公開鍵が信頼できるか否か \param [in] trusted 公開鍵が信頼できるか否かを指定するフラグ
_Example_ _Example_
\code \code
int ret; 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); const byte* pub, word32 pubSz, ed25519_key* key, int trusted);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、秘密鍵をED25519_Key構造体からエクスポートします。公開鍵をバッファアウトに格納し、ounterenこのバッファに書き込まれたバイトを設定します。 \brief この関数は、ed25519_key構造体から公開鍵をエクスポートします。公開鍵をバッファoutに格納し、outLenこのバッファに書き込まれたバイトを設定します。
\return 0 公開鍵のエクスポートに成功したら返されます。 \return 0 公開鍵のエクスポートに成功したら返されます。
\return BAD_FUNC_ARG いずれかの入力値がNULLに評価された場合に返されます。 \return BAD_FUNC_ARG いずれかの入力値がNULLに評価された場合に返されます。
\return BUFFER_E 提供されたバッファーが秘密鍵を保存するのに十分な大きさでない場合に返されます。このエラーを返すと、outlenに必要なサイズを設定します。 \return BUFFER_E 提供されたバッファーが公開鍵を保存するのに十分な大きさでない場合に返されます。このエラーを返すと、outlenに必要なサイズを設定します。
\param [in] 公開鍵をエクスポートするためのED25519_Key構造体へのキーポインタ。 \param [in] key 公開鍵をエクスポートするためのed25519_key構造体へのポインタ。
\param [out] 公開鍵を保存するバッファへのポインタ。 \param [out] out 公開鍵を保存するバッファへのポインタ。
\param [in,out] outLen 公開鍵を出力する先のバッファサイズを格納するword32型変数へのポインタ。
入力の際はバッファサイズを格納して渡し、出力の際はエクスポートした公開鍵のサイズを格納します。
_Example_ _Example_
\code \code
int ret; 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); int wc_ed25519_export_public(ed25519_key* key, byte* out, word32* outLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519_Key構造体からの秘密鍵のみをエクスポートします。秘密鍵をバッファアウトに格納し、outlenにこのバッファに書き込まれたバイトを設定します。 \brief この関数は、ed25519_key構造体からの秘密鍵のみをエクスポートします。秘密鍵をバッファアウトに格納し、outlenにこのバッファに書き込まれたバイトを設定します。
\return 0 秘密鍵のエクスポートに成功したら返されます。 \return 0 秘密鍵のエクスポートに成功したら返されます。
\return BAD_FUNC_ARG いずれかの入力値がNULLに評価された場合に返されます。 \return BAD_FUNC_ARG いずれかの入力値がNULLに評価された場合に返されます。
\return BUFFER_E 提供されたバッファーが秘密鍵を保存するのに十分な大きさでない場合に返されます。 \return BUFFER_E 提供されたバッファーが秘密鍵を保存するのに十分な大きさでない場合に返されます。
\param [in] 秘密鍵をエクスポートするためのED25519_Key構造体へのキーポインタ。 \param [in] key 秘密鍵をエクスポートするためのed25519_key構造体へのポインタ。
\param [out] 秘密鍵を保存するバッファへのポインタ。 \param [out] out 秘密鍵を保存するバッファへのポインタ。
\param [in,out] outLen 秘密鍵を出力する先のバッファサイズを格納するword32型変数へのポインタ。
入力の際はバッファサイズを格納して渡し、出力の際はエクスポートした秘密鍵のサイズを格納します。
_Example_ _Example_
\code \code
int ret; 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); int wc_ed25519_export_private_only(ed25519_key* key, byte* out, word32* outLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519_Key構造体からキーペアをエクスポートします。キーペアをバッファOUTに格納し、ounterenでこのバッファに書き込まれたバイトを設定します。 \brief この関数は、ed25519_key構造体からペアをエクスポートします。ペアをバッファoutに格納し、ounterenでこのバッファに書き込まれたバイトを設定します。
\return 0 キーペアのエクスポートに成功したら返されます。 \return 0 ペアのエクスポートに成功したら返されます。
\return BAD_FUNC_ARG いずれかの入力値がNULLに評価された場合に返されます。 \return BAD_FUNC_ARG いずれかの入力値がNULLに評価された場合に返されます。
\return BUFFER_E 提供されているバッファーがキーペアを保存するのに十分な大きさでない場合に返されます。 \return BUFFER_E 提供されているバッファーがペアを保存するのに十分な大きさでない場合に返されます。
\param [in] キーペアをエクスポートするためのED25519_Key構造体へのキーポインタ。 \param [in] ペアをエクスポートするためのed25519_key構造体へのポインタ。
\param [out] キーペアを保存するバッファへのポインタ。 \param [out] ペアを保存するバッファへのポインタ。
\param [in,out] outLen 鍵ペアを出力する先のバッファサイズを格納するword32型変数へのポインタ。
入力の際はバッファサイズを格納して渡し、出力の際はエクスポートした鍵ペアのサイズを格納します。
_Example_ _Example_
\code \code
ed25519_key key; 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); int wc_ed25519_export_private(ed25519_key* key, byte* out, word32* outLen);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519_KEY構造体とは別にプライベートキーと公開鍵をエクスポートします。秘密鍵をバッファーPrivに格納し、PRIVSZでこのバッファに書き込まれたバイトを設定します。公開鍵をバッファPUBに格納し、Pubszでこのバッファに書き込まれたバイトを設定します。 \brief この関数は、ed25519_key構造体から秘密鍵と公開鍵を別々にエクスポートします。
\return 0 キーペアのエクスポートに成功したら返されます。 秘密鍵をバッファprivに格納し、priovSzにこのバッファに書き込んだバイト数を設定します。
公開鍵をバッファpubに格納し、pubSzにこのバッファに書き込んだバイト数を設定します。
\return 0 鍵ペアのエクスポートに成功したら返されます。
\return BAD_FUNC_ARG いずれかの入力値がNULLに評価された場合に返されます。 \return BAD_FUNC_ARG いずれかの入力値がNULLに評価された場合に返されます。
\return BUFFER_E 提供されているバッファーがキーペアを保存するのに十分な大きさでない場合に返されます。 \return BUFFER_E 提供されているバッファが鍵ペアを保存するのに十分な大きさでない場合に返されます。
\param [in] キーペアをエクスポートするためのED25519_Key構造体へのキーポインタ。 \param [in] key 鍵ペアをエクスポートするためのed25519_key構造体へのポインタ。
\param [out] 秘密鍵を保存するバッファへのPRIVポインタ。 \param [out] priv 秘密鍵を出力するバッファへのポインタ。
\param [in,out] PRIVSZ PIVINSZポインタサイズが表示されているサイズを持つWord32オブジェクトへのポインタ。秘密鍵のエクスポート後に書き込まれたバイト数を設定します \param [in,out] privSz 秘密鍵を出力する先のバッファのサイズを保持するword32型変数へのポインタ
\param [out] パブリックキーを保存するバッファへのPub 秘密鍵のエクスポート後には書き込まれたバイト数がセットされます
\param [out] pub パブリックキーを出力するバッファへのポインタ
\param [in,out] pubSz 公開鍵を出力する先のバッファのサイズを保持するword32型変数へのポインタ。
公開鍵のエクスポート後には書き込まれたバイト数がセットされます。
_Example_ _Example_
\code \code
int ret; int ret;
@ -647,11 +759,13 @@ int wc_ed25519_export_key(ed25519_key* key,
byte* pub, word32 *pubSz); byte* pub, word32 *pubSz);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519_KEY構造体の公開鍵をチェックします。 \brief この関数は、ed25519_key構造体の公開鍵をチェックします。
\return 0 プライベートキーと公開鍵が一致した場合に返されます。 \return 0 プライベートキーと公開鍵が一致した場合に返されます。
\return BAD_FUNC_ARG 与えられた鍵がNULLの場合に返されます。 \return BAD_FUNC_ARG 与えられた鍵がNULLの場合に返されます。
\return PUBLIC_KEY_E 公開鍵が参照できないか無効の場合に返されます。 \return PUBLIC_KEY_E 公開鍵が参照できないか無効の場合に返されます。
\param [in] key 公開鍵と秘密鍵の両方を保持しているed25519_key構造体へのポインタ
_Example_ _Example_
\code \code
int ret; int ret;
@ -672,10 +786,13 @@ int wc_ed25519_export_key(ed25519_key* key,
int wc_ed25519_check_key(ed25519_key* key); int wc_ed25519_check_key(ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519 - 32バイトのサイズを返します。 \brief この関数は、Ed25519 - 32バイトのサイズを返します。
\return ED25519_KEY_SIZE 有効な秘密鍵のサイズ32バイト \return ED25519_KEY_SIZE 有効な秘密鍵のサイズ32バイト
\return BAD_FUNC_ARG 与えられたキーがNULLの場合に返されます。 \return BAD_FUNC_ARG 与えられた引数keyがNULLの場合に返されます。
\param [in] key ed25519_key構造体へのポインタ
_Example_ _Example_
\code \code
int keySz; int keySz;
@ -692,10 +809,12 @@ int wc_ed25519_check_key(ed25519_key* key);
int wc_ed25519_size(ed25519_key* key); int wc_ed25519_size(ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、秘密鍵サイズsecret + publicをバイト単位で返します。 \brief この関数は、秘密鍵サイズsecret + publicをバイト単位で返します。
\return ED25519_PRV_KEY_SIZE 秘密鍵のサイズ64バイト \return ED25519_PRV_KEY_SIZE 秘密鍵のサイズ64バイト
\return BAD_FUNC_ARG key引数がnullの場合に返されます。 \return BAD_FUNC_ARG key引数がnullの場合に返されます。
\param [in] key ed25519_key構造体へのポインタ
_Example_ _Example_
\code \code
ed25519_key key; ed25519_key key;
@ -713,10 +832,12 @@ int wc_ed25519_size(ed25519_key* key);
int wc_ed25519_priv_size(ed25519_key* key); int wc_ed25519_priv_size(ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は圧縮鍵サイズをバイト単位で返します(公開鍵)。 \brief この関数は圧縮鍵サイズをバイト単位で返します(公開鍵)。
\return ED25519_PUB_KEY_SIZE 圧縮公開鍵のサイズ32バイト \return ED25519_PUB_KEY_SIZE 圧縮公開鍵のサイズ32バイト
\return BAD_FUNC_ARG key引数がnullの場合は返します。 \return BAD_FUNC_ARG key引数がnullの場合は返します。
\param [in] key ed25519_key構造体へのポインタ
_Example_ _Example_
\code \code
ed25519_key key; ed25519_key key;
@ -733,10 +854,12 @@ int wc_ed25519_priv_size(ed25519_key* key);
int wc_ed25519_pub_size(ed25519_key* key); int wc_ed25519_pub_size(ed25519_key* key);
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief この関数は、ED25519シグネチャのサイズバイト数64を返します。 \brief この関数は、ED25519シグネチャのサイズバイト数64を返します。
\return ED25519_SIG_SIZE ED25519シグネチャ64バイトのサイズ。 \return ED25519_SIG_SIZE ED25519シグネチャ64バイトのサイズ。
\return BAD_FUNC_ARG key引数がnullの場合は返します。 \return BAD_FUNC_ARG key引数がnullの場合は返します。
\param [in] key ed25519_key構造体へのポインタ
_Example_ _Example_
\code \code
int sigSz; 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; word32 pemSz;
byte* cipher_info[] { Additional cipher info. } 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 \endcode
\sa wc_PemCertToDer \sa wc_PemCertToDer

View File

@ -1,21 +1,21 @@
/*! /*!
\ingroup ED25519 \ingroup ED25519
\brief This function generates the Ed25519 public key from the private key. \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 stored in the ed25519_key object. It stores the public key in the buffer
written to this buffer in pubKeySz. pubKey.
\return 0 Returned upon successfully making the public key. \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). 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 \return MEMORY_E Returned if there is an error allocating memory
during function execution. during function execution.
\param [in] key Pointer to the ed25519_key for which to generate a key. \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 [out] pubKey Pointer to the buffer in which to store the public key.
\param [in,out] outLen Pointer to a word32 object with the size available \param [in] pubKeySz Size of the public key. Should be ED25519_PUB_KEY_SIZE.
in out. Set with the number of bytes written to out after successfully
exporting the public key.
_Example_ _Example_
\code \code
@ -301,7 +301,7 @@ int wc_ed25519ph_sign_msg(const byte* in, word32 inlen, byte* out,
\ingroup ED25519 \ingroup ED25519
\brief This function verifies the Ed25519 signature of a message to ensure \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. a valid signature, and 0 corresponding to an invalid signature.
\return 0 Returned upon successfully performing the 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] siglen Length of the signature to verify.
\param [in] msg Pointer to the buffer containing the message to verify. \param [in] msg Pointer to the buffer containing the message to verify.
\param [in] msgLen Length of 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. message was successfully verified.
\param [in] key Pointer to a public Ed25519 key with which to verify the \param [in] key Pointer to a public Ed25519 key with which to verify the
signature. 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 \brief This function verifies the Ed25519 signature of a message to ensure
authenticity. The context is included as part of the data 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. a valid signature, and 0 corresponding to an invalid signature.
\return 0 Returned upon successfully performing the 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] siglen Length of the signature to verify.
\param [in] msg Pointer to the buffer containing the message to verify. \param [in] msg Pointer to the buffer containing the message to verify.
\param [in] msgLen Length of 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. message was successfully verified.
\param [in] key Pointer to a public Ed25519 key with which to verify the \param [in] key Pointer to a public Ed25519 key with which to verify the
signature. 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 message to ensure authenticity. The context is included as part of the data
verified. The hash is the pre-hashed message before signature calculation. verified. The hash is the pre-hashed message before signature calculation.
The hash algorithm used to create message digest must be SHA-512. 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. 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 \param [in] hash Pointer to the buffer containing the hash of the message
to verify. to verify.
\param [in] hashLen Length of the hash 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. message was successfully verified.
\param [in] key Pointer to a public Ed25519 key with which to verify the \param [in] key Pointer to a public Ed25519 key with which to verify the
signature. 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 \brief This function verifies the Ed25519 signature of a message to ensure
authenticity. The context is included as part of the data authenticity. The context is included as part of the data
verified. The message is pre-hashed before verification. It returns the 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. corresponding to an invalid signature.
\return 0 Returned upon successfully performing the 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] siglen Length of the signature to verify.
\param [in] msg Pointer to the buffer containing the message to verify. \param [in] msg Pointer to the buffer containing the message to verify.
\param [in] msgLen Length of 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. message was successfully verified.
\param [in] key Pointer to a public Ed25519 key with which to verify the \param [in] key Pointer to a public Ed25519 key with which to verify the
signature. signature.
@ -562,7 +562,7 @@ void wc_ed25519_free(ed25519_key* key);
/*! /*!
\ingroup ED25519 \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 containing the public key. This function will handle both compressed and
uncompressed keys. The public key is checked that it matches the private uncompressed keys. The public key is checked that it matches the private
key when one is present. key when one is present.
@ -600,7 +600,7 @@ int wc_ed25519_import_public(const byte* in, word32 inLen, ed25519_key* key);
/*! /*!
\ingroup ED25519 \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 containing the public key. This function will handle both compressed and
uncompressed keys. Check public key matches private key, when present, uncompressed keys. Check public key matches private key, when present,
when not trusted. 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] priv Pointer to the buffer containing the private key.
\param [in] privSz Length of 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 \param [in,out] key Pointer to the ed25519_key object in which to store the
imported private key. 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 \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 In most cases wolfSSL_get1_session should be used instead of
wolfSSL_tls_export. wolfSSL_tls_export.
Additional debug info can be displayed with the macro 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 \sa wolfSSL_use_certificate_chain_file
*/ */
int wolfSSL_CTX_load_verify_locations(WOLFSSL_CTX* ctx, const char* file, int wolfSSL_CTX_load_verify_locations(WOLFSSL_CTX* ctx, const char* file,
const char* format); const char* path);
/*! /*!
\ingroup CertsKeys \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 \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). 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. 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(). \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. a socket file descriptor.
\return SSL_SUCCESS upon success. \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 ssl pointer to the SSL session, created with wolfSSL_new().
\param fd file descriptor to use with SSL/TLS connection. \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. addr and addr_len parameters set to NULL.
\return SSL_SUCCESS upon success. \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 ssl pointer to the SSL session, created with wolfSSL_new().
\param fd file descriptor to use with SSL/TLS connection. \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. \return none No return.
\param ctx pointer to the SSL context, created with wolfSSL_CTX_new(). \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. \param verify_callback callback to be called when verification fails.
If no callback is desired, the NULL pointer can be used for If no callback is desired, the NULL pointer can be used for
verify_callback. verify_callback.
@ -2870,7 +2870,7 @@ void wolfSSL_CTX_set_verify(WOLFSSL_CTX* ctx, int mode,
\return none No return. \return none No return.
\param ssl pointer to the SSL session, created with wolfSSL_new(). \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. \param verify_callback callback to be called when verification fails.
If no callback is desired, the NULL pointer can If no callback is desired, the NULL pointer can
be used for verify_callback. 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 ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
\param cb a SessionSecretCb type that is a function pointer with the above \param cb a SessionSecretCb type that is a function pointer with the above
signature. signature.
\param ctx a pointer to the user context to be stored
_Example_ _Example_
\code \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 FWRITE_ERROR returned if XFWRITE failed to write to the file.
\return BAD_MUTEX_E returned if there was a mutex lock failure. \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_ _Example_
\code \code
@ -3184,7 +3185,7 @@ int wolfSSL_set_session_secret_cb(WOLFSSL* ssl, SessionSecretCb cb, void* ctx);
\sa wolfSSL_restore_session_cache \sa wolfSSL_restore_session_cache
\sa wolfSSL_memrestore_session_cache \sa wolfSSL_memrestore_session_cache
*/ */
int wolfSSL_save_session_cache(const char*); int wolfSSL_save_session_cache(const char* fname);
/*! /*!
\ingroup IO \ingroup IO
@ -3214,7 +3215,7 @@ int wolfSSL_save_session_cache(const char*);
\sa XFREAD \sa XFREAD
\sa XFOPEN \sa XFOPEN
*/ */
int wolfSSL_restore_session_cache(const char*); int wolfSSL_restore_session_cache(const char* fname);
/*! /*!
\ingroup IO \ingroup IO
@ -3312,7 +3313,7 @@ int wolfSSL_get_session_cache_memsize(void);
\param ctx a pointer to a WOLFSSL_CTX structure, holding the \param ctx a pointer to a WOLFSSL_CTX structure, holding the
certificate information. certificate information.
\param fname the cert cache buffer. \param fname a constant char pointer that points to a file for writing.
_Example_ _Example_
\code \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 \param ctx a pointer to a WOLFSSL_CTX structure, holding the certificate
information. information.
\param fname the cert cache buffer. \param fname a constant char pointer that points to a file for reading.
_Example_ _Example_
\code \code
@ -3462,7 +3463,7 @@ int wolfSSL_CTX_memrestore_cert_cache(WOLFSSL_CTX* ctx, const void* mem, int sz
\sa CM_GetCertCacheMemSize \sa CM_GetCertCacheMemSize
*/ */
int wolfSSL_CTX_get_cert_cache_memsize(WOLFSSL_CTX*); int wolfSSL_CTX_get_cert_cache_memsize(WOLFSSL_CTX* ctx);
/*! /*!
\ingroup Setup \ingroup Setup
@ -3599,7 +3600,7 @@ void wolfSSL_dtls_set_using_nonblock(WOLFSSL* ssl, int nonblock);
\sa wolfSSL_dtls_got_timeout \sa wolfSSL_dtls_got_timeout
\sa wolfSSL_dtls_set_using_nonblock \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 \brief This function returns the current timeout value in seconds for
the WOLFSSL object. When using non-blocking sockets, something in the user 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_ERR_print_errors_fp
\sa wolfSSL_load_error_strings \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 \ingroup Debug
@ -3963,7 +3964,7 @@ void wolfSSL_ERR_error_string_n(unsigned long e, char* buf,
structure is within the WOLFSSL structure. structure is within the WOLFSSL structure.
\return 1 SSL_SENT_SHUTDOWN is returned. \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 \param ssl a constant pointer to a WOLFSSL structure, created using
wolfSSL_new(). wolfSSL_new().
@ -3989,7 +3990,7 @@ void wolfSSL_ERR_error_string_n(unsigned long e, char* buf,
\sa wolfSSL_SESSION_free \sa wolfSSL_SESSION_free
*/ */
int wolfSSL_get_shutdown(const WOLFSSL*); int wolfSSL_get_shutdown(const WOLFSSL* ssl);
/*! /*!
\ingroup IO \ingroup IO
@ -4016,7 +4017,7 @@ int wolfSSL_get_shutdown(const WOLFSSL*);
\sa wolfSSL_GetSessionIndex \sa wolfSSL_GetSessionIndex
\sa wolfSSL_memsave_session_cache \sa wolfSSL_memsave_session_cache
*/ */
int wolfSSL_session_reused(WOLFSSL*); int wolfSSL_session_reused(WOLFSSL* ssl);
/*! /*!
\ingroup TLS \ingroup TLS
@ -4046,7 +4047,7 @@ int wolfSSL_session_reused(WOLFSSL*);
\sa wolfSSL_get_keys \sa wolfSSL_get_keys
\sa wolfSSL_set_shutdown \sa wolfSSL_set_shutdown
*/ */
int wolfSSL_is_init_finished(WOLFSSL*); int wolfSSL_is_init_finished(WOLFSSL* ssl);
/*! /*!
\ingroup IO \ingroup IO
@ -4078,7 +4079,7 @@ int wolfSSL_is_init_finished(WOLFSSL*);
\sa wolfSSL_lib_version \sa wolfSSL_lib_version
*/ */
const char* wolfSSL_get_version(WOLFSSL*); const char* wolfSSL_get_version(WOLFSSL* ssl);
/*! /*!
\ingroup IO \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_internal
\sa wolfSSL_get_cipher_name \sa wolfSSL_get_cipher_name
*/ */
WOLFSSL_CIPHER* wolfSSL_get_current_cipher(WOLFSSL*); WOLFSSL_CIPHER* wolfSSL_get_current_cipher(WOLFSSL* ssl);
/*! /*!
\ingroup IO \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_s_mem
\sa wolfSSL_BIO_new, wolfSSL_BIO_free \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 \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_get_peer_certificate
\sa wolfSSL_X509_NAME_oneline \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 \ingroup CertsKeys
@ -4811,7 +4812,7 @@ WOLFSSL_X509_NAME* wolfSSL_X509_get_issuer_name(WOLFSSL_X509*);
\sa wolfSSL_X509_get_isCA \sa wolfSSL_X509_get_isCA
\sa wolfSSL_get_peer_certificate \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 \ingroup CertsKeys
@ -4823,7 +4824,7 @@ WOLFSSL_X509_NAME* wolfSSL_X509_get_subject_name(WOLFSSL_X509*);
structure is returned. structure is returned.
\return 0 returned if there is not a valid x509 structure passed in. \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_ _Example_
\code \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_issuer_name
\sa wolfSSL_X509_get_isCA \sa wolfSSL_X509_get_isCA
*/ */
int wolfSSL_X509_get_isCA(WOLFSSL_X509*); int wolfSSL_X509_get_isCA(WOLFSSL_X509* cert);
/*! /*!
\ingroup CertsKeys \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 \return int an integer value is returned which was retrieved from
the x509 object. 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_ _Example_
\code \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_notAfter
\sa wolfSSL_X509_free \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. \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_free
\sa wolfSSL_CTX_set_read_ahead \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 \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. \return SSL_FAILURE If ctx is NULL then SSL_FAILURE is returned.
\param ctx WOLFSSL_CTX structure to set read ahead flag. \param ctx WOLFSSL_CTX structure to set read ahead flag.
\param v read ahead flag
_Example_ _Example_
\code \code
@ -5333,7 +5335,7 @@ long wolfSSL_set_options(WOLFSSL *s, long op);
\sa wolfSSL_free \sa wolfSSL_free
\sa wolfSSL_set_options \sa wolfSSL_set_options
*/ */
long wolfSSL_get_options(const WOLFSSL *s); long wolfSSL_get_options(const WOLFSSL *ssl);
/*! /*!
\ingroup Setup \ingroup Setup
@ -5359,7 +5361,7 @@ long wolfSSL_get_options(const WOLFSSL *s);
\sa wolfSSL_new \sa wolfSSL_new
\sa wolfSSL_free \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 \ingroup openSSL
@ -5372,7 +5374,7 @@ long wolfSSL_set_tlsext_debug_arg(WOLFSSL *s, void *arg);
\return 1 upon success. \return 1 upon success.
\return 0 upon error. \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 \param type ssl extension type which TLSEXT_STATUSTYPE_ocsp is
only supported. only supported.
@ -5518,7 +5520,7 @@ void wolfSSL_ERR_print_errors_cb (
\sa wolfSSL_CTX_set_psk_client_callback \sa wolfSSL_CTX_set_psk_client_callback
*/ */
void wolfSSL_CTX_set_psk_client_callback(WOLFSSL_CTX* ctx, 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. \brief Sets the PSK client side callback.
@ -14427,7 +14429,7 @@ int wolfSSL_get_ephemeral_key(WOLFSSL* ssl, int keyAlgo,
/*! /*!
\ingroup SSL \ingroup SSL
\brief Sign a message with the chosen message digest, padding, and RSA key \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 type Hash NID
\param m Message to sign. Most likely this will be the digest of \param m Message to sign. Most likely this will be the digest of
the message to sign the message to sign