Cryptography for Intel(R) Integrated Performance Primitives Developer Reference

ID 768738
Date 12/16/2022
Document Table of Contents


Performs the private key RSA decryption operation.


mbx_status mbx_rsa_private_crt_mb8(const int8u* const from_pa[8], int8u* const to_pa[8], const int64u* const p_pa[8], const int64u* const q_pa[8], const int64u* const dp_pa[8], const int64u* const dq_pa[8], const int64u* const iq_pa[8], int rsaBitlen, const mbx_RSA_Method* m, int8u* pBuffer);

mbx_status mbx_rsa_private_crt_ssl_mb8(const int8u* const from_pa[8], int8u* const to_pa[8], const BIGNUM* const p_pa[8], const BIGNUM* const q_pa[8], const BIGNUM* const dp_pa[8], const BIGNUM* const dq_pa[8], const BIGNUM* const iq_pa[8], int rsaBitlen);

Include Files




Array of pointers to the ciphertext data vectors.


Array of pointers to the recovered data vectors.


Array of pointers to the p-prime factor vectors of RSA moduli.


Array of pointers to the q-prime factor vectors of RSA moduli.


Array of pointers to the p's CRT private exponent vectors.


Array of pointers to the q's CRT private exponent vectors.


Array of pointers to CRT coefficient (multiplicative inversion of q with respect to p) vectors.


Size of RSAs moduli in bits.


Pointer to the pre-defined data structure specified by the RSA encryption operation.


Pointer to the work buffer.

The mbx_rsa_private_crt() function performs independent CRT-based RSA private key operations using RSA private key in a quintuple form - private factors (p and q), private exponents (dp and dq) and CRT coefficient invq. The factors are passed through p_pa and q_pa, exponents are passed though dp_pa and dq_pa and CRT coefficients are passed through iq_pa parameter. The size of RSAs factors, private exponents and CRT coefficients must be the same and equal to rsaBitlen/2 bits. The function decrypts ciphertexts specified by the from_pa parameter in parallel, and stores recovered ciphertexts in the memory locations specified by the to_pa parameter. Memory buffers of the plain- and ciphertext must be ceil(rsaBitlen/8) bytes length.

At the moment, RSA-10024, RSA-2048, RSA-3072 and RSA-4096 are supported only. If m is NULL, the function uses mbx_RSA_private_crt_Method(rsaBitsize). If m is not NULL, it must be assigned to either mbx_RSA1K_ private_crt_Method(), mbx_RSA2K_ private_crt_Method(), mbx_RSA3K_ private_crt_Method() or mbx_RSA4K_ private_crt_Method() and match to rsaBitlen value.

If pBuffer is NULL, then the function allocated a work buffer of suitable size dynamically. An allocated buffer will be released before the function return. If the work buffer is allocated in the application, it affects performance positively. The mbx_RSA_Method_BufSize() function returns the size of the work buffer required for the operation.

The function itself does not support any kind of padding. The application is responsible for the padding if it is required.


The mbx_rsa_private_crt_ssl() function is the "twin" of mbx_rsa_private_crt() one. It acts the same. The basic difference in comparison with mbx_rsa_private() is the representation of RSA key stuff. mbx_rsa_private_crt_ssl uses BIGNUM datatype instead of vector.

Return Values

The mbx_rsa_private_crt() function returns the status that indicates whether the operation completed successfully or not. The status value of 0 indicates that all operations completed successfully. The error condition can be analyzed by the MBX_GET_STS() call.

See Also

Did you find the information on this page useful?

Characters remaining:

Feedback Message