/******************************************************************************* * Copyright (C) 2015 Maxim Integrated Products, Inc., All rights Reserved. * * This software is protected by copyright laws of the United States and * of foreign countries. This material may also be protected by patent laws * and technology transfer regulations of the United States and of foreign * countries. This software is furnished under a license agreement and/or a * nondisclosure agreement and may only be used or reproduced in accordance * with the terms of those agreements. Dissemination of this information to * any party or parties not specified in the license agreement and/or * nondisclosure agreement is expressly prohibited. * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the name of Maxim Integrated * Products, Inc. shall not be used except as stated in the Maxim Integrated * Products, Inc. Branding Policy. * * The mere transfer of this software does not imply any licenses * of trade secrets, proprietary technology, copyrights, patents, * trademarks, maskwork rights, or any other form of intellectual * property whatsoever. Maxim Integrated Products, Inc. retains all * ownership rights. * Module Name: UCL * Description: return definition * Filename: ucl_retdefs.h * Author: LSL * Compiler: gcc * ******************************************************************************* */ #ifndef UCL_RETDEFS_H_ #define UCL_RETDEFS_H_ /** @file ucl_retdefs.h * @defgroup UCL_RETURN Definitions of returns * * @par Header: * @link ucl_retdefs.h ucl_retdefs.h @endlink * * @ingroup UCL_DEFINITIONS */ /** Carry. * @ingroup UCL_RETURN */ #define UCL_CARRY 1 /** True. * @ingroup UCL_RETURN */ #define UCL_TRUE 1 /** False. * @ingroup UCL_RETURN */ #define UCL_FALSE 0 /* ========================================================================== */ /** No error occured. * @ingroup UCL_RETURN */ #define UCL_OK 0 /** Generic Error. * @ingroup UCL_RETURN */ #define UCL_ERROR -1 /** Not a failure but no operation was performed. * @ingroup UCL_RETURN */ #define UCL_NOP -2 /** Invalid cipher specified. * @ingroup UCL_RETURN */ #define UCL_INVALID_CIPHER -3 /** Invalid hash specified. * @ingroup UCL_RETURN */ #define UCL_INVALID_HASH -4 /** Generic invalid argument. * @ingroup UCL_RETURN */ #define UCL_INVALID_ARG -5 /** Invalid argument input. * @ingroup UCL_RETURN */ #define UCL_INVALID_INPUT -6 /** Invalid argument output. * @ingroup UCL_RETURN */ #define UCL_INVALID_OUTPUT -7 /** Invalid precision for Fixed-Precision Aritmetic. * @ingroup UCL_RETURN */ #define UCL_INVALID_PRECISION -8 /** Invalid RSA public key. * @ingroup UCL_RETURN */ #define UCL_INVALID_RSAPUBKEY -9 /** Invalid RSA private key. * @ingroup UCL_RETURN */ #define UCL_INVALID_RSAPRIVKEY -10 /** Invalid RSA CRT key. * @ingroup UCL_RETURN */ #define UCL_INVALID_RSACRTKEY -11 /** Invalid RSA CRT alternative key. * @ingroup UCL_RETURN */ #define UCL_INVALID_RSACRTALTKEY -12 /** Error during CRT recomposition. * @ingroup UCL_RETURN */ #define UCL_RSACRT_ERROR -13 /** Error, division by zero. * @ingroup UCL_RETURN */ #define UCL_DIVISION_BY_ZERO -14 /** Invalid chosen mode. * @ingroup UCL_RETURN */ #define UCL_INVALID_MODE -15 /** Large number with invalid sign. * @ingroup UCL_RETURN */ #define UCL_INVALID_SIGN -16 /** Invalid input for RSA. * @ingroup UCL_RETURN */ #define UCL_RSA_INVALID_INPUT -17 /** TRNG timeout. * @ingroup UCL_RETURN */ #define UCL_RNGTIMEOUT -18 /** RSA PKCS1-v1.5 decryption error. * @ingroup UCL_RETURN */ #define UCL_RSAPKCS1_DECRYPTERR -19 /** Overflow. * @ingroup UCL_RETURN */ #define UCL_OVERFLOW -20 /** Error in the case of the function is disabled. * @ingroup UCL_RETURN */ #define UCL_FUNCTION_DISABLED -21 /** (Big) Integer not odd. * @ingroup UCL_RETURN */ #define UCL_INTEGER_NOT_ODD -22 /** Invalid exponant of RSA key. * @ingroup UCL_RETURN */ #define UCL_RSA_INVALID_EXPONANT -23 /** UCL Stack overflow. * Not enough memory. * @ingroup UCL_RETURN */ #define UCL_STACK_OVERFLOW -24 /** UCL Stack not init. * @see ucl_stack_init * @ingroup UCL_RETURN */ #define UCL_STACK_NOT_INIT -25 /** Invalid UCL Stack free. * @ingroup UCL_RETURN */ #define UCL_STACK_INVALID_FREE -26 /** The UCL Stack is disabled. * @ingroup UCL_RETURN */ #define UCL_STACK_DEFAULT -27 /** Use default UCL stack. * @ingroup UCL_RETURN */ #define UCL_STACK_ERROR -28 /** General Warning. * @ingroup UCL_RETURN */ #define UCL_WARNING -29 /** PKCS1V25 Error - Invalid Signature . * @ingroup UCL_RETURN */ #define UCL_PKCS1_INVALID_SIGNATURE -30 /** No Interface for USIP® AES. * @ingroup UCL_RETURN */ #define UCL_NO_UAES_INTERFACE -31 /** USIP® AES Corrupted. * @ingroup UCL_RETURN */ #define UCL_UAES_CORRUPTED -32 /** USIP® AES Error. * @ingroup UCL_RETURN */ #define UCL_UAES_ERROR -33 /** USIP® TRNG Error. * @ingroup UCL_RETURN */ #define UCL_TRNG_ERROR -34 /** No Interface for USIP® TRNG. * @ingroup UCL_RETURN */ #define UCL_NO_TRNG_INTERFACE -35 /** No Interface for USIP® TRNG. * @ingroup UCL_RETURN */ #define UCL_TRNG_CORRUPTED -36 /** USIP® UCL Not Init. * @ingroup UCL_RETURN */ #define UCL_NOT_INIT -37 /** ECC key is invalid. * @ingroup UCL_RETURN */ #define UCL_ECC_INVALID_KEY -38 /** RNG Interface Error. * @ingroup UCL_RETURN */ #define UCL_RNG_ERROR -39 /** Functionality not implemented. * @ingroup UCL_RETURN */ #define UCL_NOT_IMPLEMENTED -99 #endif /* UCL_RETDEFS_H_ */