Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
crys_chacha_poly.h
00001 /************************************************************************************** 00002 * Copyright (c) 2016-2017, ARM Limited or its affiliates. All rights reserved * 00003 * * 00004 * This file and the related binary are licensed under the following license: * 00005 * * 00006 * ARM Object Code and Header Files License, v1.0 Redistribution. * 00007 * * 00008 * Redistribution and use of object code, header files, and documentation, without * 00009 * modification, are permitted provided that the following conditions are met: * 00010 * * 00011 * 1) Redistributions must reproduce the above copyright notice and the * 00012 * following disclaimer in the documentation and/or other materials * 00013 * provided with the distribution. * 00014 * * 00015 * 2) Unless to the extent explicitly permitted by law, no reverse * 00016 * engineering, decompilation, or disassembly of is permitted. * 00017 * * 00018 * 3) Redistribution and use is permitted solely for the purpose of * 00019 * developing or executing applications that are targeted for use * 00020 * on an ARM-based product. * 00021 * * 00022 * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * 00023 * CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * 00024 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, * 00025 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * 00026 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * 00028 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * 00029 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * 00030 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * 00031 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * 00032 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 00033 **************************************************************************************/ 00034 00035 00036 /*! 00037 @file 00038 @brief This file contains all of the enums and definitions that are used for the 00039 CRYS CHACHA-POLY APIs, as well as the APIs themselves. 00040 @defgroup crys_chacha_poly CryptoCell CHACHA-POLY APIs 00041 @{ 00042 @ingroup cryptocell_api 00043 */ 00044 #ifndef CRYS_CHACHA_POLY_H 00045 #define CRYS_CHACHA_POLY_H 00046 00047 00048 #include "ssi_pal_types.h" 00049 #include "crys_error.h" 00050 #include "crys_chacha.h" 00051 #include "crys_poly.h" 00052 00053 00054 #ifdef __cplusplus 00055 extern "C" 00056 { 00057 #endif 00058 00059 00060 /*! 00061 @brief This function is used to perform the CHACHA-POLY encryption and authentication operation. 00062 00063 @return CRYS_OK on success. 00064 @return A non-zero value on failure as defined crys_chacha_poly_error.h. 00065 */ 00066 CIMPORT_C CRYSError_t CRYS_CHACHA_POLY( 00067 CRYS_CHACHA_Nonce_t pNonce, /*!< [in] A pointer to a buffer containing the nonce value. */ 00068 CRYS_CHACHA_Key_t pKey, /*!< [in] A pointer to the user's key buffer. */ 00069 CRYS_CHACHA_EncryptMode_t encryptDecryptFlag, /*!< [in] A flag specifying whether the CHACHA-POLY should perform an Encrypt or 00070 Decrypt operation. */ 00071 uint8_t *pAddData, /*!< [in] A pointer to the buffer of the additional data to the POLY. 00072 The pointer does not need to be aligned. must not be null. */ 00073 size_t addDataSize, /*!< [in] The size of the input data. must not be 0. */ 00074 uint8_t *pDataIn, /*!< [in] A pointer to the buffer of the input data to the CHACHA. 00075 The pointer does not need to be aligned. must not be null. */ 00076 size_t dataInSize, /*!< [in] The size of the input data. must not be 0. */ 00077 uint8_t *pDataOut, /*!< [out] A pointer to the buffer of the output data from the CHACHA. 00078 must not be null. */ 00079 CRYS_POLY_Mac_t macRes /*!< [in/out] Pointer to the MAC result buffer.*/ 00080 ); 00081 00082 00083 00084 #ifdef __cplusplus 00085 } 00086 #endif 00087 /** 00088 @} 00089 */ 00090 #endif /* #ifndef CRYS_CHACHA_POLY_H */ 00091 00092 00093 00094 00095
Generated on Tue Jul 12 2022 12:43:45 by
