RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

cryp_mod.h File Reference

This file contains the public definitions and function declarations of the cryptographic module.

See also:
Digest Size Defines, Symmetric Cipher Size Defines, Algorithm Support Return Values, Algorithm Identifiers, Operation Types, Operation Subtypes, Cryptographic Operation Property Identifiers, Behavior Modifying Flags and Cryptographic Context Information Defines.
#include "r_lib.h"
#include "r_com.h"
#include "r_nid.h"
#include "r_pkey.h"
#include "r_skey.h"
#include "c_impmth.h"
#include "nat_meth.h"
#include "cryp_macros.h"

Go to the source code of this file.

Data Structures

 R_CR_SIGN_VFY_MAP
 This structure is used to map a sign/verify identifier to an asymmetric and digest identifier pair. More...


Defines

#define R_CR_DIGEST_MD2_LEN
 Indicates the length of the generated MD2 digest.

#define R_CR_DIGEST_MD5_LEN
 Indicates the length of the generated MD5 digest.

#define R_CR_DIGEST_SHA1_LEN
 Indicates the length of the generated SHA-1 digest.

#define R_CR_DIGEST_SHA256_LEN
 Indicates the length of the generated SHA-256 digest.

#define R_CR_DIGEST_SHA384_LEN
 Indicates the length of the generated SHA-384 digest.

#define R_CR_DIGEST_SHA512_LEN
 Indicates the length of the generated SHA-512 digest.

#define R_CR_DIGEST_MAX_LEN
 Indicates the maximum length of the available digest types.

#define R_CR_CIPHER_KEY_MAX_LEN
 Indicates the maximum symmetric cipher key length.

#define R_CR_CIPHER_IV_MAX_LEN
 Indicates the maximum symmetric cipher IV length.

#define R_CR_NOT_SUPPORTED
 Indicates the algorithm availability status is not supported.

#define R_CR_NOT_AVAIL
 Indicates the algorithm availability status is not available.

#define R_CR_SUPPORTED
 Indicates the algorithm availability status is supported.

#define R_CR_TYPE_NONE
 Indicates that the operation type is none. More...

#define R_CR_TYPE_ASYM
 Indicates an asymmetric operation type. More...

#define R_CR_TYPE_CIPHER
 Indicates a symmetric operation type. More...

#define R_CR_TYPE_DIGEST
 Indicates a digest operation type. More...

#define R_CR_TYPE_RANDOM
 Indicates a random operation type. More...

#define R_CR_TYPE_SIGNATURE
 Indicates a signature operation type. More...

#define R_CR_TYPE_MAC
 Indicates a Message Authentication Code (MAC) operation type. More...

#define R_CR_TYPE_KEYGEN
 Indicates a key generation operation type. More...

#define R_CR_TYPE_PARAMGEN
 Indicates a parameter generation operation type. More...

#define R_CR_TYPE_MAX
 Indicates an identifier maximum value operation type. More...

#define R_CR_SUB_NONE
 Indicates that the operation subtype identifier is none. More...

#define R_CR_SUB_SIGN
 A subtype identifier which indicates a sign operation. More...

#define R_CR_SUB_VERIFY
 A subtype identifier which indicates a signature verification operation. More...

#define R_CR_SUB_ENCRYPT
 A subtype identifier which indicates an encryption operation. More...

#define R_CR_SUB_DECRYPT
 A subtype identifier which indicates a decryption operation. More...

#define R_CR_SUB_PUBLIC
 A subtype identifier which indicates a public key operation. More...

#define R_CR_SUB_PRIVATE
 A subtype identifier which indicates a private key operation. More...

#define R_CR_SUB_MAC
 A subtype identifier which indicates a Message Authentication Code (MAC) operation. More...

#define R_CR_SUB_SOFTWARE_ONLY
 A subtype identifier which indicates that the implementation should be using software only. More...

#define R_CR_SUB_PUB_ENC
 A subtype identifier which indicates a public key encryption operation. More...

#define R_CR_SUB_PUB_DEC
 A subtype identifier which indicates a public key decryption operation. More...

#define R_CR_SUB_PRIV_ENC
 A subtype identifier which indicates a private key encryption operation. More...

#define R_CR_SUB_PRIV_DEC
 A subtype identifier which indicates a private key decryption operation. More...

#define R_CR_ID_UNKNOWN
 Indicates that the cryptographic identifier is an unknown algorithm. More...

