Manuals
/
Brands
/
TV and Video
/
Projection Television
/
RSA Security
/
TV and Video
/
Projection Television
RSA Security
5
The ITEM Structure
1
24
376
376
Download
376 pages, 2.18 Mb
The ITEM Structure
14
RSA BSAFE Crypto-C Library Reference Manual
The ITEM Structure
Often, Crypto-C requires that input be in the form of an
ITEM
structure, defined as
follows:
typedef struct {
unsigned char *
data
;
unsigned int
len
;
}
ITEM
;
Contents
Main
Page
Contents
Page
Page
Chapter 3 Key Info Types 245
Chapter 4 Details of Crypto-C Functions 289
Page
Page
Page
Introduction
Organization
The Crypto-C Environment
Memory Management
Code Example
Code Example
The main work in
6 RSA BSAFE Crypto-C Library Reference Manual
is done by the functions B_EncryptInit,
Page
The Algorithm Object
The Key Object
The Algorithm Chooser
The BDEMO Algorithm Chooser
Defining an Algorithm Chooser
Page
The Surrender Function
Surrender
The ITEM Structure
Algorithm Info Types
16 RSA BSAFE Crypto-C Library Reference Manual
Type of information this allows you to use:
Format of info supplied to B_SetAlgorithmInfo:
Crypto-C procedures to use with algorithm object:
Algorithm methods to include in applications algorithm chooser:
AI_BSSecretSharing
Page
AI_CBC_IV8
AI_CBC_IV16
AI_DES_CBC_BSAFE1
Page
AI_DES_CBC_IV8
Page
AI_DES_CBCPadBER
Page
AI_DES_CBCPadIV8
Page
AI_DES_CBCPadPEM
Page
AI_DES_EDE3_CBC_IV8
Page
AI_DES_EDE3_CBCPadBER
Page
AI_DES_EDE3_CBCPadIV8
Page
AI_DESX_CBC_BSAFE1
Page
AI_DESX_CBC_IV8
Page
AI_DESX_CBCPadBER
Page
AI_DESX_CBCPadIV8
Page
AI_DHKeyAgree
Page
AI_DHKeyAgreeBER
Page
AI_DHParamGen
AI_DSA
Page
AI_DSAKeyGen
Page
AI_DSAParamGen
AI_DSAWithSHA1
Page
AI_DSAWithSHA1_BER
Page
AI_ECAcceleratorTable
AI_ECBuildAcceleratorTable
Page
AI_ECBuildPubKeyAccelTable
Page
AI_EC_DHKeyAgree
Page
AI_EC_DSA
Page
AI_EC_DSAWithDigest
Page
AI_EC_ES
AI_ECKeyGen
Page
AI_ECParameters
AI_ECParameters
Set the arguments as follows:
AI_ECParameters The possible values for FT_X962_NAMED_CURVE_TYPE are:
Page
AI_ECParametersBER
Page
AI_ECParamGen
AI_ECParamGen
Set the arguments as follows:
This AI allows you to generate EC parameters to be used for elliptic curve operations.
pointer to a B_EC_PARAM_GEN_PARAMS structure:
AI_ECParamGen
Note: The parameter range given above for
includes values that are not secure. If you pass 0 for
pointer to a B_EC_PARAM_GEN_PARAMS structure (see above).
Page
AI_ECPubKey
Page
AI_ECPubKeyBER
Can get this info type if algorithm object already has:
AI_FeedbackCipher
Type of padding schemes available:
The RC2 algorithm methods, AM_RC2_ENCRYPT and AM_RC2_DECRYPT, require an
The RC6 algorithm methods, AM_RC6_ENCRYPT and AM_RC6_DECRYPT, require an
Page
The CFB modes require a B_CFB_PARAMS structure:
Depends on cipher type, as follows:
Compatible representations:
AI_HMAC
Page
AI_HW_Random
AI_KeypairTokenGen
Page
AI_MAC
AI_MD
AI_MD2
Page
AI_MD2_BER
Page
AI_MD2_PEM
Page
AI_MD2Random
AI_MD2WithDES_CBCPad
Page
AI_MD2WithDES_CBCPadBER
Page
AI_MD2WithRC2_CBCPad
Page
AI_MD2WithRC2_CBCPadBER
Page
AI_MD2WithRSAEncryption
Page
AI_MD2WithRSAEncryptionBER
Page
AI_MD5
AI_MD5_BER
Page
AI_MD5_PEM
Page
AI_MD5Random
AI_MD5WithDES_CBCPad
Page
AI_MD5WithDES_CBCPadBER
Page
AI_MD5WithRC2_CBCPad
Page
Page
AI_MD5WithRC2_CBCPadBER
Page
AI_MD5WithRSAEncryption
Page
AI_MD5WithRSAEncryptionBER
Page
AI_MD5WithXOR
Page
AI_MD5WithXOR_BER
Page
AI_PKCS_OAEP_RSAPrivate
Page
Page
Page
AI_PKCS_OAEP_RSAPrivateBER
Chapter 2 Algorithm Info Types 145
AI_PKCS_OAEP_RSAPrivateBER Simple DER encoding for the default algorithm:
AI_PKCS_OAEP_RSAPrivateBER
146 RSA BSAFE Crypto-C Library Reference Manual
Page
AI_PKCS_OAEP_RSAPublic
Page
Page
Page
AI_PKCS_OAEP_RSAPublicBER
Chapter 2 Algorithm Info Types 153
AI_PKCS_OAEP_RSAPublicBER
154 RSA BSAFE Crypto-C Library Reference Manual
Page
Page
AI_PKCS_OAEPRecode
Page
Page
Page
AI_PKCS_OAEPRecodeBER
AI_PKCS_OAEPRecodeBER
162 RSA BSAFE Crypto-C Library Reference Manual
encoding of the default algorithm is given first, followed by the general syntax.
Chapter 2 Algorithm Info Types 163
AI_PKCS_OAEPRecodeBER
Page
Page
AI_PKCS_RSAPrivate
Page
AI_PKCS_RSAPrivateBER
Page
AI_PKCS_RSAPrivatePEM
Page
AI_PKCS_RSAPublic
Page
AI_PKCS_RSAPublicBER
Page
AI_PKCS_RSAPublicPEM
Page
AI_RC2_CBC
Page
AI_RC2_CBC_BSAFE1
Page
AI_RC2_CBCPad
Page
AI_RC2_CBCPadBER
Page
AI_RC2_CBCPadPEM
Page
AI_RC4
Page
AI_RC4_BER
Page
AI_RC4WithMAC
Page
AI_RC4WithMAC_BER
Page
AI_RC5_CBC
Page
AI_RC5_CBCPad
Page
AI_RC5_CBCPadBER
Page
AI_RC6_CBC
Page
AI_RC6_CBCPad
Page
AI_RESET_IV
AI_RFC1113Recode
AI_RSAKeyGen
Page
AI_RSAPrivate
Page
AI_RSAPrivateBSAFE1
Page
AI_RSAPublic
Page
AI_RSAPublicBSAFE1
Page
AI_RSAStrongKeyGen
Page
AI_SET_OAEP_RSAPrivate
Input considerations:
AI_SET_OAEP_RSAPublic
Page
AI_SHA1
AI_SHA1_BER
Page
AI_SHA1Random
AI_SHA1WithDES_CBCPad
Page
AI_SHA1WithDES_CBCPadBER
Page
AI_SHA1WithRSAEncryption
Page
AI_SHA1WithRSAEncryptionBER
Page
AI_SignVerify
AI_SignVerify
is formatX931,
If
must be given a pointer to a structure of type A_X931_PARAMS:
Set the arguments for A_X931_PARAMS as follows:
Algorithm methods to include in applications algorithm chooser:
Key info types for keyObject in B_SignInit or B_VerifyInit:
AI_SymKeyTokenGen
Page
AI_X931Random
BSAFE procedures to use with algorithm object:
Notes
AI_X962Random_V0
Page
Key Info Types
246 RSA BSAFE Crypto-C Library Reference Manual
Type of information this allows you to use:
Format of info supplied to B_SetKeyInfo:
Can get this info type if key object already has:
Format of info returned by B_GetKeyInfo:
KI_8Byte
KI_24Byte
KI_DES8
KI_DES8Strong
KI_DES24Strong
KI_DES_BSAFE1
KI_DESX
KI_DESX_BSAFE1
KI_DSAPrivate
Page
KI_DSAPrivateBER
KI_DSAPrivateX957BER
KI_DSAPublic
Page
KI_DSAPublicBER
KI_DSAPublicX957BER
KI_ECPrivate
KI_ECPrivateBER
KI_ECPrivateComponent
KI_ECPrivateComponentBER
KI_ECPublic
KI_ECPublicBER
KI_ECPublicComponent
KI_ECPublicComponentBER
KI_ExtendedToken
Page
KI_Item
KI_KeypairToken
Page
KI_PKCS_RSAPrivate
Page
KI_PKCS_RSAPrivateBER
KI_RC2_BSAFE1
KI_RC2WithBSAFE1Params
KI_RSA_CRT
KI_RSAPrivate
Note:
Page
KI_RSAPrivateBSAFE1
KI_RSAPublic
KI_RSAPublicBER
KI_RSAPublicBSAFE1
KI_Token
Details of Crypto-C Functions
B_BuildTableFinal
B_BuildTableGetBufSize
B_BuildTableInit
B_CreateAlgorithmObject
B_CreateKeyObject
B_CreateSessionChooser
B_DecodeDigestInfo
B_DecodeFinal
B_DecodeInit
B_DecodeUpdate
B_DecryptFinal
B_DecryptInit
B_DecryptUpdate
B_DestroyAlgorithmObject
B_DestroyKeyObject
B_DigestFinal
B_DigestInit
B_DigestUpdate
B_EncodeDigestInfo
B_EncodeFinal
B_EncodeInit
B_EncodeUpdate
B_EncryptFinal
B_EncryptInit
B_EncryptUpdate
B_FreeSessionChooser
B_GenerateInit
B_GenerateKeypair
B_GenerateParameters
B_GenerateRandomBytes
B_GetAlgorithmInfo
B_GetExtendedErrorInfo
B_GetKeyExtendedErrorInfo
B_GetKeyInfo
B_IntegerBits
B_KeyAgreeInit
B_KeyAgreePhase1
B_KeyAgreePhase2
B_RandomInit
B_RandomUpdate
B_SetAlgorithmInfo
B_SetKeyInfo
B_SignFinal
B_SignInit
B_SignUpdate
B_SymmetricKeyGenerate
B_SymmetricKeyGenerateInit
B_VerifyFinal
B_VerifyInit
B_VerifyUpdate
T_free
T_malloc
T_memcmp
T_memcpy
T_memmove
T_memset
T_realloc
T_strcmp
T_strcpy
T_strlen
Page
Appendix A
Crypto-C Error Types
This appendix lists the RSA BSAFE Crypto-C (Crypto-C) error types.
Page
Page
Page
Platform-Specific Types and Constants
Type s
POINTER
UINT2
UINT4
Constants
Page
References
Page
Index
362 RSA BSAFE Crypto-C Library Reference Manual
Page
364 RSA BSAFE Crypto-C Library Reference Manual