html and pdf documentation for wolfssl, generated by doxygen

This commit is contained in:
connerwolfssl
2018-01-09 14:12:06 -07:00
parent ad4cf69993
commit e6cef73658
30 changed files with 3792 additions and 427 deletions

View File

@ -29,8 +29,8 @@
#define DWT ((DWT_Type *) (0xE0001000UL) )
typedef struct
{
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
uint32_t CTRL; /*< Offset: 0x000 (R/W) Control Register */
uint32_t CYCCNT; /*< Offset: 0x004 (R/W) Cycle Count Register */
} DWT_Type;
extern uint32_t SystemCoreClock ;

View File

@ -150,6 +150,14 @@ tests/unit.log: testsuite/testsuite.log
DISTCLEANFILES+= cyassl-config
DISTCLEANFILES+= wolfssl-config
clean-local:
-rm -rf documentation/build/
-rm -rf documentation/html/
-rm documentation/refman.pdf
-rm documentation/doxygen_warnings
-rm documentation/doxygen_html_warnings
-rm documentation/doxygen_pdf_warnings
maintainer-clean-local:
-rm Makefile.in
-rm aclocal.m4
@ -207,3 +215,13 @@ merge-clean:
@find ./ | $(GREP) \.OTHER | xargs rm -f
@find ./ | $(GREP) \.BASE | xargs rm -f
@find ./ | $(GREP) \~$$ | xargs rm -f
dox-pdf:
echo "Generating PDF"
cd documentation && ./generate_documentation.sh -pdf > ./doxygen_pdf_warnings || (echo "HTML generation failed $$?"; exit 1)
dox-html:
echo "Generating HTML"
cd documentation && ./generate_documentation.sh -html > ./doxygen_html_warnings || (echo "HTML generation failed $$?"; exit 1)
dox: dox-html dox-pdf

View File

@ -1,43 +0,0 @@
#!/bin/sh
command -v g++
if [ $? -ne "0" ]; then
echo "Please install g++"
exit 1
fi
command -v cmake
if [ $? -ne "0" ]; then
echo "Please install cmake"
exit 1
fi
command -v git
if [ $? -ne "0" ]; then
echo "Please install git"
exit 1
fi
command -v make
if [ $? -ne "0" ]; then
echo "Please install make"
exit 1
fi
if [ ! -e "build" ]; then
echo "build directory not present...creating directory..."
mkdir build
cd build
echo "cloning doxygen 1.8.13..."
git clone https://github.com/doxygen/doxygen --branch Release_1_8_13
cmake -G "Unix Makefiles" doxygen/
make
cd ..
else
echo "build exists"
fi
build/bin/doxygen Doxyfile
cp html_changes/* html/
cp html_changes/search/* html/search/

View File

@ -1,15 +1,36 @@
wolfSSL with Doxygen 1.8.13
---- Generating the HTML ----
---- Dependencies ----
cmake
make
git
latex (with pdflatex included)
( The pdflatex dependency can be removed by setting USE_PDFLATEX to NO in the
file "Doxyfile" located at documentation/formats/pdf/Doxyfile )
---- Generating the Documentation ----
If you are looking to just generate the html documentation and not interested in
how to add your own just run the GENERATE_HTML.sh script and then open the
html/index.html file with your preferred browser.
how to add your own just run one of the following comands from the main wolfssl
directory:
make dox (this option will make both html and pdf documentation)
make dox-html (only html documentation)
make dox-pdf (only pdf documentation)
If it is the first time running one of the above commands the command will take
some time to run. This is because the doxygen repository must be clones and then
built along with the time taken to make the documentation.
Once documentation generation has completed to open the html use a browser to
open documentation/html/index.html. To open the generated pdf looking for
refman.pdf located and documentation/refman.pdf.
---- Configure ----
Doxygen uses a file called "Doxyfile" to hold all its values for configurations.
If needed to generate a fresh Doxfile run the command
Doxygen uses a file called "Doxyfile" to hold all its values for configuration.
If needed, to generate a fresh Doxfile run the command
doxygen -g
@ -30,15 +51,12 @@ Below are some the the settings that are currently used:
GENERATE_LATEX
- tells doxygen whether or not to generate LATEX documentation.
GENERATE_MAN
- tells doxygen whether or not to generate MAN pages.
- tells doxygen whether or not to generate LATEX documentation. The Latex
that is generated is used to generate a PDF as well.
ENABLE_PREPROCESSING
- allows doxygen to include items for preprocessing like #ifdef, #endif, etc.
- tells doxygen whether or not to ignore C/C++ preprocessors directives i.e #ifdef, #ifndef
EXCLUDE
@ -47,20 +65,35 @@ Below are some the the settings that are currently used:
HTML_EXTRA_STYLESHEET
-allows the user to specify their own css style sheet to use for the doxygen html.
SHOW_USED_FILES and SHOW_FILES
- when using groups it is important to keep these options set to yes otherwise
functions with documentation that are not part of a group may fail to be included
in the generated documentation.
---- Embedding Documentation ----
In the wolfssl repo, doxygen comments should be embedded in header files when possible.
This ensures that code is not too cluttered and keeps API easy to find. If a function
prototype is not available in a header file then a .c file should be the next choice.
Doxygen API documentation should be placed in the documentation/dox_comments/
directory. The documentation should be stored in a file in this directory with the
same name of the file in which the API resides in the wolfssl repository. C code
header files (*.h) should be used when writing the API documentation. If API in a
file is being documented for the first time be sure to add the to the top of the
original file:
/*!
\file wolfssl/PATH_TO_FILE/FILE_NAME
*/
This ensures that the file will be linked to in the doxygen generated html.
When specifying a specific file with the \file command be sure to include part of
the file's path so that it is a unique name. This allows for linking to files even
when multiple files share the same name.
To ensure that doxygen documents a specific API in to a desired module be sure
to include that module's name in the \ingroup. The current modules to choose from
are:
are as follows but new group can be made:
\ingroup 3DES
\ingroup AES
\ingroup ARC4
@ -90,13 +123,18 @@ are:
\ingroup wolfCrypt
\ingroup openSSL
\ingroup CertManager
\ingroup TLS
\ingroup CertsKeys
\ingroup Setup
\ingroup IO
\ingroup Debug
If one of the above modules/ groups does not fit a desired function then a new
group will need to be created. To do this include the following at the top of
the ssl.h file in wolfssl/wolfssl maintaining the alphabetical order:
group will need to be created. To do this include add a new group definition
to the doxygen_groups.h file located at documentation/formats/pdf/doxygen_groups.h
/*!
\defgroup <group name>
\defgroup <group name> <description>
*/
The general outline when documenting within the wolfssl library in doxygen should
@ -116,12 +154,17 @@ look like as follows:
// any example code here
\endcode
\sa // stands for see also. Each API reference here should have its own \sa
\sa // stands for see also. Each API reference here should begin with \sa
\sa <Function>
\sa <Function>
*/
Be careful when including extra line breaks. This can throw off the formatting doxygen generates
and may cause undesired misaligned sections in the doxygen generated documentation. It is a good
idea to check how your documentation looks as you work so that mistakes are not repeatedly being made
throughout the documentation process.
When adding new documentation be sure to keep the secions, \ingroup, \brief,
\param, \return, Etc. seperated with at least 1 newline. This insures that when
doxygen attempts to generate documentation the sections do not overlap eachother
and produce errors (this is especialy important when the latex is being generated).
Once finished creating new documentation it is highly recommended to generate new
html and pdf to ensure no errors were introduced that prevent documentation
generation and that the documentation shows up correctly.

View File

@ -149,10 +149,9 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
AES. This function is only enabled if WOLFSSL_AES_COUNTER is enabled at
compile time. The AES structure should be initialized through AesSetKey
before calling this function. Note that this function is used for both
decryption and encryption.
_NOTE:_ Regarding using same API for encryption and decryption.
User should differentiate between Aes structures for encrypt/decrypt.
decryption and encryption. _NOTE:_ Regarding using same API for encryption
and decryption. User should differentiate between Aes structures
for encrypt/decrypt.
\return none
@ -192,10 +191,9 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
the output block, out. It uses the key and iv (initialization vector)
of the provided AES structure, which should be initialized with
wc_AesSetKey before calling this function. It is only enabled if the
configure option WOLFSSL_AES_DIRECT is enabled.
__Warning:__ In nearly all use cases ECB mode is considered to be
less secure. Please avoid using ECB APIs directly whenever possible
configure option WOLFSSL_AES_DIRECT is enabled. __Warning:__ In nearly all
use cases ECB mode is considered to be less secure. Please avoid using ECB
APIs directly whenever possible
\param aes pointer to the AES object used to encrypt data
\param out pointer to the output buffer in which to store the cipher
@ -216,17 +214,16 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesSetKeyDirect
*/
WOLFSSL_API void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in);
/*!
/*!
\ingroup AES
\brief This function is a one-block decrypt of the input block, in, into
the output block, out. It uses the key and iv (initialization vector) of
the provided AES structure, which should be initialized with wc_AesSetKey
before calling this function. It is only enabled if the configure option
WOLFSSL_AES_DIRECT is enabled, and there is support for direct AES
encryption on the system in question.
__Warning:__ In nearly all use cases ECB mode is considered to be less
secure. Please avoid using ECB APIs directly whenever possible
encryption on the system in question. __Warning:__ In nearly all use cases
ECB mode is considered to be less secure. Please avoid using ECB APIs
directly whenever possible
\return none
@ -250,16 +247,15 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesSetKeyDirect
*/
WOLFSSL_API void wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in);
/*!
/*!
\ingroup AES
\brief This function is used to set the AES keys for CTR mode with AES.
It initializes an AES object with the given key, iv
(initialization vector), and encryption dir (direction). It is only
enabled if the configure option WOLFSSL_AES_DIRECT is enabled.
Currently wc_AesSetKeyDirect uses wc_AesSetKey internally.
__Warning:__ In nearly all use cases ECB mode is considered to be
less secure. Please avoid using ECB APIs directly whenever possible
Currently wc_AesSetKeyDirect uses wc_AesSetKey internally. __Warning:__ In
nearly all use cases ECB mode is considered to be less secure. Please avoid
using ECB APIs directly whenever possible
\return 0 On successfully setting the key.
\return BAD_FUNC_ARG Returned if the given key is an invalid length.
@ -288,7 +284,7 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesEncryptDirect
\sa wc_AesDecryptDirect
\sa wc_AesSetKey
*/
*/
WOLFSSL_API int wc_AesSetKeyDirect(Aes* aes, const byte* key, word32 len,
const byte* iv, int dir);
/*!
@ -319,7 +315,7 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesGcmDecrypt
*/
WOLFSSL_API int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len);
/*!
/*!
\ingroup AES
\brief This function encrypts the input message, held in the buffer in,
and stores the resulting cipher text in the output buffer out. It
@ -361,13 +357,13 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesGcmSetKey
\sa wc_AesGcmDecrypt
*/
*/
WOLFSSL_API int wc_AesGcmEncrypt(Aes* aes, byte* out,
const byte* in, word32 sz,
const byte* iv, word32 ivSz,
byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz);
/*!
/*!
\ingroup AES
\brief This function decrypts the input cipher text, held in the buffer
in, and stores the resulting message text in the output buffer out.
@ -409,7 +405,7 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesGcmSetKey
\sa wc_AesGcmEncrypt
*/
*/
WOLFSSL_API int wc_AesGcmDecrypt(Aes* aes, byte* out,
const byte* in, word32 sz,
const byte* iv, word32 ivSz,
@ -435,9 +431,9 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\endcode
\sa wc_GmacUpdate
*/
*/
WOLFSSL_API int wc_GmacSetKey(Gmac* gmac, const byte* key, word32 len);
/*!
/*!
\ingroup AES
\brief This function generates the Gmac hash of the authIn input and
stores the result in the authTag buffer. After running wc_GmacUpdate,
@ -470,7 +466,7 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\endcode
\sa wc_GmacSetKey
*/
*/
WOLFSSL_API int wc_GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz,
const byte* authIn, word32 authInSz,
byte* authTag, word32 authTagSz);
@ -498,7 +494,7 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesCcmDecrypt
*/
WOLFSSL_API int wc_AesCcmSetKey(Aes* aes, const byte* key, word32 keySz);
/*!
/*!
\ingroup AES
\brief This function encrypts the input message, in, into the output
@ -540,13 +536,13 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesCcmSetKey
\sa wc_AesCcmDecrypt
*/
*/
WOLFSSL_API int wc_AesCcmEncrypt(Aes* aes, byte* out,
const byte* in, word32 inSz,
const byte* nonce, word32 nonceSz,
byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz);
/*!
/*!
\ingroup AES
\brief This function decrypts the input cipher text, in, into
@ -594,7 +590,7 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\sa wc_AesCcmSetKey
\sa wc_AesCcmEncrypt
*/
*/
WOLFSSL_API int wc_AesCcmDecrypt(Aes* aes, byte* out,
const byte* in, word32 inSz,
const byte* nonce, word32 nonceSz,
@ -604,9 +600,7 @@ WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
\ingroup AES
\brief This is to help with setting keys to correct encrypt or
decrypt type.
\note Is up to user to call wc_AesXtsFree on aes key when done.
decrypt type. It is up to user to call wc_AesXtsFree on aes key when done.
\return 0 Success
@ -766,6 +760,7 @@ WOLFSSL_API int wc_AesXtsEncrypt(XtsAes* aes, byte* out,
\param iSz size of i buffer, should always be AES_BLOCK_SIZE but having
this input adds a sanity check on how the user calls the
function.
_Example_
\code
XtsAes aes;

View File

@ -1,5 +1,5 @@
/*!
\ingroup ASN.1
\ingroup ASN
\brief This function converts a pem certificate to a der certificate,
and places the resulting certificate in the derBuf buffer provided.

View File

@ -0,0 +1,47 @@
/*!
\defgroup 3DES Algorithms - 3DES
\defgroup AES Algorithms - AES
\defgroup ARC4 Algorithms - ARC4
\defgroup BLAKE2 Algorithms - BLAKE2
\defgroup Camellia Algorithms - Camellia
\defgroup ChaCha Algorithms - ChaCha
\defgroup ChaCha20Poly1305 Algorithms - ChaCha20_Poly1305
\defgroup Curve25519 Algorithms - Curve25519
\defgroup DSA Algorithms - DSA
\defgroup Diffie-Hellman Algorithms - Diffie-Hellman
\defgroup ECC Algorithms - ECC
\defgroup ED25519 Algorithms - ED25519
\defgroup HC128 Algorithms - HC-128
\defgroup HMAC Algorithms - HMAC
\defgroup IDEA Algorithms - IDEA
\defgroup MD2 Algorithms - MD2
\defgroup MD4 Algorithms - MD4
\defgroup MD5 Algorithms - MD5
\defgroup PKCS7 Algorithms - PKCS7
\defgroup Password Algorithms - Password Based
\defgroup Poly1305 Algorithms - Poly1305
\defgroup RIPEMD Algorithms - RIPEMD
\defgroup RSA Algorithms - RSA
\defgroup Rabbit Algorithms - Rabbit
\defgroup SHA Algorithms - SHA 128/224/256/384/512
\defgroup SRP Algorithms - SRP
\defgroup ASN ASN.1
\defgroup Base_Encoding Base Encoding
\defgroup CertManager CertManager API
\defgroup Compression Compression
\defgroup Error Error Reporting
\defgroup Keys Key and Cert Conversion
\defgroup Logging Logging
\defgroup Math Math API
\defgroup Memory Memory Handling
\defgroup Random Random Number Generation
\defgroup Signature Signature API
\defgroup openSSL OpenSSL API
\defgroup wolfCrypt wolfCrypt Init and Cleanup
\defgroup TLS wolfSSL Initialization/Shutdown
\defgroup CertsKeys wolfSSL Certificates and Keys
\defgroup Setup wolfSSL Context and Session Set Up
\defgroup IO wolfSSL Connection, Session, and I/O
\defgroup Debug wolfSSL Error Handling and Reporting
*/

File diff suppressed because it is too large Load Diff

View File

@ -305,6 +305,8 @@ WOLFSSL_API void wolfSSL_SetIOReadCtx( WOLFSSL* ssl, void *ctx);
*/
WOLFSSL_API void wolfSSL_SetIOWriteCtx(WOLFSSL* ssl, void *ctx);
/*!
\ingroup IO
\brief This function returns the IOCB_ReadCtx member of the WOLFSSL struct.
\return pointer This function returns a void pointer to the IOCB_ReadCtx
@ -332,6 +334,8 @@ WOLFSSL_API void wolfSSL_SetIOWriteCtx(WOLFSSL* ssl, void *ctx);
*/
WOLFSSL_API void* wolfSSL_GetIOReadCtx( WOLFSSL* ssl);
/*!
\ingroup IO
\brief This function returns the IOCB_WriteCtx member of the WOLFSSL structure.
\return pointer This function returns a void pointer to the IOCB_WriteCtx
@ -433,6 +437,8 @@ WOLFSSL_API void wolfSSL_SetIOReadFlags( WOLFSSL* ssl, int flags);
*/
WOLFSSL_API void wolfSSL_SetIOWriteFlags(WOLFSSL* ssl, int flags);
/*!
\ingroup IO
\brief This function sets the nxSocket and nxWait members of the nxCtx
struct within the WOLFSSL structure.
@ -491,6 +497,8 @@ WOLFSSL_API void wolfSSL_SetIOWriteFlags(WOLFSSL* ssl, int flags);
*/
WOLFSSL_API void wolfSSL_CTX_SetGenCookie(WOLFSSL_CTX*, CallbackGenCookie);
/*!
\ingroup Setup
\brief This function returns the IOCB_CookieCtx member of the
WOLFSSL structure.

View File

@ -0,0 +1,133 @@
wolfSSL with Doxygen 1.8.13
---- Generating the HTML ----
If you are looking to just generate the html documentation and not interested in
how to add your own just run the GENERATE_HTML.sh script and then open the
html/index.html file with your preferred browser.
---- Configure ----
Doxygen uses a file called "Doxyfile" to hold all its values for configurations.
If needed to generate a fresh Doxfile run the command
doxygen -g
Once a Doxyfile is generate there are a few options to keep in mind.
Below are some the the settings that are currently used:
EXTRACT_ALL
- this option determines if all API are extracted or just API that is documented.
OPTIMIZE_OUTPUT_FOR_C
- changes the look and naming schemes used in generated documentation.
RECURSIVE
- allows doxygen to search subdirectories in a library for documenting.
GENERATE_LATEX
- tells doxygen whether or not to generate LATEX documentation.
GENERATE_MAN
- tells doxygen whether or not to generate MAN pages.
ENABLE_PREPROCESSING
- allows doxygen to include items for preprocessing like #ifdef, #endif, etc.
EXCLUDE
- allows the user to specify files or directories to ignore when documenting.
HTML_EXTRA_STYLESHEET
-allows the user to specify their own css style sheet to use for the doxygen html.
---- Embedding Documentation ----
Doxygen stype API documentation should be placed in the documentation/dox_comments/
directory. The documentation should be stored in a file in this directory with the
same name of the file in which the API resides in the wolfssl repository. C code
header files (*.h) should be used when writing the API documentation. If API in a
file is documented be sure to add the the top of the original file:
/*!
\file wolfssl/PATH_TO_FILE/FILE_NAME
*/
This ensures that the file will be linked to in the doxygen generated html.
When specifying a specific file with the \file command be sure to include part of
the file's path so that it is a unique name. This allows for linking to files even
when multiple files share the same name.
To ensure that doxygen documents a specific API in to a desired module be sure
to include that module's name in the \ingroup. The current modules to choose from
are as follows but new group can be made:
\ingroup 3DES
\ingroup AES
\ingroup ARC4
\ingroup BLAKE2
\ingroup Camellia
\ingroup ChaCha
\ingroup ChaCha20Poly1305
\ingroup Curve25519
\ingroup DSA Algorithms
\ingroup Diffie-Hellman
\ingroup ECC
\ingroup ED25519
\ingroup HC128
\ingroup HMAC
\ingroup IDEA
\ingroup MD2
\ingroup MD4
\ingroup MD5
\ingroup PKCS7
\ingroup Password
\ingroup Poly1305
\ingroup RIPEMD
\ingroup RSA
\ingroup Rabbit
\ingroup SHA
\ingroup SRP
\ingroup wolfCrypt
\ingroup openSSL
\ingroup CertManager
If one of the above modules/ groups does not fit a desired function then a new
group will need to be created. To do this include the following at the top of
the ssl.h file in wolfssl/wolfssl maintaining the alphabetical order:
/*!
\defgroup <group name>
*/
The general outline when documenting within the wolfssl library in doxygen should
look like as follows:
/*!
\ingroup //if API should be in a seperate module
\brief <description of API>
\return <name of return> <description> // each return will need \return.
\param <name of param> <description> // stands for parameter, each parameter will need \param.
_Example_
\code
// any example code here
\endcode
\sa // stands for see also. Each API reference here should have its own \sa
*/
Be careful when including extra line breaks. This can throw off the formatting doxygen generates
and may cause undesired misaligned sections in the doxygen generated documentation. It is a good
idea to check how your documentation looks as you work so that mistakes are not repeatedly being made
throughout the documentation process.

View File

@ -51,7 +51,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO =
PROJECT_LOGO =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
@ -461,7 +461,7 @@ EXTRACT_STATIC = NO
# for Java sources.
# The default value is: YES.
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_CLASSES = NO
# This flag is only useful for Objective-C code. If set to YES, local methods,
# which are defined in the implementation section but not in the interface are
@ -666,7 +666,7 @@ MAX_INITIALIZER_LINES = 30
# list will mention the files that were used to generate the documentation.
# The default value is: YES.
SHOW_USED_FILES = YES
SHOW_USED_FILES = NO
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
# will remove the Files entry from the Quick Index and from the Folder Tree View
@ -724,7 +724,7 @@ CITE_BIB_FILES =
# messages are off.
# The default value is: NO.
QUIET = NO
QUIET = YES
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
@ -740,7 +740,7 @@ WARNINGS = YES
# will automatically be disabled.
# The default value is: YES.
WARN_IF_UNDOCUMENTED = YES
WARN_IF_UNDOCUMENTED = NO
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as not documenting some parameters
@ -748,7 +748,7 @@ WARN_IF_UNDOCUMENTED = YES
# markup commands wrongly.
# The default value is: YES.
WARN_IF_DOC_ERROR = YES
WARN_IF_DOC_ERROR = NO
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return
@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
WARN_LOGFILE =
WARN_LOGFILE = doxygen_warnings
#---------------------------------------------------------------------------
# Configuration options related to the input files
@ -1138,7 +1138,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
HTML_HEADER = header.html
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
@ -1148,7 +1148,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER =
HTML_FOOTER = footer.html
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
@ -1224,16 +1224,6 @@ HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
# are dynamically created via Javascript. If disabled, the navigation index will
# consists of multiple levels of tabs that are statically embedded in every HTML
# page. Disable this option to support browsers that do not have Javascript,
# like the Qt help browser.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_DYNAMIC_MENUS = YES
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
@ -1663,7 +1653,7 @@ GENERATE_LATEX = NO
# The default directory is: latex.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_OUTPUT = latex
LATEX_OUTPUT =
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked.
@ -1891,7 +1881,7 @@ RTF_SOURCE_CODE = NO
# classes and files.
# The default value is: NO.
GENERATE_MAN = YES
GENERATE_MAN = NO
# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

View File

@ -0,0 +1,57 @@
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<div id="footer">
<div class="lowNav">
<p class="footText">Product Information</p>
<ul class="lowNavList">
<a href="https://www.wolfssl.com/products/wolfssl/"><li>wolfSSL TLS Library</li></a>
<a href="https://www.wolfssl.com/products/wolfcrypt/"><li>wolfCrypt Crypto Engine</li></a>
<a href="https://www.wolfssl.com/products/wolfmqtt/"><li>wolfMQTT Client Library</li></a>
<a href="https://www.wolfssl.com/products/wolfssh/"><li>wolfSSH SSH Library</li></a>
<a href="https://www.wolfssl.com/license/"><li>License Information</li></a>
</ul>
</div>
<div class="lowNav">
<p class="footText">Documentation</p>
<ul class="lowNavList">
<a href="https://www.wolfssl.com/docs/wolfssl-manual/"><li>wolfSSL Manual</li></a>
<a href="https://www.wolfssl.com/docs/wolfssl-manual/ch17/"><li>wolfSSL API Reference</li></a>
<a href="https://www.wolfssl.com/docs/wolfssl-manual/ch2/"><li>Building wolfSSL</li></a>
<a href="https://www.wolfssl.com/docs/wolfssl-manual/ch11/"><li>SSL Tutorial</li></a>
<a href="https://www.wolfssl.com/docs/"><li>Additional Documentation</li></a>
</ul>
</div>
<div id="lowCenter">
<p class="footText" id="center">Copyright &#169 2017 wolfSSL Inc.<br>All rights reserved.</p>
<div class="lowNav">
<p class="footText">Help and Support</p>
<ul class="lowNavList">
<a href="https://www.wolfssl.com/forums/"><li>Support Forum</li></a>
<a href="https://www.wolfssl.com/download/support-packages/"><li>Support Packages</li></a>
<a href="https://www.wolfssl.com/docs/consulting/"><li>Consulting Services</li></a>
<a href="https://www.wolfssl.com/docs/security-vulnerabilities/"><li>Vulnerability Info</li></a>
<a href="https://www.wolfssl.com/contact/"><li>Contact Us</li></a>
</ul>
</div>
<div class="lowNav" id="lastLowNav">
<p class="footText">Reference</p>
<ul class="lowNavList">
<a href="https://www.wolfssl.com/docs/wolfssl-manual/appendix-b/"><li>Algorithm/Protocol Reference</li></a>
<a href="https://www.wolfssl.com/docs/media/"><li>Presentations</li></a>
<a href="https://www.wolfssl.com/directory/"><li>Site Directory</li></a>
</ul>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!-- HTML header for doxygen 1.8.11-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="wolfssl_logo" style="width: 150px; height: 100px; display: inline-block;"><img alt="Logo" src="../images/wolfssl_logo.png" style="width: 150px; height: 100px;"/></div>
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="wolfssl_logo"><img alt="Logo" src="../images/wolfssl_logo.png"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->

View File

@ -138,6 +138,7 @@ div.navtab {
#top {
width: 100%;
margin: auto;
text-align:center;
}
/* added for wolfssl */
@ -199,7 +200,6 @@ h4,h5 {
vertical-align: bottom;
bottom: 0;
right: 0;
float: right;
}
/* added for wolfssl*/
@ -216,9 +216,8 @@ h4,h5 {
/* added for wolfssl*/
#main-nav{
width: 100%;
display: inline-block;
background-image: none;
float: right;
}
.header {
@ -437,6 +436,51 @@ div.center img {
border: 0px;
}
/* added for wolfssl */
#footer {
width:100%%;
margin: 0 auto;
text-align:center;
}
/* added for wolfssl */
div.lowNav {
display: inline-block;
vertical-align: top;
}
/* added for wolfssl*/
ul.lowNavList {
list-style:none;
}
/* added for wolfssl */
div#lowCenter {
display: inline-block;
list-style: none;
}
/* added for wolfssl */
p#center.footText {
display: inline-block;
vertical-align: top;
}
div#lowCenter {
display: inline-block;
list-style: none;
}
/* added for wolfssl */
#footer.lowCenter p {
display: inline-block;
}
/* added for wolfssl */
#footer.lowCenter#lowNav {
display: inline-block;
}
address.footer {
text-align: right;
padding-right: 12px;

View File

@ -0,0 +1,33 @@
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
function makeTree(data,relPath) {
var result='';
if ('children' in data) {
result+='<ul>';
if (searchEnabled) {
if (serverSide) {
result+='<li id="wolfssl_search"><div id="MSearchBox" class="MSearchBoxInactive"><div class="left"><form id="FSearchBox" action="'+searchPage+'" method="get"><img id="MSearchSelect" src="'+relPath+'search/mag.png" alt=""/><input type="text" id="MSearchField" name="query" value="'+search+'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)"></form></div><div class="right"></div></div></li>';
} else {
result+='<li id="wolfssl_search"><div id="MSearchBox" class="MSearchBoxInactive"><span class="left"><img id="MSearchSelect" src="'+relPath+'search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/><input type="text" id="MSearchField" value="'+search+'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/></span><span class="right"><a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="'+relPath+'search/close.png" alt=""/></a></span></div></li>';
}
}
for (var i in data.children) {
if (relPath+data.children[i].style) {
result+='<li style="'+relPath+data.children[i].style+'"><a href="'+relPath+data.children[i].url+'">'+
data.children[i].text+'</a>'+
makeTree(data.children[i],relPath)+'</li>';
} else {
result+='<li><a href="'+relPath+data.children[i].url+'">'+
data.children[i].text+'</a>'+
makeTree(data.children[i],relPath)+'</li>';
}
}
result+='</ul>';
}
return result;
}
$('#main-nav').append(makeTree(menudata,relPath));
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
$('#main-menu').smartmenus();
}

