RSA BSAFE Cert-C Micro Edition

The power of PKI for the smallest of devices

Asymmetric Operation Functions

This section details the functions that facilitate cryptographic operations using public and private keys.

Functions

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...


Function Documentation

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.

Parameters:
crypto [In] A pointer to the cryptographic object.
Must be allocated the correct type and initialized by calls to R_CR_new() and R_CR_asym_decrypt_init() respectively.
data [In] A pointer to the data to decrypt.
If NULL is passed, the required size of the buffer is returned.
dlen [In] The number of Bytes to decrypt.
out [Out] The buffer that takes the decrypted data.
Must be of sufficient length to contain the encrypted data.
olen [In, Out] The length of the decrypted data, in out.
Returns:
R_ERROR_NONE indicates success.
See Error Identifiers for valid values.
See also:
R_CR_asym_decrypt_init().

int R_CR_asym_decrypt_init R_CR   crypto,
R_PKEY   key
;
 

Initializes an asymmetric key decryption operation.

Parameters:
crypto [In] A pointer to the cryptographic object.
Must be allocated the correct type via R_CR_new().
key [In] The key to use.
Returns:
R_ERROR_NONE indicates success.
See Error Identifiers for valid values.
See also:
R_CR_asym_decrypt().

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.

Parameters:
crypto [In] A pointer to the cryptographic object.
Must be allocated the correct type and initialized by calls to R_CR_new() and R_CR_asym_decrypt() respectively.
data [In] A pointer to the data to encrypt.
dlen [In] The number of Bytes to encrypt.
out [Out] The buffer that takes the encrypted data. If NULL is passed, the required size of the buffer is returned.
olen [In, Out] The length of the encrypted data.
Returns:
R_ERROR_NONE indicates success.
See Error Identifiers for valid values.
See also:
R_CR_asym_encrypt_init().

int R_CR_asym_encrypt_init R_CR   crypto,
R_PKEY   key
;
 

Initializes an asymmetric key encryption operation.

Parameters:
crypto [In] A pointer to the cryptographic object.
Must be allocated the correct type via R_CR_new().
key [In] The key to use.
Returns: