在下面的n, e, d, p, q结构中,openssl代表哪些参数?
struct rsa_st
{
/* The first parameter is used to pickup errors where
* this is passed instead of aEVP_PKEY, it is set to 0 */
int pad;
long version;
const RSA_METHOD *meth;
/* functional reference if 'meth' is ENGINE-provided */
ENGINE *engine;
BIGNUM *n;
BIGNUM *e;
BIGNUM *d;
BIGNUM *p;
BIGNUM *q;
BIGNUM *dmp1;
BIGNUM *dmq1;
BIGNUM *iqmp;
/* be careful using this if the RSA structure is shared */
CRYPTO_EX_DATA ex_data;
int references;
int flags;
/* Used to cache montgomery values */
BN_MONT_CTX *_method_mod_n;
BN_MONT_CTX *_method_mod_p;
BN_MONT_CTX *_method_mod_q;
/* all BIGNUM values are actually in the following data, if it is not
* NULL */
char *bignum_data;
BN_BLINDING *blinding;
BN_BLINDING *mt_blinding;
};发布于 2012-05-09 16:26:16
从openssl官方页面可以看到,它们的编号在计算密文时具有特定的作用,OpenSSL official documentation
我建议你去看看,再见!
编辑2018-07-27:更新url Linuxatico
发布于 2012-05-09 16:27:46
以下是RSA算法的参数:
P和q是两个大素数,n由p*q计算,e是公开指数,d是e mod (p-1)(q-1)的乘法逆。
私钥是(p,q)对。公钥是(n,e)对
你可以在here上了解更多。
发布于 2013-12-09 16:37:01
在Linux中,man 3 rsa会给你一个详细的解释。
https://stackoverflow.com/questions/10512295
复制相似问题