View File

@ -1,6 +1,7 @@
var menudata={children:[
{text:"Files",url:"files.html"},
{text:"Data Structures",url:"annotated.html"},
{text:"Modules",url:"modules.html"},
{text:"wolfSSL Home",url:"https://www.wolfssl.com/",style:"clear:right;"},
{text:"Doc Home",url:"index.html"},
{text:"Related Pages",url:"pages.html"},
{text:"Main Page",url:"index.html"}]}
{text:"Modules",url:"modules.html"},
{text:"Data Structures",url:"annotated.html"},
{text:"Files",url:"files.html"}]}

View File

@ -2,11 +2,11 @@
This file is for customizing the doxygen mainpage style.
*/
/*!
\mainpage This Documentation Covers wolfSSL, wolfCrypt, and CertManager API
\mainpage This Documentation Covers %wolfSSL, %wolfCrypt, and %CertManager API
\section website Useful Links
https://wolfssl.com/wolfSSL/Home.html - Main website<br>
https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html - wolfSSL Manual<br>
https://www.wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-1-wolfcrypt-api-aes.html - wolfCrypt Manual<br>
https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html - %wolfSSL Manual<br>
https://www.wolfssl.com/docs/wolfssl-manual/ch18/ - wolfCrypt Manual<br>
https://github.com/wolfssl/wolfssl.git - Git repository
*/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,148 @@
% Latex header for doxygen 1.8.13
\documentclass[twoside]{book}
% Packages required by doxygen
\usepackage{fixltx2e}
\usepackage{calc}
\usepackage{doxygen}
\usepackage[export]{adjustbox} % also loads graphicx
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{multirow}
\PassOptionsToPackage{warn}{textcomp}
\usepackage{textcomp}
\usepackage[nointegrals]{wasysym}
\usepackage[table]{xcolor}
% Font selection
\usepackage[T1]{fontenc}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}
\usepackage{amssymb}
\usepackage{sectsty}
\renewcommand{\familydefault}{\sfdefault}
\allsectionsfont{%
\fontseries{bc}\selectfont%
\color{darkgray}%
}
\renewcommand{\DoxyLabelFont}{%
\fontseries{bc}\selectfont%
\color{darkgray}%
}
\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}}
% Page & text layout
\usepackage{geometry}
\geometry{%
a4paper,%
top=2.5cm,%
bottom=2.5cm,%
left=2.5cm,%
right=2.5cm%
}
\tolerance=750
\hfuzz=15pt
\hbadness=750
\setlength{\emergencystretch}{15pt}
\setlength{\parindent}{0cm}
\setlength{\parskip}{3ex plus 2ex minus 2ex}
\makeatletter
\renewcommand{\paragraph}{%
\@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
\normalfont\normalsize\bfseries\SS@parafont%
}%
}
\renewcommand{\subparagraph}{%
\@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
\normalfont\normalsize\bfseries\SS@subparafont%
}%
}
\makeatother
% Headers & footers
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}}
\fancyhead[CE]{\fancyplain{}{}}
\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}}
\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}}
\fancyhead[CO]{\fancyplain{}{}}
\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}}
\fancyfoot[LE]{\fancyplain{}{}}
\fancyfoot[CE]{\fancyplain{}{}}
\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Copyright © 2017 wolfSSL Inc.
All rights reserved. }}
\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Copyright © 2017 wolfSSL Inc.
All rights reserved. }}
\fancyfoot[CO]{\fancyplain{}{}}
\fancyfoot[RO]{\fancyplain{}{}}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}%
}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\ #1}%
}
% Indices & bibliography
\usepackage{natbib}
\usepackage[titles]{tocloft}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{5}
\makeindex
% Hyperlinks (required, but should be loaded last)
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex,pagebackref=true]{hyperref}
\else
\usepackage[ps2pdf,pagebackref=true]{hyperref}
\fi
\hypersetup{%
colorlinks=true,%
linkcolor=blue,%
citecolor=blue,%
unicode%
}
% Custom commands
\newcommand{\clearemptydoublepage}{%
\newpage{\pagestyle{empty}\cleardoublepage}%
}
\usepackage{caption}
\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}
%===== C O N T E N T S =====
\begin{document}
% Titlepage & ToC
\hypersetup{pageanchor=false,
bookmarksnumbered=true,
pdfencoding=unicode
}
\pagenumbering{alph}
\begin{titlepage}
\vspace*{7cm}
\begin{center}%
{\Large wolfSSL API Reference}\\
\vspace*{1cm}
\graphicspath{{../images/}}
\begin{figure}[ht!]
\centering
\includegraphics[width=70mm]{wolfssl_logo.png}
\end{figure}
{\large Generated by Doxygen 1.8.13}\\
\end{center}
\end{titlepage}
\clearemptydoublepage
\pagenumbering{roman}
\tableofcontents
\clearemptydoublepage
\pagenumbering{arabic}
\hypersetup{pageanchor=true}
%--- Begin generated contents ---

