RSA基本结构struct
{
int pad;
long version;
const RSA_METHOD *meth;
ENGINE *engine;
BIGNUM *n; n=p*q
BIGNUM *e; 公开的加密指数,经常为65537(ox10001)
BIGNUM *d; 私钥
BIGNUM *p; 大素数p
BIGNUM *q; 大素数q
BIGNUM *dmp1; d mod (p-1)
BIGNUM *dmq1; d mod (q-1)
BIGNUM *iqmp; (inverse of q) mod p
int references;
int flags;
// ...
}RSA;
m 就是 BIGNUM *n; n=p*q
把m e转为BIGNUM 填到 n 和 e 就行了