#define R_CR_ID_RSA
 A cryptographic identifier which indicates an asymmetric RSA cipher. More...

#define R_CR_ID_RSA_PKCS1
 A cryptographic identifier which indicates an asymmetric RSA PKCS1 padding cipher. More...

#define R_CR_ID_RSA_PKCS1_OAEP
 A cryptographic identifier which indicates an asymmetric RSA PKCS #1 OAEP padding cipher. More...

#define R_CR_ID_RSA_PKCS1_SSL
 A cryptographic identifier which indicates an asymmetric RSA PKCS #1 SSL padding cipher. More...

#define R_CR_ID_RSA_PKCS1_RAW
 A cryptographic identifier which indicates an asymmetric RSA PKCS #1 RAW padding cipher. More...

#define R_CR_ID_RSA_X931
 A cryptographic identifier which indicates an asymmetric RSA X9.31 padding cipher. More...

#define R_CR_ID_AES_128_CBC
 A cryptographic identifier which indicates an AES 128 CBC symmetric cipher. More...

#define R_CR_ID_AES_128_ECB
 A cryptographic identifier which indicates an AES 128 ECB symmetric cipher. More...

#define R_CR_ID_AES_128_CFB
 A cryptographic identifier which indicates an AES 128 CFB symmetric cipher. More...

#define R_CR_ID_AES_128_OFB
 A cryptographic identifier which indicates an AES 128 OFB symmetric cipher. More...

#define R_CR_ID_AES_192_CBC
 A cryptographic identifier which indicates an AES 192 CBC symmetric cipher. More...

#define R_CR_ID_AES_192_ECB
 A cryptographic identifier which indicates an AES 192 ECB symmetric cipher. More...

#define R_CR_ID_AES_192_CFB
 A cryptographic identifier which indicates an AES 192 CFB symmetric cipher. More...

#define R_CR_ID_AES_192_OFB
 A cryptographic identifier which indicates an AES 192 OFB symmetric cipher. More...

#define R_CR_ID_AES_256_CBC
 A cryptographic identifier which indicates an AES 256 CBC symmetric cipher. More...

#define R_CR_ID_AES_256_ECB
 A cryptographic identifier which indicates an AES 256 ECB symmetric cipher. More...

#define R_CR_ID_AES_256_CFB
 A cryptographic identifier which indicates an AES 256 CFB symmetric cipher. More...

#define R_CR_ID_AES_256_OFB
 A cryptographic identifier which indicates an AES 256 OFB symmetric cipher. More...

#define R_CR_ID_DES_CBC
 A cryptographic identifier which indicates a DES CBC symmetric cipher. More...

#define R_CR_ID_DES_EDE
 A cryptographic identifier which indicates a 2DES EDE ECB symmetric cipher. More...

#define R_CR_ID_DES_ECB
 A cryptographic identifier which indicates a DES ECB symmetric cipher. More...

#define R_CR_ID_DES_CFB64
 A cryptographic identifier which indicates a DES CFB64 symmetric cipher. More...

#define R_CR_ID_DES_EDE3
 A cryptographic identifier which indicates a 3DES EDE ECB symmetric cipher. More...

#define R_CR_ID_DES_EDE_CBC
 A cryptographic identifier which indicates a 2DES EDE CBC symmetric cipher. More...

#define R_CR_ID_DES_EDE3_CBC
 A cryptographic identifier which indicates a 3DES EDE CBC symmetric cipher. More...

#define R_CR_ID_DES_EDE_CFB64
 A cryptographic identifier which indicates a 2DES EDE CFB64 symmetric cipher. More...

#define R_CR_ID_DES_EDE3_CFB64
 A cryptographic identifier which indicates a 3DES EDE CFB64 symmetric cipher. More...

#define R_CR_ID_DES_EDE_OFB64
 A cryptographic identifier which indicates a 2DES EDE OFB64 symmetric cipher. More...

#define R_CR_ID_DES_EDE3_OFB64
 A cryptographic identifier which indicates a 3DES EDE OFB64 symmetric cipher. More...

#define R_CR_ID_DES_40_CBC
 A cryptographic identifier which indicates a DES 40-bit CBC symmetric cipher. More...

#define R_CR_ID_DES_40_CFB
 A cryptographic identifier which indicates a DES 40-bit CFB symmetric cipher. More...

#define R_CR_ID_DES_OFB
 A cryptographic identifier which indicates a DES OFB symmetric cipher. More...

#define R_CR_ID_RC2_CBC
 A cryptographic identifier which indicates an RC2 CBC symmetric cipher. More...

#define R_CR_ID_RC2_ECB
 A cryptographic identifier which indicates an RC2 ECB symmetric cipher. More...

#define R_CR_ID_RC2_CFB
 A cryptographic identifier which indicates an RC2 CFB symmetric cipher. More...

#define R_CR_ID_RC2_OFB
 A cryptographic identifier which indicates an RC2 OFB symmetric cipher. More...

#define R_CR_ID_RC2_40_CBC
 A cryptographic identifier which indicates an RC2 40-bit CBC symmetric cipher. More...

#define R_CR_ID_RC4
 A cryptographic identifier which indicates an RC4 symmetric cipher. More...

#define R_CR_ID_RC4_40
 A cryptographic identifier which indicates an RC4 40-bit symmetric cipher. More...

#define R_CR_ID_NULL
 Indicates that the cryptographic identifier is NULL. More...

#define R_CR_ID_SHA1
 A cryptographic identifier which indicates a SHA-1 digest. More...

#define R_CR_ID_SHA256
 A cryptographic identifier which indicates a SHA-256 digest. More...

#define R_CR_ID_SHA384
 A cryptographic identifier which indicates a SHA-384 digest. More...

#define R_CR_ID_SHA512
 A cryptographic identifier which indicates a SHA-512 digest. More...

#define R_CR_ID_MD2
 A cryptographic identifier which indicates an MD2 digest. More...

#define R_CR_ID_MD5
 A cryptographic identifier which indicates an MD5 digest. More...

#define R_CR_ID_DIGEST_NULL
 A cryptographic identifier which indicates a null digest. More...

#define R_CR_ID_RANDOM
 Indicates the identifier for the FIPS 186-2 random generation implementation. More...

#define R_CR_ID_RANDOM_ENTROPY
 Indicates a random cryptographic identifier that returns locally collected entropy. More...

#define R_CR_ID_RANDOM_MODULUS
 Indicates the identifier for the FIPS 186-2 random generation with modulus implementation. More...

#define R_CR_ID_RANDOM_SYS
 Indicates that the cryptographic identifier is random and uses local system random function calls. More...

#define R_CR_ID_DSA
 A cryptographic identifier which indicates an asymmetric DSA signature cipher. More...

#define R_CR_ID_SHA1_DSA
 A cryptographic identifier which indicates a DSA signature with SHA-1 digest. More...

#define R_CR_ID_SHA1_RSA
 A cryptographic identifier which indicates an RSA signature with SHA-1 digest. More...

#define R_CR_ID_SHA1_RSA_RAW
 A cryptographic identifier which indicates a RAW RSA signature with SHA-1 digest. More...

#define R_CR_ID_SHA1_RSA_X931
 A cryptographic identifier which indicates an RSA X9.31 signature with SHA-1 digest. More...

#define R_CR_ID_MD2_RSA
 A cryptographic identifier which indicates an RSA signature with MD2 digest. More...

#define R_CR_ID_MD5_RSA
 A cryptographic identifier which indicates an RSA signature with MD5 digest. More...

#define R_CR_ID_SIGNATURE_TYPE_NONE
 A signature type identifier which indicates none. More...

#define R_CR_ID_SIGNATURE_TYPE_DER
 A signature type identifier which indicates Distinguished Encoding Rules (DER). More...

#define R_CR_ID_HMAC_MD5
 A cryptographic identifier which indicates a Message Authentication Code (MAC) utilizing MD5 digest. More...

#define R_CR_ID_HMAC_SHA1
 A cryptographic identifier which indicates a Message Authentication Code (MAC) utilizing SHA-1 digest. More...

#define R_CR_ID_RSA_KEY_GENERATION
 A cryptographic identifier which indicates RSA key generation via X9.31. More...

#define R_CR_ID_RSA_KEY_GENERATION_X931
 A cryptographic identifier which indicates RSA key generation via X9.31. More...

#define R_CR_ID_DSA_KEY_GENERATION
 A cryptographic identifier which indicates DSA key generation. More...

#define R_CR_ID_DSA_PARAMETER_GENERATION
 A cryptographic identifier which indicates DSA parameter generation. More...

#define R_CR_INFO_ID_KEY_LEN
 A cryptographic identifier which indicates the key length in bytes.

#define R_CR_INFO_ID_CIPHER_IV_LEN
 A cryptographic identifier which indicates the Initialization Vector (IV) length in bytes.

#define R_CR_INFO_ID_CIPHER_BLOCK_SIZE
 A cryptographic identifier for block ciphers, which indicates the symmetric cipher block size in bytes.

#define R_CR_INFO_ID_DIGEST_MAC_LEN
 A cryptographic identifier which indicates the digest or Message Authentication Code (MAC) length in bytes.

#define R_CR_INFO_ID_DIGEST_BLOCK_SIZE
 A cryptographic identifier which indicates the digest's internal block size in bytes.

#define R_CR_INFO_ID_CIPHER_BITS
 A cryptographic identifier used with RC2, which indicates the symmetric cipher bits in bytes.

#define R_CR_INFO_ID_OAEP_PARAM
 A cryptographic identifier which indicates the PKCS #1 Optimal Asymmetric Encryption Padding (OAEP) parameter.

#define R_CR_INFO_ID_SURRENDER
 A cryptographic identifier which indicates the surrender function.

#define R_CR_INFO_ID_CRYPTO_TYPE
 A cryptographic identifier which indicates the cryptographic Operation Types.

#define R_CR_INFO_ID_CRYPTO_ID
 A cryptographic identifier which indicates the cryptographic Algorithm Identifiers.

#define R_CR_INFO_ID_CRYPTO_SUB
 A cryptographic identifier which indicates the cryptographic Operation Subtypes.

#define R_CR_INFO_ID_BLOCK_PADDING
 A cryptographic identifier which indicates the block padding to use.
0 - no padding (same as not calling final)
1 - use padding for block ciphers.

#define R_CR_INFO_ID_FLAGS
 A cryptographic identifier which indicates the flags. More...

#define R_CR_INFO_ID_NUM_BITS
 A cryptographic identifier which indicates the number of bits of the asymmetric key.

#define R_CR_INFO_ID_NUM_PRIMES
 A cryptographic identifier which indicates the number of primes (RSA MultiPrime).

#define R_CR_INFO_ID_PUBLIC_KEY
 A cryptographic identifier which indicates the asymmetric public key.

#define R_CR_INFO_ID_PRIVATE_KEY
 A cryptographic identifier which indicates the asymmetric private key.

#define R_CR_INFO_ID_DSA_P
 A cryptographic identifier which indicates the Digital Signature Algorithm (DSA) prime number (P).

#define R_CR_INFO_ID_DSA_Q
 A cryptographic identifier which indicates the Digital Signature Algorithm (DSA) factor of the prime number (Q).

#define R_CR_INFO_ID_DSA_G
 A cryptographic identifier which indicates the Digital Signature Algorithm (DSA) generator (G).

#define R_CR_INFO_ID_RSA_E
 A cryptographic identifier which indicates the RSA public exponent (E).

#define R_CR_INFO_ID_DSA_PARAMETERS
 A cryptographic identifier which indicates the Digital Signature Algorithm (DSA) parameters.

#define R_CR_INFO_ID_SIGNATURE
 A cryptographic identifier which indicates the signature.

#define R_CR_INFO_ID_RAND_FILE_NAME
 A cryptographic identifier which indicates the random seed file name.

#define R_CR_INFO_ID_RAND_WRITE_FILE
 A cryptographic identifier which indicates the random seed write file.

#define R_CR_INFO_ID_RAND_ADD_ENTROPY
 A cryptographic identifier which adds "entropy" into the random generator. More...

#define R_CR_INFO_ID_RAND_LOAD_FILE
 A cryptographic identifier which indicates to load seed file into random generator.

#define R_CR_INFO_ID_RAND_ENTROPY_FUNC
 A cryptographic identifier which indicates the random entropy collection function.

#define R_CR_INFO_ID_RANDOM
 A cryptographic identifier which indicates the R_RANDOM implementation method structure.

#define R_CR_INFO_ID_RAND_BLOCK_SIZE
 A cryptographic identifier which indicates the size of the seed (in Bytes) to supply to a PRNG as defined by FIPS 186-2 Appendix 3.1. More...

#define R_CR_INFO_ID_RAND_AUTO_SEED
 A cryptographic identifier which indicates that an internal seed should be used when not explicitly provided by the application via a call to R_CR_random_seed(). More...

#define R_CR_INFO_ID_RAND_KEY_SEED_COMPARE
 A cryptographic identifier which indicates the state of the key-seed comparison test for the FIPS 186-2 PRNG. More...

#define R_CR_INFO_ID_RAND_RUN_TIME_TESTS
 A cryptographic identifier which indicates the state of the run-time tests for the FIPS 186-2 PRNG. More...

#define R_CR_INFO_ID_RAND_SEED_RESET
 A cryptographic identifier which resets the seeding information for the FIPS 186-2 PRNG. More...

#define R_CR_INFO_ID_RAND_MODULUS
 A cryptographic identifier which sets the value of the modulus for the FIPS 186-2 PRNG.

#define R_CR_INFO_ID_DSA_SEED
 A cryptographic identifier which indicates the Digital Signature Algorithm (DSA) initial (SEED).

#define R_CR_FLAG_CIPHER_NO_BLOCK_PADDING
 A cryptographic flag which indicates a symmetric cipher with no block padding.

#define R_CR_FLAG_CIPHER_KEY_SET
 A cryptographic flag which indicates a symmetric cipher key set.

#define R_CR_FLAG_DER_SIGNATURE
 A cryptographic flag which indicates a signature Distinguished Encoding Rules (DER).

#define R_CR_FLAG_ITEMS_ALLOCED
 A cryptographic flag which indicates that the items contained in the R_CR have been allocated locally.

#define R_CR_FLAG_RANDOM_AVAIL
 A cryptographic flag which indicates that a random number generator has been set against the cryptographic object.

#define R_CR_FLAG_RANDOM_R_CR
 A cryptographic flag which indicates that the random number generator set against the cryptographic object is an R_CR type.

#define R_CR_RANDOM_ENTROPY_TYPE_SMALL
 Indicates the "small" entropy collection routines should be called to add entropy into the generator.

#define R_CR_RANDOM_ENTROPY_TYPE_LARGE
 Indicates the "large" entropy collection routines should be called to add entropy into the generator. More...

#define R_CR_RANDOM_RNG_KEY_SEED_COMPARE_OFF
 Indicates that the RNG key-seed comparison is not enabled.

#define R_CR_RANDOM_RNG_KEY_SEED_COMPARE_ON
 Indicates that the RNG key-seed comparison is currently active. More...

#define R_CR_RANDOM_RNG_KEY_SEED_COMPARE_FAILED
 Indicates that the last attempt to generate random bytes failed to pass the key-seed comparison.

#define R_CR_RANDOM_RNG_TESTS_OFF
 Indicates that the RNG run-time tests are not enabled.

#define R_CR_RANDOM_RNG_TESTS_ON
 Indicates that the RNG run-time tests are currently active. More...

#define R_CR_RANDOM_RNG_TESTS_FAILED
 Indicates that the last attempt to generate random bytes failed to pass the run-time test.

#define R_CR_CTX_INFO_ID_RANDOM
 The random cryptographic context identifier.

#define R_CR_CTX_INFO_ID_SURRENDER
 A cryptographic context identifier which indicates the surrender function.

#define R_CR_RES_LIBRARY_SMALL
 A small library interface that only supports the get_resource, get_module and get_module_data methods of the R_LIB_CTX interface. More...

#define R_CR_RES_LIBRARY
 Indicates the full R_LIB_CTX interface.

#define R_CR_RES_CRYPTO_DEFAULT
 The default list of algorithms available. More...

#define R_CR_RES_CRYPTO_CUSTOM
 Binds a custom algorithm list to the cryptographic module. More...

#define R_CR_RES_SIGNATURE_MAP
 The default map which maps two R_CR identifiers to a signature. More...

#define R_CR_RES_LOCK
 The standard thread synchronization module. More...

#define R_CR_RES_PKEY_PRINT
 The standard asymmetric key print module. More...

#define R_CR_RES_PKEY_RSA
 The RSA key module. More...

#define R_CR_RES_PKEY_DSA
 The Digital Signature Algorithm (DSA) key module. More...

#define R_CR_RES_RAND
 The standard random module. More...

#define R_CR_RES_TIME
 The standard time module. More...

#define R_CR_RES_COMMON_ERROR_STRINGS
 Textual descriptions of common error codes. More...

#define R_CR_RES_CRYPTO_REASON_STRINGS
 Textual descriptions of cryptographic error reason codes. More...

#define R_CR_RES_CRYPTO_FUNCTION_NAMES
 Textual descriptions of cryptographic error function codes. More...

#define R_CR_RES_CRYPTO_DETAIL_STRINGS
 Textual descriptions of cryptographic error detail codes. More...

#define R_CR_RES_END_OF_LIST
 The mandatory marker to indicate the end of a resource list.

#define R_CR_RES_BIO_DIGEST
 The BIO method that digests data.

#define R_CR_RES_BIO_ENCRYPT
 The BIO method that enciphers data.

#define R_CR_RES_BIO_DECRYPT
 The BIO method that deciphers data.

#define R_CR_RES_BIO_CIPHER
 The BIO method that deciphers data that is read and enciphers data that is written.


Typedefs

typedef int R_CR_ALG_ID
 Indicates the type of the cryptographic algorithm identifier. More...

typedef int R_CR_ALG_TYPE
 Indicates the type of the cryptographic algorithm operation type. More...

typedef int R_CR_ALG_SUB
 Indicates the type of the cryptographic algorithm operation subtype. More...

typedef struct r_cr_method_st R_CR_METHOD
 A cryptographic method type identifier.

typedef struct r_cr_imp_method_st R_CR_IMP_METHOD
 A cryptographic implementation method type identifier.

typedef struct r_cr_ctx_st R_CR_CTX
 A cryptographic context object type identifier.

typedef struct r_cr_st R_CR
 A cryptographic object type identifier.

typedef struct r_sign_vfy_map_obj_st R_CR_SIGN_VFY_MAP
 A sign/verify data map object type identifier.


Functions

int R_CDECL R_CR_CTX_new (R_LIB_CTX *lib_ctx, R_RES_FLAG flag, R_CR_CTX **crypto_ctx)
 Creates a cryptographic context by requesting the CRYPTO resource from the library module and initializing the context. More...

int R_CDECL R_CR_CTX_free (R_CR_CTX *ctx)
 Frees all resources allocated to the cryptographic context. More...

int R_CDECL R_CR_new (R_CR_CTX *ctx, R_CR_ALG_TYPE alg_type, R_CR_ALG_ID alg_id, R_CR_ALG_SUB alg_sub, R_CR **crypto)
 Creates a cryptographic object that provides access to a specific cryptographic algorithm identified by the algorithm type, identifier, and sub-identifier. More...

int R_CDECL R_CR_dup (R_CR *crypto, R_CR **new_crypto)
 Duplicates a cryptographic object by allocating resources for the new object and copying values from the old. More...

int R_CDECL R_CR_free (R_CR *crypto)
 Frees all resources allocated to the cryptographic object. More...

int R_CDECL R_CR_encrypt_init (R_CR *crypto, R_SKEY *key, R_ITEM *iv)
 Initializes a cryptographic object for encryption. More...

int R_CDECL R_CR_encrypt (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen)
 Encrypts a single block of data and calls the implementations of update and final automatically. More...

int R_CDECL R_CR_encrypt_update (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen)
 Encrypts a single block of data. More...

int R_CDECL R_CR_encrypt_final (R_CR *crypto, unsigned char *out, unsigned int *olen)
 Finalizes the encryption process. More...

int R_CDECL R_CR_decrypt_init (R_CR *crypto, R_SKEY *key, R_ITEM *iv)
 Initializes a cryptographic operation object for decryption. More...

int R_CDECL R_CR_decrypt (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen)
 Decrypts a block of data and calls the implementations of update and final automatically. More...

int R_CDECL R_CR_decrypt_update (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen)
 Decrypts a block of data. More...

int R_CDECL R_CR_decrypt_final (R_CR *crypto, unsigned char *out, unsigned int *olen)
 Finalizes the decryption process. More...

int R_CDECL R_CR_sign_init (R_CR *crypto, R_PKEY *key)
 Initializes a signing operation. More...

int R_CDECL R_CR_sign (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen)
 Signs a single block of data in accordance with the selected algorithm. More...

int R_CDECL R_CR_sign_update (R_CR *crypto, unsigned char *data, unsigned int dlen)
 Processes a block of data for signing. More...

int R_CDECL R_CR_sign_final (R_CR *crypto, unsigned char *out, unsigned int *olen)
 Finalizes the signing process and returns the signature for the previously processed data. More...

int R_CDECL R_CR_verify_init (R_CR *crypto, R_PKEY *key)
 Initializes a signature verify operation. More...

int R_CDECL R_CR_verify (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *signature, unsigned int slen, int *result)
 Verifies a single block of data against a signature. More...

int R_CDECL R_CR_verify_update (R_CR *crypto, unsigned char *data, unsigned int dlen)
 Processes a block of data for signature verification. More...

int R_CDECL R_CR_verify_final (R_CR *crypto, unsigned char *signature, unsigned int sig_len, int *result)
 Finalizes the signature verification process by verifying data previously processed by R_CR_verify_update(), and comparing it against the signature. More...

int R_CDECL R_CR_asym_encrypt_init (R_CR *crypto, R_PKEY *key)
 Initializes an asymmetric key encryption operation. More...

int R_CDECL R_CR_asym_encrypt (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen)
 Encrypts a block of data with an asymmetric key. More...

int R_CDECL R_CR_asym_decrypt_init (R_CR *crypto, R_PKEY *key)
 Initializes an asymmetric key decryption operation. More...

int R_CDECL R_CR_asym_decrypt (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen)
 Decrypts a block of data with an asymmetric key. More...

int R_CDECL R_CR_digest_init (R_CR *crypto)
 Initializes a digest generation operation. More...

int R_CDECL R_CR_digest (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *out_len)
 Digests a single block of data and calls the implementations of update and final automatically. More...

int R_CDECL R_CR_digest_update (R_CR *crypto, unsigned char *data, unsigned int dlen)
 Digests a block of data. More...

int R_CDECL R_CR_digest_final (R_CR *crypto, unsigned char *out, unsigned int *olen)
 Finalizes the digest process and indicates that all data has been processed by a call to R_CR_digest_update(), and returns the digest. More...

int R_CDECL R_CR_mac_init (R_CR *crypto, R_SKEY *key)
 Initializes a MAC generation operation. More...

int R_CDECL R_CR_mac (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen)
 Calculates the MAC for a single block of data and calls the implementations of update and final automatically. More...

int R_CDECL R_CR_mac_update (R_CR *crypto, unsigned char *data, unsigned int dlen)
 Updates the MAC for a block of data. More...

int R_CDECL R_CR_mac_final (R_CR *crypto, unsigned char *out, unsigned int *olen)
 Finalizes MAC processing. More...

int R_CDECL R_CR_verify_mac_init (R_CR *crypto, R_SKEY *key)
 Initializes a MAC verification operation. More...

int R_CDECL R_CR_verify_mac (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *mac, unsigned int mac_len, int *result)
 Performs MAC verification for a single block of data. More...

int R_CDECL R_CR_verify_mac_update (R_CR *crypto, unsigned char *data, unsigned int dlen)
 Processes MAC verification for a block of data. More...

int R_CDECL R_CR_verify_mac_final (R_CR *crypto, unsigned char *mac, unsigned int mac_len, int *result)
 Finalizes the MAC verification operation. More...

int R_CDECL R_CR_generate_key_init (R_CR *crypto)
 Initializes a cryptographic operation for the generation of a set of asymmetric keys. More...

int R_CDECL R_CR_generate_key (R_CR *crypto, R_PKEY **key)
 Generates a set of asymmetric keys. More...

int R_CDECL R_CR_generate_parameter_init (R_CR *crypto)
 Initializes a cryptographic operation for the generation of a set of parameters for a subsequent key exchange. More...

int R_CDECL R_CR_generate_parameter (R_CR *crypto, R_PKEY **key)
 Generates a set of parameters for an asymmetric or key agreement operation. More...

int R_CDECL R_CR_random_seed (R_CR *crypto, unsigned char *bytes, unsigned int len)
 Seeds the Pseudo Random Number Generator (PRNG). More...

int R_CDECL R_CR_random_bytes (R_CR *crypto, unsigned int dlen, unsigned char *obuf, unsigned int *olen)
 Returns a number of random Bytes. More...

int R_CDECL R_CR_get_info (R_CR *crypto, int id, void *param)
 Retrieves information about a cryptographic object by providing read access to algorithm-specific attributes such as key or block size. More...

int R_CDECL R_CR_set_info (R_CR *crypto, int id, void *param)
 Sets information about a cryptographic object by providing write access to algorithm-specific attributes like key or block size. More...

int R_CDECL R_CR_CTX_get_info (R_CR_CTX *ctx, int id, void *param)
 Uses the identifier to retrieve information from a cryptographic object context. More...

int R_CDECL R_CR_CTX_set_info (R_CR_CTX *ctx, int id, void *param)
 Uses the identifier to set information into a cryptographic object context. More...

int R_CDECL R_CR_CTX_alg_supported (R_CR_CTX *ctx, int alg_type, int alg_id, int alg_sub, int *is_supported)
 Determines if the method for a selected algorithm and operation is available. More...

int R_CDECL R_CR_CTX_ids_to_sig_id (R_CR_CTX *ctx, int dig_id, int pkey_id, int *sig_id)
 Retrieves the sign/verify identifier for a given digest and asymmetric identifier pair. More...

int R_CDECL R_CR_CTX_ids_from_sig_id (R_CR_CTX *ctx, int sig_id, int *dig_id, int *pkey_id)
 Retrieves the digest and asymmetric identifier pair for a given sign/verify identifier. More...

int R_CDECL R_CR_get_error (R_CR *crypto, int *data)
 Returns the code of the last error that occurred in a cryptographic operation. More...

int R_CDECL R_CR_get_reason (R_CR *crypto, int *data)
 Returns the reason code of the last error that occurred in a cryptographic operation. More...

int R_CDECL R_CR_get_detail (R_CR *crypto, int *data)
 Returns the detail code of the last error that occurred in a cryptographic operation. More...

int R_CDECL R_CR_get_function (R_CR *crypto, int *data)
 Returns the code for the function where the last error occurred. More...

int R_CDECL R_CR_get_line (R_CR *crypto, int *data)
 Returns the line number of the file containing the function where the last error in a cryptographic operation occurred. More...

int R_CDECL R_CR_get_file (R_CR *crypto, char **data)
 Returns the name of the file containing the function where the last error in a cryptographic operation occurred. More...

int R_CDECL R_CR_get_error_string (R_CR *crypto, char **data)
 Returns the textual description of the last error that occurred in a cryptographic operation. More...

int R_CDECL R_CR_get_reason_string (R_CR *crypto, char **data)
 Returns the textual description of the reason code of the last error that occurred in a cryptographic operation. More...

int R_CDECL R_CR_get_detail_string (R_CR *crypto, char **data)
 Returns the textual description of the detail code of the last error that occurred in a cryptographic operation. More...

int R_CDECL R_CR_get_function_string (R_CR *crypto, char **data)
 Returns the textual description of the function where the last error occurred. More...

int R_CDECL R_CR_ID_from_string (char *str, R_CR_ALG_ID *type)
 Returns the algorithm identifier for the string str. More...

int R_CDECL R_CR_ID_to_string (R_CR_ALG_ID type, unsigned int max_str_len, char *str)
 Returns the string str for an algorithm identifier type. More...

int R_CDECL R_CR_TYPE_from_string (char *str, R_CR_ALG_TYPE *type)
 Returns the algorithm type for the string str. More...

int R_CDECL R_CR_TYPE_to_string (R_CR_ALG_TYPE type, unsigned int max_str_len, char *str)
 Returns the string str for an algorithm type identifier type. More...

int R_CDECL R_CR_SUB_from_string (char *str, R_CR_ALG_SUB *type)
 Returns the algorithm subtype identifier for the string str. More...

int R_CDECL R_CR_SUB_to_string (R_CR_ALG_SUB type, unsigned int max_str_len, char *str)
 Returns the string str for an algorithm subtype identifier type. More...

R_CR_METHOD* R_CDECL R_CR_get_default_method (void *imp_data)
 Retrieves the default method table. More...

void R_CR_RES_CRYPTO_CUSTOM_METHOD (R_CR_METHOD *(*meth_fn)(void), R_CR_IMP_METHOD *(*alg_fn)(void))
 Binds a custom algorithm list and method table to the cryptographic module. More...

R_CR_IMP_METHODR_CR_DEFINE_CUSTOM_CIPHER_LIST (R_CR_IMP_METHOD list, void fn)
 Creates a function to return the custom algorithms. More...

R_CR_METHODR_CR_DEFINE_CUSTOM_METHOD_TABLE (R_CR_METHOD list, void fn)
 Creates a function to return the custom methods. More...


Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 072-001001-2100-001-000 - 2.1