Return codes

This section contains all of the possible return codes in Security Builder Crypto. The return codes are defined in sbreturn.h

General Return Codes

SB_SUCCESS (0x0000)
Success
SB_NOT_IMPLEMENTED (0xFFFE)
Success
SB_FAILURE (0xFFFF)

Common Return Codes

SB_ERR_NULL_PARAMS (0xE101)
One of the parameters passed a NULL value
SB_ERR_NULL_PARAMS_PTR (0xE102)
One of the parameters, which is a pointer, was NULL
SB_ERR_BAD_PARAMS (0xE103)
SB_ERR_NULL_CONTEXT (0xE104)
SB_ERR_NULL_CONTEXT_PTR (0xE105)
SB_ERR_BAD_CONTEXT (0xE106)
SB_ERR_NULL_RNG (0xE107)
SB_ERR_NO_RNG (0xE108)
SB_ERR_BAD_RNG_TYPE (0xE109)
SB_ERR_BAD_RNG_CONTEXT (0xE10A)
SB_ERR_BAD_YIELD_CONTEXT (0xE10B)
SB_ERR_NULL_KEY (0xE10C)
SB_ERR_NULL_KEY_PTR (0xE10D)
SB_ERR_BAD_KEY (0xE10E)
SB_ERR_NULL_KEY_LEN (0xE10F)
SB_ERR_BAD_KEY_LEN (0xE110)
SB_ERR_NULL_PRIVATE_KEY (0xE111)
SB_ERR_BAD_PRIVATE_KEY (0xE112)
SB_ERR_NULL_PRI_KEY_BUF (0xE113)
SB_ERR_BAD_PRI_KEY_BUF_LEN (0xE114)
SB_ERR_NULL_PUBLIC_KEY (0xE115)
SB_ERR_BAD_PUBLIC_KEY (0xE116)
SB_ERR_NULL_PUB_KEY_BUF (0xE117)
SB_ERR_BAD_PUB_KEY_BUF_LEN (0xE118)
SB_ERR_NULL_INPUT (0xE119)
SB_ERR_NULL_INPUT_LEN (0xE11A)
SB_ERR_BAD_INPUT_LEN (0xE11B)
SB_ERR_NULL_INPUT_BUF (0xE11C)
SB_ERR_BAD_INPUT_BUF_LEN (0xE11D)
SB_ERR_BAD_INPUT (0xE11E)
SB_ERR_NULL_OUTPUT (0xE11F)
SB_ERR_NULL_OUTPUT_BUF (0xE120)
SB_ERR_NULL_OUTPUT_BUF_LEN_PTR (0xE121)
SB_ERR_NULL_OUTPUT_BUF_LEN (0xE122)
SB_ERR_BAD_OUTPUT_BUF_LEN (0xE123)
SB_ERR_NULL_ADDINFO (0xE124)
SB_ERR_BAD_ALG (0xE125)
SB_ERR_BAD_FLAG (0xE126)
SB_ERR_NULL_BUFFER (0xE127)
SB_ERR_NULL_LENGTH (0xE128)
SB_ERR_BAD_LENGTH (0xE129)
SB_ERR_OVERFLOW (0xE12A)
SB_ERR_NULL_HASH_INFO (0xE12B)
SB_ERR_PRI_KEY_NOT_EXPORTABLE (0xE12C)
The private key object cannot be exported.
SB_ERR_PUB_KEY_NOT_EXPORTABLE (0xE12D)
The public key object cannot be exported.
SB_ERR_SYM_KEY_NOT_EXPORTABLE (0xE12E)
The symmetric key object cannot be exported

Key Agreement Scheme Return Codes

SB_ERR_NULL_EPHEM_PRI_KEY (0xE201)
SB_ERR_BAD_EPHEM_PRI_KEY (0xE202)
SB_ERR_NULL_EPHEM_PUB_KEY (0xE203)
SB_ERR_BAD_EPHEM_PUB_KEY (0xE204)
SB_ERR_NULL_REM_EPHEM_PUB_KEY (0xE205)
SB_ERR_BAD_REM_EPHEM_PUB_KEY (0xE206)
SB_ERR_NULL_REM_PUB_KEY (0xE207)
SB_ERR_BAD_REM_PUB_KEY (0xE208)

Signature Scheme Return Codes

