I use an Openssl library to provide RSA encryption-decryption for my app. And this is what I found:
int RSA_private_decrypt(int flen, unsigned char *from,
unsigned char *to, RSA *rsa, int padding);
RSA_private_decrypt() decrypts the flen bytes at from using the private key rsa and stores the plaintext in to. (From the docs, https://www.openssl.org/docs/man1.1.1/man3/RSA_private_decrypt.html)
To setup RSA structure I use the following method:
int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
The n, e and d parameter values can be set by calling RSA_set0_key() and passing the new values for n, e and d as parameters to the function. The values n and e must be non-NULL the first time this function is called on a given RSA object. The value d may be NULL. (From the docs, https://www.openssl.org/docs/man1.1.1/man3/RSA_set0_key.html)
So, when I use the stuff above for decryption as described, everything works fine. I set RSA struct with n, e and d, then pass RSA struct to private_decrypt() with other parameters and get correct result.
But if I do not set e to RSA struct (or set it with random value to avoid not-null constraint), private_decrypt() returns wrong decryption result (all zeroes typically).
So, why does e required for private decryption? As far as RSA algorithm works, it should be enough to have n, d and cipher_text to provide correct result, isn't it?