| RSA BSAFE Cert-C Micro Edition |
The power of PKI for the smallest of devices |
#include "r_lib.h"#include "r_com.h"#include "r_nid.h"#include "r_pkey.h"#include "r_skey.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_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 Initialization Vector (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_KEY_EXCHANGE |
| Indicates a key agreement 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_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_NULL |
Indicates that the cryptographic identifier is NULL. More... | |
| #define | R_CR_ID_RANDOM |
| Indicates a random cryptographic identifier. 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_DIGEST_NULL |
| A cryptographic identifier which indicates a null digest. 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_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_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 DES EDE 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 DES EDE3 symmetric cipher. More... | |
| #define | R_CR_ID_DES_EDE_CBC |
| A cryptographic identifier which indicates a DES EDE CBC symmetric cipher. More... | |
| #define | R_CR_ID_DES_EDE3_CBC |
| A cryptographic identifier which indicates a DES EDE3 CBC symmetric cipher. More... | |
| #define | R_CR_ID_DES_EDE_CFB64 |
| A cryptographic identifier which indicates a DES EDE CFB64 symmetric cipher. More... | |
| #define | R_CR_ID_DES_EDE3_CFB64 |
| A cryptographic identifier which indicates a DES EDE3 CFB64 symmetric cipher. More... | |
| #define | R_CR_ID_DES_EDE_OFB64 |
| A cryptographic identifier which indicates a DES EDE OFB64 symmetric cipher. More... | |
| #define | R_CR_ID_DES_EDE3_OFB64 |
| A cryptographic identifier which indicates a DES 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_RC5_CBC |
| A cryptographic identifier which indicates an RC5 CBC symmetric cipher. More... | |
| #define | R_CR_ID_RC5_ECB |
| A cryptographic identifier which indicates an RC5 ECB symmetric cipher. More... | |
| #define | R_CR_ID_RC5_CFB |
| A cryptographic identifier which indicates an RC5 CFB symmetric cipher. More... | |
| #define | R_CR_ID_RC5_OFB |
| A cryptographic identifier which indicates an RC5 OFB symmetric 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_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_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_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_KE_DH |
| A cryptographic identifier which indicates the Diffie-Hellman key agreement. More... | |
| #define | R_CR_ID_RSA_KEY_GENERATION |
| A cryptographic identifier which indicates RSA key generation. 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_ID_DH_PARAMETER_GENERATION |
| A cryptographic identifier which indicates Diffie-Hellman parameter generation. More... | |
| #define | R_CR_INFO_ID_SUPPORTED |
| A cryptographic identifier which indicates that the algorithm is supported. | |
| #define | R_CR_INFO_ID_KEY_LEN |
| A cryptographic identifier which indicates the key length. | |
| #define | R_CR_INFO_ID_IS_EXPORT |
| A cryptographic identifier which indicates the export strength cipher. | |
| #define | R_CR_INFO_ID_KE_AUTHENTICATE |
| A cryptographic identifier which indicates key agreement authentication. | |
| #define | R_CR_INFO_ID_KE_TYPE |
| A cryptographic identifier which indicates the key agreement type. | |
| #define | R_CR_INFO_ID_CIPHER_EXP_KEY_LEN |
| A cryptographic identifier which indicates the export strength key length. | |
| #define | R_CR_INFO_ID_CIPHER_IV_LEN |
| A cryptographic identifier which indicates the Initialization Vector (IV) length. | |
| #define | R_CR_INFO_ID_CIPHER_PARAM |
| A cryptographic identifier which indicates the symmetric cipher parameter. | |
| #define | R_CR_INFO_ID_CIPHER_ROUNDS |
| A cryptographic identifier which indicates the symmetric cipher rounds. | |
| #define | R_CR_INFO_ID_CIPHER_TYPE |
| A cryptographic identifier which indicates the symmetric cipher type. | |
| #define | R_CR_INFO_ID_CIPHER_BLOCK_SIZE |
| A cryptographic identifier which indicates the symmetric cipher block size. | |
| #define | R_CR_INFO_ID_DIGEST_MAC_LEN |
| A cryptographic identifier which indicates the digest or Message Authentication Code (MAC) length. | |
| #define | R_CR_INFO_ID_CTX_RANDOM |
| A cryptographic identifier which indicates the random context. | |
| #define | R_CR_INFO_ID_DIGEST_BLOCK_SIZE |
| A cryptographic identifier which indicates the digest block size. | |
| #define | R_CR_INFO_ID_CIPHER_BITS |
| A cryptographic identifier which indicates the symmetric cipher bits. | |
| #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 type. | |
| #define | R_CR_INFO_ID_CRYPTO_ID |
| A cryptographic identifier which indicates the cryptographic identifier. | |
| #define | R_CR_INFO_ID_CRYPTO_SUB |
| A cryptographic identifier which indicates the cryptographic operation subtype. | |
| #define | R_CR_INFO_ID_BLOCK_PADDING |
| A cryptographic identifier which indicates the block padding. | |
| #define | R_CR_INFO_ID_FLAGS |
| A cryptographic identifier which indicates the flags. | |
| #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_DH_PRIME_LENGTH |
| A cryptographic identifier which indicates the Diffie-Hellman prime length. | |
| #define | R_CR_INFO_ID_DH_GENERATOR_ORDER |
| A cryptographic identifier which indicates the Diffie-Hellman generator order. | |
| #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 indicates to add entropy to random generator. | |
| #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_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_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_CTX_INFO_ID_HARDWARE_INFO |
| A cryptographic context identifier which indicates hardware. More... | |
| #define | R_CR_RES_CRYPTO_DEFAULT |
| The default list of algorithms available. More... | |
| #define | R_CR_RES_SIGNATURE_MAP |
| The default map which maps two R_CR identifiers to a signature. 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_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_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_CR_CTX_free (R_CR_CTX *ctx) |
| Frees all resources allocated to the cryptographic context. More... | |
| int | 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_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_CR_free (R_CR *crypto) |
| Frees all resources allocated to the cryptographic object. More... | |
| int | R_CR_encrypt_init (R_CR *crypto, R_SKEY *key, R_ITEM *iv) |
| Initializes a cryptographic object for encryption. More... | |
| int | 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_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_CR_encrypt_final (R_CR *crypto, unsigned char *out, unsigned int *olen) |
| Finalizes the encryption process. More... | |
| int | R_CR_decrypt_init (R_CR *crypto, R_SKEY *key, R_ITEM *iv) |
| Initializes a cryptographic operation object for decryption. More... | |
| int | 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_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_CR_decrypt_final (R_CR *crypto, unsigned char *out, unsigned int *olen) |
| Finalizes the decryption process. More... | |
| int | R_CR_sign_init (R_CR *crypto, R_PKEY *key) |
| Initializes a signing operation. More... | |
| int | 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_CR_sign_update (R_CR *crypto, unsigned char *data, unsigned int dlen) |
| Processes a block of data for signing. More... | |
| int | 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_CR_verify_init (R_CR *crypto, R_PKEY *key) |
| Initializes a signature verify operation. More... | |
| int | 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_CR_verify_update (R_CR *crypto, unsigned char *data, unsigned int dlen) |
| Processes a block of data for signature verification. More... | |
| int | 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_CR_asym_encrypt_init (R_CR *crypto, R_PKEY *key) |
| Initializes an asymmetric key encryption operation. More... | |
| int | 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_CR_asym_decrypt_init (R_CR *crypto, R_PKEY *key) |
| Initializes an asymmetric key decryption operation. More... | |
| int | 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_CR_digest_init (R_CR *crypto) |
| Initializes a digest generation operation. More... | |
| int | 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_CR_digest_update (R_CR *crypto, unsigned char *data, unsigned int dlen) |
| Digests a block of data. More... | |
| int | 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_CR_mac_init (R_CR *crypto, R_SKEY *key) |
| Initializes a Message Authentication Code (MAC) generation operation. More... | |
| int | R_CR_mac (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen) |
Calculates the Message Authentication Code (MAC) for a single block of data and calls the implementations of update and final automatically. More... | |
| int | R_CR_mac_update (R_CR *crypto, unsigned char *data, unsigned int dlen) |
| Updates the Message Authentication Code (MAC) for a block of data. More... | |
| int | R_CR_mac_final (R_CR *crypto, unsigned char *out, unsigned int *olen) |
| Finalizes Message Authentication Code( MAC) processing. More... | |
| int | R_CR_verify_mac_init (R_CR *crypto, R_SKEY *key) |
| Initializes a Message Authentication Code (MAC) verify operation. More... | |
| int | R_CR_verify_mac (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *mac, unsigned int mac_len, int *result) |
| Performs Message Authentication Code (MAC) verification for a single block of data. More... | |
| int | R_CR_verify_mac_update (R_CR *crypto, unsigned char *data, unsigned int dlen) |
| Processes Message Authentication Code (MAC) verification for a block of data. More... | |
| int | R_CR_verify_mac_final (R_CR *crypto, unsigned char *mac, unsigned int mac_len, int *result) |
| Finalizes the Message Authentication Code (MAC) verify operation. More... | |
| int | R_CR_key_exchange_init (R_CR *crypto, R_PKEY *params) |
| Initializes a cryptographic operation for phased key exchange and agreement. More... | |
| int | R_CR_key_exchange_phase_1 (R_CR *crypto, unsigned char *out, unsigned int *olen) |
| Performs phase 1 of a key exchange protocol. More... | |
| int | R_CR_key_exchange_phase_2 (R_CR *crypto, unsigned char *data, unsigned int dlen, unsigned char *out, unsigned int *olen) |
| Performs phase 2 of a key exchange protocol. More... | |
| int | R_CR_generate_key_init (R_CR *crypto) |
| Initializes a cryptographic operation for the generation of a set of asymmetric keys. More... | |
| int | R_CR_generate_key (R_CR *crypto, R_PKEY **key) |
| Generates a set of asymmetric keys. More... | |
| int | 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_CR_generate_parameter (R_CR *crypto, R_PKEY **key) |
| Generates a set of parameters for an asymmetric or key agreement operation. More... | |
| int | R_CR_random_seed (R_CR *crypto, unsigned char *bytes, unsigned int len) |
| Seeds the Pseudo Random Number Generator (PRNG). More... | |
| int | 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_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_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_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_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_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_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_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_CR_get_error (R_CR *crypto, int *data) |
| Returns the code of the last error that occurred in a cryptographic operation. More... | |
| int | 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_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_CR_get_function (R_CR *crypto, int *data) |
| Returns the code for the function where the last error occurred. More... | |
| int | 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_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_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_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_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_CR_get_function_string (R_CR *crypto, char **data) |
| Returns the textual description of the function where the last error occurred. More... | |
| int | R_CR_ID_from_string (char *str, R_CR_ALG_ID *type) |
| Returns the algorithm identifier for the string str. More... | |
| int | R_CR_ID_to_string (R_CR_ALG_ID type, size_t max_str_len, char *str) |
| Returns the string str for an algorithm identifier type. More... | |
| int | R_CR_TYPE_from_string (char *str, R_CR_ALG_TYPE *type) |
| Returns the algorithm type for the string str. More... | |
| int | R_CR_TYPE_to_string (R_CR_ALG_TYPE type, size_t max_str_len, char *str) |
| Returns the string str for an algorithm type identifier type. More... | |
| int | R_CR_SUB_from_string (char *str, R_CR_ALG_SUB *type) |
| Returns the algorithm subtype identifier for the string str. More... | |
| int | R_CR_SUB_to_string (R_CR_ALG_SUB type, size_t max_str_len, char *str) |
| Returns the string str for an algorithm subtype identifier type. More... | |
| R_CR_METHOD* | 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_METHOD * | R_CR_DEFINE_CUSTOM_CIPHER_LIST (R_CR_IMP_METHOD list, void fn) |
| Creates a function to return the custom algorithms. More... | |
| R_CR_METHOD * | R_CR_DEFINE_CUSTOM_METHOD_TABLE (R_CR_METHOD list, void fn) |
| Creates a function to return the custom methods. More... | |