1 /* 2 * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 8 #ifndef _CC_FFC_DOMAIN_ERROR_H 9 #define _CC_FFC_DOMAIN_ERROR_H 10 11 12 #include "cc_error.h" 13 14 15 #ifdef __cplusplus 16 extern "C" 17 { 18 #endif 19 20 /*! 21 @file 22 @brief This file contains error codes definitions for CryptoCell FFC_DOMAIN module. 23 @defgroup ffccc_dh_error CryptoCell FFC_DOMAIN specific errors 24 @{ 25 @ingroup cc_ffc_domain 26 */ 27 /************************ Defines ******************************/ 28 29 /* FFC_DOMAIN module on the CryptoCell layer base address - 0x00F02C00 */ 30 31 /*! Invalid input pointer.*/ 32 #define CC_FFC_DOMAIN_INVALID_ARGUMENT_PTR_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x00UL) 33 /*! Invalid input size.*/ 34 #define CC_FFC_DOMAIN_INVALID_ARGUMENT_SIZE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x01UL) 35 /*! A pointer and size of optional parameter not meets one to other: one is zero, but other - not. */ 36 #define CC_FFC_DOMAIN_INVALID_OPTIONAL_PARAM_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x02UL) 37 /*! Invalid pointer to domain structure. */ 38 #define CC_FFC_DOMAIN_INVALID_DOMAIN_PTR_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x03UL) 39 /*! Invalid pointer to random function Context. */ 40 #define CC_FFC_DOMAIN_INVALID_RND_CTX_PTR_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x04UL) 41 /*! Invalid pointer to random function inside the Context. */ 42 #define CC_FFC_DOMAIN_INVALID_RND_FUNCTION_PTR_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x05UL) 43 /*! Invalid Domain validation Tag. */ 44 #define CC_FFC_DOMAIN_VALIDATION_TAG_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x06UL) 45 /*! Invalid enumerator of FFC sizes standard set ID. */ 46 #define CC_FFC_DOMAIN_INVALID_SIZES_SET_ID_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x07UL) 47 /*! Invalid enumerator of hash mode. */ 48 #define CC_FFC_DOMAIN_INVALID_HASH_MODE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x08UL) 49 /*! Invalid enumerator of seed generation mode. */ 50 #define CC_FFC_DOMAIN_INVALID_SEED_GENERATION_MODE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x09UL) 51 /*! Invalid enumerator of Domain validation mode. */ 52 #define CC_FFC_DOMAIN_INVALID_VALIDAT_MODE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x0AUL) 53 /*! Invalid Hash mode: size of Hash too low for required security. */ 54 #define CC_FFC_DOMAIN_INVALID_LOW_HASH_SIZE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x0BUL) 55 /*! Invalid prime modulus size. */ 56 #define CC_FFC_DOMAIN_INVALID_PRIME_SIZE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x10UL) 57 /*! Invalid FFC sub-group Order size. */ 58 #define CC_FFC_DOMAIN_INVALID_ORDER_SIZE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x11UL) 59 /*! Invalid Domain generation Seed pointer. */ 60 #define CC_FFC_DOMAIN_INVALID_SEED_PTR_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x12UL) 61 /*! Invalid Domain generation Seed size. */ 62 #define CC_FFC_DOMAIN_INVALID_SEED_SIZE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x13UL) 63 /*! Invalid FFC Domain Prime value. */ 64 #define CC_FFC_DOMAIN_PRIME_NOT_VALID_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x14UL) 65 /*! Invalid FFC Domain Order value. */ 66 #define CC_FFC_DOMAIN_ORDER_NOT_VALID_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x15UL) 67 /*! Invalid FFC Domain sub-group Generator. */ 68 #define CC_FFC_DOMAIN_GENERATOR_NOT_VALID_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x16UL) 69 /*! Invalid FFC Domain generation Counter. */ 70 #define CC_FFC_DOMAIN_GEN_COUNTER_NOT_VALID_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x17UL) 71 /*! Seed is not required by given DH Scheme. */ 72 #define CC_FFC_DOMAIN_SEED_IS_NOT_REQUIRED_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x18UL) 73 /*! Domain generation is failed. */ 74 #define CC_FFC_DOMAIN_GENERATION_FAILURE_ERROR (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0x19UL) 75 76 #define CC_FFC_DOMAIN_IS_NOT_SUPPORTED (CC_FFC_DOMAIN_MODULE_ERROR_BASE + 0xFFUL) 77 78 79 #ifdef __cplusplus 80 } 81 #endif 82 /** 83 @} 84 */ 85 86 #endif 87 88