![]() |
xilrsa
Vitis Drivers API Documentation
|
Functions | |
| void | rsa2048_exp (const unsigned char *base, const unsigned char *modular, const unsigned char *modular_ext, const unsigned char *exponent, unsigned char *result) |
| This function is used to encrypt the data using 2048 bit private key. More... | |
| void | rsa2048_pubexp (RSA_NUMBER a, RSA_NUMBER x, unsigned long e, RSA_NUMBER m, RSA_NUMBER rrm) |
| This function is used to decrypt the data using 2048 bit public key. More... | |
| void | sha_256 (const unsigned char *in, const unsigned int size, unsigned char *out) |
| This function calculates the hash for the input data using SHA-256 algorithm. More... | |
| void | sha2_starts (sha2_context *ctx) |
| This function initializes the SHA2 context. More... | |
| void | sha2_update (sha2_context *ctx, unsigned char *input, unsigned int ilen) |
| This function adds the input data to SHA256 calculation. More... | |
| void | sha2_finish (sha2_context *ctx, unsigned char *output) |
| This function finishes the SHA calculation. More... | |
| void rsa2048_exp | ( | const unsigned char * | base, |
| const unsigned char * | modular, | ||
| const unsigned char * | modular_ext, | ||
| const unsigned char * | exponent, | ||
| unsigned char * | result | ||
| ) |
This function is used to encrypt the data using 2048 bit private key.
| modular | A char pointer which contains the key modulus |
| modular_ext | A char pointer which contains the key modulus extension |
| exponent | A char pointer which contains the private key exponent |
| result | A char pointer which contains the encrypted data |
| void rsa2048_pubexp | ( | RSA_NUMBER | a, |
| RSA_NUMBER | x, | ||
| unsigned long | e, | ||
| RSA_NUMBER | m, | ||
| RSA_NUMBER | rrm | ||
| ) |
This function is used to decrypt the data using 2048 bit public key.
| a | RSA_NUMBER containing the decrypted data. |
| x | RSA_NUMBER containing the input data |
| e | Unsigned number containing the public key exponent |
| m | RSA_NUMBER containing the public key modulus |
| rrm | RSA_NUMBER containing the public key modulus extension. |
| void sha2_finish | ( | sha2_context * | ctx, |
| unsigned char * | output | ||
| ) |
This function finishes the SHA calculation.
| ctx | Pointer to sha2_context structure that stores status and buffer. |
| output | Pointer to the calculated hash data. |
| void sha2_starts | ( | sha2_context * | ctx | ) |
This function initializes the SHA2 context.
| ctx | Pointer to sha2_context structure that stores status and buffer. |
| void sha2_update | ( | sha2_context * | ctx, |
| unsigned char * | input, | ||
| unsigned int | ilen | ||
| ) |
This function adds the input data to SHA256 calculation.
| ctx | Pointer to sha2_context structure that stores status and buffer. |
| input | Pointer to the data to add. |
| Out | Length of the input data. |
| void sha_256 | ( | const unsigned char * | in, |
| const unsigned int | size, | ||
| unsigned char * | out | ||
| ) |
This function calculates the hash for the input data using SHA-256 algorithm.
This function internally calls the sha2_init, updates and finishes functions and updates the result.
| In | Char pointer which contains the input data. |
| Size | Length of the input data |
| Out | Pointer to location where resulting hash will be written. |