SB_ERR_NULL_SIGNATURE (0xE301)
SB_ERR_NULL_SIGNATURE_LEN (0xE302)
SB_ERR_BAD_SIGNATURE_LEN (0xE303)
SB_ERR_NULL_S_VALUE (0xE305)
SB_ERR_NULL_S_VALUE_LEN (0xE306)
SB_ERR_BAD_S_VALUE_LEN (0xE307)
SB_ERR_NULL_R_VALUE (0xE308)
SB_ERR_NULL_R_VALUE_LEN (0xE309)
SB_ERR_BAD_R_VALUE_LEN (0xE30A)
SB_ERR_BAD_HASH_TYPE (0xE30B)

EC Calculator Return Codes

SB_ERR_NULL_ORDER_INT (0xE501)
SB_ERR_NULL_ORDER_INT_PTR (0xE502)
SB_ERR_BAD_ORDER_INT (0xE503)
SB_ERR_NULL_ECPOINT (0xE504)
SB_ERR_NULL_ECPOINT_PTR (0xE505)
SB_ERR_BAD_ECPOINT (0xE506)

IDLC Return Codes

SB_ERR_NULL_IDLC_P (0xE601)
SB_ERR_BAD_IDLC_P_LEN (0xE602)
SB_ERR_BAD_IDLC_P (0xE603)
SB_ERR_NULL_IDLC_Q (0xE604)
SB_ERR_BAD_IDLC_Q_LEN (0xE605)
SB_ERR_BAD_IDLC_Q (0xE606)
SB_ERR_NULL_IDLC_G (0xE607)
SB_ERR_BAD_IDLC_G_LEN (0xE608)
SB_ERR_BAD_IDLC_G (0xE609)

RSA Return Codes

SB_ERR_BAD_PUB_EXP_LEN (0xE701)
SB_ERR_NULL_RSA_N (0xE702)
SB_ERR_BAD_RSA_N_LEN (0xE703)
SB_ERR_BAD_RSA_N (0xE704)
SB_ERR_NULL_RSA_E (0xE705)
SB_ERR_BAD_RSA_E_LEN (0xE706)
SB_ERR_BAD_RSA_E (0xE707)
SB_ERR_NULL_RSA_D (0xE708)
SB_ERR_BAD_RSA_D_LEN (0xE709)
SB_ERR_BAD_RSA_D (0xE70A)
SB_ERR_NULL_RSA_P (0xE70B)
SB_ERR_BAD_RSA_P_LEN (0xE70C)
SB_ERR_BAD_RSA_P (0xE70D)
SB_ERR_NULL_RSA_Q (0xE70E)
SB_ERR_BAD_RSA_Q_LEN (0xE70F)
SB_ERR_BAD_RSA_Q (0xE711)
SB_ERR_NULL_RSA_QINV (0xE712)
SB_ERR_BAD_RSA_QINV_LEN (0xE713)
SB_ERR_BAD_RSA_QINV (0xE714)
SB_ERR_NULL_RSA_DP (0xE715)
SB_ERR_BAD_RSA_DP_LEN (0xE716)
SB_ERR_BAD_RSA_DP (0xE717)
SB_ERR_NULL_RSA_DQ (0xE718)
SB_ERR_BAD_RSA_DQ_LEN (0xE719)
SB_ERR_BAD_RSA_DQ (0xE71A)
SB_ERR_RSA_CRT_NOT_AVAILABLE (0xE71B)
SB_FAIL_BAD_PADDING (0xF701)
SB_FAIL_PKCS1_DECRYPT (0xF702)

Block Cipher Return Codes

SB_ERR_BAD_MODE (0xE801)
SB_ERR_BAD_ALGORITHM (0xE802)
SB_ERR_BAD_KEY_PARITY (0xE803)
SB_ERR_BAD_KEY_OPTION (0xE804)
SB_ERR_BAD_NUM_KEYS (0xE805)
SB_ERR_BAD_ROUNDS (0xE806)
SB_ERR_NULL_IV (0xE807)
SB_ERR_BAD_IV_LEN (0xE808)
SB_ERR_WEAK_KEY (0xE809)
SB_ERR_BAD_BLOCK_LEN (0xE80A)
SB_ERR_BAD_KEY_UNWRAP (0xE80B)
SB_ERR_NO_MODE (0xE80C)
SB_ERR_INVALID_MAC (0xE80D)
SB_ERR_MAC_INVALID (0xE80E)
SB_ERR_BAD_IV (0xE80F)

Hash Algorithm Return Codes

SB_ERR_BAD_DIGEST_LEN (0xE901)
SB_ERR_BAD_MESSAGE_LEN (0xE902)

DRBG Return Codes

SB_ERR_RNG_BAD_DRBG_CONTEXT (0xEA01)
SB_ERR_RNG_INVALID_HANDLE (0xEA02)
SB_ERR_RNG_BAD_HANDLE (0xEA03)
SB_ERR_RNG_NO_MORE_HANDLE (0xEA04)
SB_ERR_RNG_SECURITY_STRENGTH_TOO_SMALL (0xEA05)
SB_ERR_RNG_SECURITY_STRENGTH_NOT_SUPPORTED (0xEA06)
SB_ERR_RNG_PREDICTIVE_RESISTANCE_NOT_SUPPORTED (0xEA07)
SB_ERR_RNG_PERSONALIZATION_STRING_TOO_BIG (0xEA08)
SB_ERR_RNG_ADDITIONAL_INPUT_TOO_BIG (0xEA09)
SB_ERR_RNG_REQUESTED_BYTES_TOO_BIG (0xEA0A)
SB_ERR_RNG_REQUESTED_SECURITY_TOO_BIG (0xEA0B)
SB_ERR_RNG_REQUESTED_HASH_DERIVE_TOO_BIG (0xEA0C)
SB_ERR_RNG_RESEED_IS_REQUIRED (0xEA0D)
SB_ERR_RNG_NULL_TIME_CALLBACK (0xEA0E)

Global Context Error Return Codes

SB_ERR_NULL_GLOBAL_CTX (0xEF01)
SB_ERR_NULL_GLOBAL_CTX_PTR (0xEF02)
SB_ERR_BAD_GLOBAL_CTX (0xEF03)

Common Failure Return Codes

SB_FAIL_ALLOC (0xF001)
SB_FAIL_KEYGEN (0xF002)
SB_FAIL_LOCK (0xF003)
SB_FAIL_UNLOCK (0xF004)
SB_FAIL_NULL_PTR (0xF005)
SB_FAIL_INVALID_PRIVATE_KEY (0xF006)
SB_FAIL_CANNOT_LOAD_LIBRARY (0xF007)
SB_FAIL_LIBRARY_DISABLED (0xF008)
SB_FAIL_INTEGRITY (0xF009)
SB_FAIL_KAT (0xF00A)
SB_FAIL_OPEN_FILE (0xF00B)
SB_FAIL_READ_FILE (0xF00C)
SB_FAIL_LIBRARY_ALREADY_INIT (0xF00D)
SB_FAIL_LIBRARY_NOT_INIT (0xF00E)

ECC Failure Return Codes

SB_FAIL_ECIES_HMAC (0xF501)
SB_FAIL_INVALID_SHARED_SECRET (0xF502)
SB_FAIL_INVALID_SIGNATURE (0xF503)

RNG Failure Return Codes

SB_FAIL_RANDOM_GEN (0xFA01)

Math Return Codes

SB_FAIL_DIVIDE_BY_ZERO (0xFB01)
SB_FAIL_NO_INVERSE (0xFB02)
SB_FAIL_NO_SOLUTION (0xFC01)
SB_ERR_MODULUS_TOO_BIG (0xFC02)
SB_ERR_MODULUS_TOO_SMALL (0xFC03)
SB_FAIL_PRIME_GEN (0xFE01)
SB_ERR_POINT_AT_INFINITY (0xFF00)

Internal Return Codes

SB_ERR_NULL_PROVIDER (0x3001)
The provider argument is NULL.
SB_ERR_NULL_PROVIDER_PTR (0x3002)
The pointer to provider object is NULL.
SB_ERR_NULL_SESSION (0x3004)
The "init" function for the provider was not called; i.e. cryptographic support has not been registered in the global context.

Unregistered Component