View File

@ -0,0 +1,75 @@
#!/bin/sh
command -v g++
if [ $? -ne "0" ]; then
echo "Please install g++"
exit 1
fi
command -v cmake
if [ $? -ne "0" ]; then
echo "Please install cmake"
exit 1
fi
command -v git
if [ $? -ne "0" ]; then
echo "Please install git"
exit 1
fi
command -v make
if [ $? -ne "0" ]; then
echo "Please install make"
exit 1
fi
if [ ! -e "build" ]; then
echo "build directory not present...creating directory..."
mkdir build
cd build
echo "cloning doxygen 1.8.13..."
git clone https://github.com/doxygen/doxygen --branch Release_1_8_13
cmake -G "Unix Makefiles" doxygen/
make
cd ..
else
if [ ! -e "build/bin/doxygen" ]; then
cd build
echo "cloning doxygen 1.8.13..."
git clone https://github.com/doxygen/doxygen --branch Release_1_8_13
cmake -G "Unix Makefiles" doxygen/
make
cd ..
fi
fi
if [ $1 = "-html" ] || [ $1 = "-all" ]; then
#HTML GENERATION
cp -r formats/html/* ./
echo "generating html..."
build/bin/doxygen Doxyfile
cp html_changes/search/* html/search/
cp html_changes/* html/
rm footer.html header.html
rm -rf html_changes
rm mainpage.dox
rm Doxyfile
echo "finished generating html..."
echo "To view the html files use a browser to open the index.html file located at documentation/html/index.html"
fi
#PDF GENERATION
if [ $1 = "-pdf" ] || [ $1 = "-all" ]; then
cp -r formats/pdf/* ./
echo "generating pdf..."
build/bin/doxygen Doxyfile
cd latex/
make
mv refman.pdf ../
cd ..
rm -rf latex/
rm Doxyfile
rm header.tex
echo "finished generating pdf..."
fi

View File

@ -1,26 +0,0 @@
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
function makeTree(data,relPath) {
var result='';
if ('children' in data) {
result+='<ul>';
for (var i in data.children) {
result+='<li><a href="'+relPath+data.children[i].url+'">'+
data.children[i].text+'</a>'+
makeTree(data.children[i],relPath)+'</li>';
}
result+='</ul>';
}
return result;
}
$('#main-nav').append(makeTree(menudata,relPath));
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
if (searchEnabled) {
if (serverSide) {
$('#main-menu').append('<li id="wolfssl_search"><div id="MSearchBox" class="MSearchBoxInactive"><div class="left"><form id="FSearchBox" action="'+searchPage+'" method="get"><img id="MSearchSelect" src="'+relPath+'search/mag.png" alt=""/><input type="text" id="MSearchField" name="query" value="'+search+'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)"></form></div><div class="right"></div></div></li>');
} else {
$('#main-menu').append('<li id="wolfssl_search"><div id="MSearchBox" class="MSearchBoxInactive"><span class="left"><img id="MSearchSelect" src="'+relPath+'search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/><input type="text" id="MSearchField" value="'+search+'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/></span><span class="right"><a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="'+relPath+'search/close.png" alt=""/></a></span></div></li>');
}
}
$('#main-menu').smartmenus();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -21,49 +21,6 @@
/*!
\file ../wolfssl/ssl.h
\brief Header file containing key wolfSSL API
*************************
\defgroup 3DES Algorithms - 3DES
\defgroup AES Algorithms - AES
\defgroup ARC4 Algorithms - ARC4
\defgroup BLAKE2 Algorithms - BLAKE2
\defgroup Camellia Algorithms - Camellia
\defgroup ChaCha Algorithms - ChaCha
\defgroup ChaCha20Poly1305 Algorithms - ChaCha20_Poly1305
\defgroup Curve25519 Algorithms - Curve25519
\defgroup DSA Algorithms - DSA
\defgroup Diffie-Hellman Algorithms - Diffie-Hellman
\defgroup ECC Algorithms - ECC
\defgroup ED25519 Algorithms - ED25519
\defgroup HC128 Algorithms - HC-128
\defgroup HMAC Algorithms - HMAC
\defgroup IDEA Algorithms - IDEA
\defgroup MD2 Algorithms - MD2
\defgroup MD4 Algorithms - MD4
\defgroup MD5 Algorithms - MD5
\defgroup PKCS7 Algorithms - PKCS7
\defgroup Password Algorithms - Password Based
\defgroup Poly1305 Algorithms - Poly1305
\defgroup RIPEMD Algorithms - RIPEMD
\defgroup RSA Algorithms - RSA
\defgroup Rabbit Algorithms - Rabbit
\defgroup SHA Algorithms - SHA 128/224/256/384/512
\defgroup SRP Algorithms - SRP
\defgroup ASN ASN.1
\defgroup Base_Encoding Base Encoding
\defgroup CertManager CertManager API
\defgroup Compression Compression
\defgroup Error Error Reporting
\defgroup Keys Key and Cert Conversion
\defgroup Logging Logging
\defgroup Math Math API
\defgroup Memory Memory Handling
\defgroup Random Random Number Generation
\defgroup Signature Signature API
\defgroup openSSL OpenSSL API
\defgroup wolfCrypt wolfCrypt Init and Cleanup
*************************
*/
/* wolfSSL API */

View File

@ -217,226 +217,22 @@ WOLFSSL_API int wc_AesEcbDecrypt(Aes* aes, byte* out,
#endif /* HAVE_AES_KEYWRAP */
#ifdef WOLFSSL_AES_XTS
/*!
\ingroup AES
\brief This is to help with setting keys to correct encrypt or decrypt type.
\note Is up to user to call wc_AesXtsFree on aes key when done.
\return 0 Success
\param aes AES keys for encrypt/decrypt process
\param key buffer holding aes key | tweak key
\param len length of key buffer in bytes. Should be twice that of key size.
i.e. 32 for a 16 byte key.
\param dir direction, either AES_ENCRYPTION or AES_DECRYPTION
\param heap heap hint to use for memory. Can be NULL
\param devId id to use with async crypto. Can be 0
_Example_
\code
XtsAes aes;
if(wc_AesXtsSetKey(&aes, key, sizeof(key), AES_ENCRYPTION, NULL, 0) != 0)
{
// Handle error
}
wc_AesXtsFree(&aes);
\endcode
\sa wc_AesXtsEncrypt
\sa wc_AesXtsDecrypt
\sa wc_AesXtsFree
*/
WOLFSSL_API int wc_AesXtsSetKey(XtsAes* aes, const byte* key,
word32 len, int dir, void* heap, int devId);
/*!
\ingroup AES
\brief Same process as wc_AesXtsEncrypt but uses a word64 type as the tweak
value instead of a byte array. This just converts the word64 to a
byte array and calls wc_AesXtsEncrypt.
\return 0 Success
\param aes AES keys to use for block encrypt/decrypt
\param out output buffer to hold cipher text
\param in input plain text buffer to encrypt
\param sz size of both out and in buffers
\param sector value to use for tweak
_Example_
\code
XtsAes aes;
unsigned char plain[SIZE];
unsigned char cipher[SIZE];
word64 s = VALUE;
//set up keys with AES_ENCRYPTION as dir
if(wc_AesXtsEncryptSector(&aes, cipher, plain, SIZE, s) != 0)
{
// Handle error
}
wc_AesXtsFree(&aes);
\endcode
\sa wc_AesXtsEncrypt
\sa wc_AesXtsDecrypt
\sa wc_AesXtsSetKey
\sa wc_AesXtsFree
*/
WOLFSSL_API int wc_AesXtsEncryptSector(XtsAes* aes, byte* out,
const byte* in, word32 sz, word64 sector);
/*!
\ingroup AES
\brief Same process as wc_AesXtsDecrypt but uses a word64 type as the tweak
value instead of a byte array. This just converts the word64 to a
byte array.
\return 0 Success
\param aes AES keys to use for block encrypt/decrypt
\param out output buffer to hold plain text
\param in input cipher text buffer to decrypt
\param sz size of both out and in buffers
\param sector value to use for tweak
_Example_
\code
XtsAes aes;
unsigned char plain[SIZE];
unsigned char cipher[SIZE];
word64 s = VALUE;
//set up aes key with AES_DECRYPTION as dir and tweak with AES_ENCRYPTION
if(wc_AesXtsDecryptSector(&aes, plain, cipher, SIZE, s) != 0)
{
// Handle error
}
wc_AesXtsFree(&aes);
\endcode
\sa wc_AesXtsEncrypt
\sa wc_AesXtsDecrypt
\sa wc_AesXtsSetKey
\sa wc_AesXtsFree
*/
WOLFSSL_API int wc_AesXtsDecryptSector(XtsAes* aes, byte* out,
const byte* in, word32 sz, word64 sector);
/*!
\ingroup AES
\brief AES with XTS mode. (XTS) XEX encryption with Tweak and cipher text
Stealing.
\return 0 Success
\param aes AES keys to use for block encrypt/decrypt
\param out output buffer to hold cipher text
\param in input plain text buffer to encrypt
\param sz size of both out and in buffers
\param i value to use for tweak
\param iSz size of i buffer, should always be AES_BLOCK_SIZE but having
this input adds a sanity check on how the user calls the
function.
_Example_
\code
XtsAes aes;
unsigned char plain[SIZE];
unsigned char cipher[SIZE];
unsigned char i[AES_BLOCK_SIZE];
//set up key with AES_ENCRYPTION as dir
if(wc_AesXtsEncrypt(&aes, cipher, plain, SIZE, i, sizeof(i)) != 0)
{
// Handle error
}
wc_AesXtsFree(&aes);
\endcode
\sa wc_AesXtsDecrypt
\sa wc_AesXtsSetKey
\sa wc_AesXtsFree
*/
WOLFSSL_API int wc_AesXtsEncrypt(XtsAes* aes, byte* out,
const byte* in, word32 sz, const byte* i, word32 iSz);
/*!
\ingroup AES
\brief Same process as encryption but Aes key is AES_DECRYPTION type.
\return 0 Success
\param aes AES keys to use for block encrypt/decrypt
\param out output buffer to hold plain text
\param in input cipher text buffer to decrypt
\param sz size of both out and in buffers
\param i value to use for tweak
\param iSz size of i buffer, should always be AES_BLOCK_SIZE but having
this input adds a sanity check on how the user calls the
function.
_Example_
\code
XtsAes aes;
unsigned char plain[SIZE];
unsigned char cipher[SIZE];
unsigned char i[AES_BLOCK_SIZE];
//set up key with AES_DECRYPTION as dir and tweak with AES_ENCRYPTION
if(wc_AesXtsDecrypt(&aes, plain, cipher, SIZE, i, sizeof(i)) != 0)
{
// Handle error
}
wc_AesXtsFree(&aes);
\endcode
\sa wc_AesXtsEncrypt
\sa wc_AesXtsSetKey
\sa wc_AesXtsFree
*/
WOLFSSL_API int wc_AesXtsDecrypt(XtsAes* aes, byte* out,
const byte* in, word32 sz, const byte* i, word32 iSz);
/*!
\ingroup AES
\brief This is to free up any resources used by the XtsAes structure
\return 0 Success
\param aes AES keys to free
_Example_
\code
XtsAes aes;
if(wc_AesXtsSetKey(&aes, key, sizeof(key), AES_ENCRYPTION, NULL, 0) != 0)
{
// Handle error
}
wc_AesXtsFree(&aes);
\endcode
\sa wc_AesXtsEncrypt
\sa wc_AesXtsDecrypt
\sa wc_AesXtsSetKey
*/
WOLFSSL_API int wc_AesXtsFree(XtsAes* aes);
#endif

View File

@ -51,9 +51,9 @@ int ksdk_port_init(void);
typedef enum _fsl_ltc_ecc_coordinate_system
{
kLTC_Weierstrass = 0U, /*!< Point coordinates on an elliptic curve in Weierstrass form */
kLTC_Curve25519 = 1U, /*!< Point coordinates on an Curve25519 elliptic curve in Montgomery form */
kLTC_Ed25519 = 2U, /*!< Point coordinates on an Ed25519 elliptic curve in twisted Edwards form */
kLTC_Weierstrass = 0U, /*< Point coordinates on an elliptic curve in Weierstrass form */
kLTC_Curve25519 = 1U, /*< Point coordinates on an Curve25519 elliptic curve in Montgomery form */
kLTC_Ed25519 = 2U, /*< Point coordinates on an Ed25519 elliptic curve in twisted Edwards form */
} fsl_ltc_ecc_coordinate_system_t;
int wc_ecc_point_add(ecc_point *mG, ecc_point *mQ, ecc_point *mR, mp_int *m);

View File

@ -20,7 +20,7 @@
*/
/*!
\file wolfssl/wolfio.h
\file wolfssl/wolfio.h
*/
#ifndef WOLFSSL_IO_H