SB_ERR_ECC_NOT_SUPPORTED (0x3015)
The provider does not have the crypto algorithm ECC registered
SB_ERR_ECC_CURVE_SECT163K1_NOT_SUPPORTED (0x3016)
The provider does not have ECC curve sect163k1 registered
SB_ERR_ECC_CURVE_SECT163R2_NOT_SUPPORTED (0x3017)
The provider does not have ECC curve sect163r2 registered
SB_ERR_ECC_CURVE_SECT233K1_NOT_SUPPORTED (0x3018)
The provider does not have ECC curve sect233k1 registered
SB_ERR_ECC_CURVE_SECT233R1_NOT_SUPPORTED (0x3019)
The provider does not have ECC curve sect233r1 registered
SB_ERR_ECC_CURVE_SECT239K1_NOT_SUPPORTED (0x301A)
The provider does not have ECC curve sect239k1 registered
SB_ERR_ECC_CURVE_SECT283K1_NOT_SUPPORTED (0x301B)
The provider does not have ECC curve sect283k1 registered
SB_ERR_ECC_CURVE_SECT283R1_NOT_SUPPORTED (0x301C)
The provider does not have ECC curve sect283r1 registered
SB_ERR_ECC_CURVE_SECT409K1_NOT_SUPPORTED (0x301D)
The provider does not have ECC curve sect409k1 registered
SB_ERR_ECC_CURVE_SECT409R1_NOT_SUPPORTED (0x301E)
The provider does not have ECC curve sect409r1 registered
SB_ERR_ECC_CURVE_SECT571K1_NOT_SUPPORTED (0x301F)
The provider does not have ECC curve sect571k1 registered
SB_ERR_ECC_CURVE_SECT571R1_NOT_SUPPORTED (0x3020)
The provider does not have ECC curve sect571r1 registered
SB_ERR_ECC_CURVE_SECP160R1_NOT_SUPPORTED (0x3021)
The provider does not have ECC curve secp160r1 registered
SB_ERR_ECC_CURVE_SECP192R1_NOT_SUPPORTED (0x3022)
The provider does not have ECC curve secp192r1 registered
SB_ERR_ECC_CURVE_SECP224R1_NOT_SUPPORTED (0x3023)
The provider does not have ECC curve secp224r1 registered
SB_ERR_ECC_CURVE_SECP256R1_NOT_SUPPORTED (0x3024)
The provider does not have ECC curve secp256r1 registered
SB_ERR_ECC_CURVE_SECP384R1_NOT_SUPPORTED (0x3025)
The provider does not have ECC curve secp384r1 registered
SB_ERR_ECC_CURVE_SECP521R1_NOT_SUPPORTED (0x3026)
The provider does not have ECC curve secp521r1 registered
SB_ERR_ECC_CURVE_WTLS5_NOT_SUPPORTED (0x3027)
The provider does not have ECC curve wtls5 registered
SB_ERR_ECC_CURVE_WAPI1_NOT_SUPPORTED (0x3028)
The provider does not have ECC curve wapi1 registered
SB_ERR_ECC_CURVE_GBP320T1_NOT_SUPPORTED
The provider does not have ECC Brainpool curve gbp320t1 registered
SB_ERR_ECC_CURVE_GBP320R1_NOT_SUPPORTED
The provider does not have ECC Brainpool curve gbp320r1 registered
SB_ERR_ECC_BAD_CURVE (0x302F)
The ECC curve ID is not valid
SB_ERR_RSA_NOT_SUPPORTED (0x3030)
The provider does not have the crypto algorithm RSA registered
SB_ERR_IDLC_NOT_SUPPORTED (0x3031)
The provider does not have the crypto algorithm IDLC registered
SB_ERR_AES_NOT_SUPPORTED (0x3032)
The provider does not have the crypto algorithm AES registered
SB_ERR_DES_NOT_SUPPORTED (0x3033)
The provider does not have the crypto algorithm DES registered
SB_ERR_ARC2_NOT_SUPPORTED (0x3034)
The provider does not have the crypto algorithm ARC2 registered
SB_ERR_ARC4_NOT_SUPPORTED (0x3035)
The provider does not have the crypto algorithm ARC4 registered
SB_ERR_RC5_NOT_SUPPORTED (0x3036)
The provider does not have the crypto algorithm RC5 registered
SB_ERR_AUTHENC_NOT_SUPPORTED (0x3037)
The provider does not have the crypto algorithm Authenticated Encryption registered
SB_ERR_MD2_NOT_SUPPORTED (0x3040)
The provider does not have the crypto algorithm MD2 registered
SB_ERR_MD4_NOT_SUPPORTED (0x3041)
The provider does not have the crypto algorithm MD4 registered
SB_ERR_MD5_NOT_SUPPORTED (0x3042)
The provider does not have the crypto algorithm MD5 registered
SB_ERR_SHA1_NOT_SUPPORTED (0x3043)
The provider does not have the crypto algorithm SHA1 registered
SB_ERR_SHA224_NOT_SUPPORTED (0x3044)
The provider does not have the crypto algorithm SHA224 registered
SB_ERR_SHA256_NOT_SUPPORTED (0x3045)
The provider does not have the crypto algorithm SHA256 registered
SB_ERR_SHA384_NOT_SUPPORTED (0x3046)
The provider does not have the crypto algorithm SHA384 registered
SB_ERR_SHA512_NOT_SUPPORTED (0x3047)
The provider does not have the crypto algorithm SHA512 registered
SB_ERR_AES_MMO_NOT_SUPPORTED (0x3048)
The provider does not have the crypto algorithm AES MMO registered
SB_ERR_HMAC_MD2_NOT_SUPPORTED (0x3050)
The provider does not have the crypto algorithm HMAC MD2 registered
SB_ERR_HMAC_MD4_NOT_SUPPORTED (0x3051)
The provider does not have the crypto algorithm HMAC MD4 registered
SB_ERR_HMAC_MD5_NOT_SUPPORTED (0x3052)
The provider does not have the crypto algorithm HMAC MD5 registered
SB_ERR_HMAC_SHA1_NOT_SUPPORTED (0x3053)
The provider does not have the crypto algorithm HMAC SHA1 registered
SB_ERR_HMAC_SHA224_NOT_SUPPORTED (0x3054)
The provider does not have the crypto algorithm HMAC SHA224 registered
SB_ERR_HMAC_SHA256_NOT_SUPPORTED (0x3055)
The provider does not have the crypto algorithm HMAC SHA256 registered
SB_ERR_HMAC_SHA384_NOT_SUPPORTED (0x3056)
The provider does not have the crypto algorithm HMAC SHA384 registered
SB_ERR_HMAC_SHA512_NOT_SUPPORTED (0x3057)
The provider does not have the crypto algorithm HMAC SHA512 registered
SB_ERR_MAC_XCBC_AES_NOT_SUPPORTED (0x3058)
The provider does not have the crypto algorithm MAC XCBC AES registered
SB_ERR_MAC_CMAC_AES_NOT_SUPPORTED (0x3059)
The provider does not have the crypto algorithm CMAC AES registered
SB_ERR_RNG_NOT_SUPPORTED (0x3060)
The provider does not have a random number generator registered
SB_ERR_KDF_ANSI_SHA1_NOT_SUPPORTED (0x3061)
The provider does not have ANSI KDF using SHA-1 registered
SB_ERR_KDF_IEEE_KDF1_SHA1_NOT_SUPPORTED (0x3062)
The provider does not have IEEE KDF1 using SHA-1 registered
SB_ERR_KDF_ANSI_SHA224_NOT_SUPPORTED (0x3063)
The provider does not have ANSI KDF using SHA-224 registered
SB_ERR_KDF_ANSI_SHA256_NOT_SUPPORTED (0x3064)
The provider does not have ANSI KDF using SHA-256 registered
SB_ERR_KDF_ANSI_SHA384_NOT_SUPPORTED (0x3065)
The provider does not have ANSI KDF using SHA-384 registered
SB_ERR_KDF_ANSI_SHA512_NOT_SUPPORTED (0x3066)
The provider does not have ANSI KDF using SHA-512 registered
SB_ERR_KDF_PKCS5_V1_MD2_NOT_SUPPORTED (0x3067)
The provider does not have PKCS#5v1 KDF using MD2 registered
SB_ERR_KDF_PKCS5_V1_MD5_NOT_SUPPORTED (0x3068)
The provider does not have PKCS#5v1 KDF using MD5 registered
SB_ERR_KDF_PKCS5_V1_SHA1_NOT_SUPPORTED (0x3069)
The provider does not have PKCS#5v1 KDF using SHA-1 registered
SB_ERR_KDF_PKCS5_V2_SHA1_NOT_SUPPORTED (0x306A)
The provider does not have PKCS#5v2 KDF using SHA-1 registered
SB_ERR_KDF_PKCS5_V2_SHA256_NOT_SUPPORTED (0x306B)
The provider does not have PKCS#5v2 KDF using SHA-256 registered
SB_ERR_KDF_PKCS12_V1_SHA1_NOT_SUPPORTED (0x306C)
The provider does not have PKCS#12v2 KDF using SHA-1 registered
SB_ERR_KDF_PKCS12_V1_SHA256_NOT_SUPPORTED (0x306D)
The provider does not have PKCS#12v2 KDF using SHA-256 registered
SB_ERR_SEED_NOT_SUPPORTED (0x306E)
The provider does not have a seeding source registered
SB_ERR_KDF_BAD_ALGORITHM (0x306F)
The KDF algorithm id is invalid
SB_ERR_UNWRAP_FAILED (0x3070)
Unwrapping operation failed due to bad key or bad input data
SB_ERR_MULTI_DIGEST_EXCEEDED (0x3071)
More calls to multi-digest context than supported were attempted
SB_ERR_IDLC_GROUP_IPSEC_1_NOT_SUPPORTED (0x3080)
The provider does not have IPSec Group 1 registered
SB_ERR_IDLC_GROUP_IPSEC_2_NOT_SUPPORTED (0x3081)
The provider does not have IPSec Group 2 registered
SB_ERR_IDLC_GROUP_IPSEC_5_NOT_SUPPORTED (0x3082)
The provider does not have IPSec Group 5 registered
SB_ERR_IDLC_GROUP_WTLS_1_NOT_SUPPORTED (0x3083)
The provider does not have WTLS Group 1 registered
SB_ERR_IDLC_GROUP_WTLS_2_NOT_SUPPORTED (0x3084)
The provider does not have WTLS Group 2 registered
SB_ERR_IDLC_GROUP_IPSEC_14_NOT_SUPPORTED (0x3085)
The provider does not have IPSec Group 14 registered
SB_ERR_IDLC_GROUP_IPSEC_15_NOT_SUPPORTED (0x3086)
The provider does not have IPSec Group 15 registered
SB_ERR_IDLC_GROUP_IPSEC_16_NOT_SUPPORTED (0x3087)
The provider does not have IPSec Group 16 registered
SB_ERR_IDLC_GROUP_IPSEC_17_NOT_SUPPORTED (0x3088)
The provider does not have IPSec Group 17 registered
SB_ERR_IDLC_GROUP_IPSEC_18_NOT_SUPPORTED (0x3089)
The provider does not have IPSec Group 18 registered
SB_ERR_IDLC_BAD_GROUP (0x308F)
The provider does not recognize the requested group
SB_ERR_KDF_NIST_ALT1_NOT_SUPPORTED (0x3090)
The provider does not have NIST Alternative 1 KDF registered
SB_ERR_KDF_PKCS5_V2_SHA224_NOT_SUPPORTED (0x3091)
The provider does not have PKCS#5v2 KDF using SHA-224 registered
SB_ERR_KDF_PKCS5_V2_SHA384_NOT_SUPPORTED (0x3092)
The provider does not have PKCS#5v2 KDF using SHA-384 registered
SB_ERR_KDF_PKCS5_V2_SHA512_NOT_SUPPORTED (0x3093)
The provider does not have PKCS#5v2 KDF using SHA-512 registered
SB_ERR_KDF_PKCS12_V1_SHA224_NOT_SUPPORTED (0x3094)
The provider does not have PKCS#12v2 KDF using SHA-224 registered
SB_ERR_KDF_PKCS12_V1_SHA384_NOT_SUPPORTED (0x3095)
The provider does not have PKCS#12v2 KDF using SHA-384 registered
SB_ERR_KDF_PKCS12_V1_SHA512_NOT_SUPPORTED (0x3096)
The provider does not have PKCS#12v2 KDF using SHA-512 registered
SB_ERR_KS_NOT_SUPPORTED (0x3097)
The provider does not have Key Split registered
SB_ERR_ZMOD_CALC_NOT_SUPPORTED (0x3098)
The provider does not have ZMod Calculator registered

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus