Openssl: RSA n e d p q参数代表什么?

时间:2022-08-27 21:42:12

What are the parameters n, e, d, p, q represent in below RSA structure for openssl ?

在openssl的RSA结构下面有哪些参数n, e, d, p, q ?

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;
    };

3 个解决方案

#1


3  

as you can see from the openssl official page, their numbers with specific roles in calculating the ciphertext, OpenSSL official documentation

正如您可以从openssl官方页面看到的,它们的数字在计算密文、openssl官方文档时具有特定的作用。

I suggest you to take a gander at it, Bye!

我建议你去看一下,再见!

Linuxatico

Linuxatico

#2


4  

These are the parameters for the RSA algorithm:

这些是RSA算法的参数:

p and q are two large prime numbers, and n is computed by p*q. e is the public exponent, d is the multiplicative inverse of e mod (p-1)(q-1).

p和q是两个大质数,n是由p*q计算的。e是公共指数,d是e mod (p-1)(q1)的乘法逆。

The private key is the pair (p, q). The public key is the pair (n, e)

私钥为对(p, q)。公钥为对(n, e)

You can learn more about it here.

你可以在这里学到更多。

#3


0  

In Linux, man 3 rsa will give you a detailed explanation.

在Linux, man 3 rsa会给你一个详细的解释。

#1


3  

as you can see from the openssl official page, their numbers with specific roles in calculating the ciphertext, OpenSSL official documentation

正如您可以从openssl官方页面看到的,它们的数字在计算密文、openssl官方文档时具有特定的作用。

I suggest you to take a gander at it, Bye!

我建议你去看一下,再见!

Linuxatico

Linuxatico

#2


4  

These are the parameters for the RSA algorithm:

这些是RSA算法的参数:

p and q are two large prime numbers, and n is computed by p*q. e is the public exponent, d is the multiplicative inverse of e mod (p-1)(q-1).

p和q是两个大质数,n是由p*q计算的。e是公共指数,d是e mod (p-1)(q1)的乘法逆。

The private key is the pair (p, q). The public key is the pair (n, e)

私钥为对(p, q)。公钥为对(n, e)

You can learn more about it here.

你可以在这里学到更多。

#3


0  

In Linux, man 3 rsa will give you a detailed explanation.

在Linux, man 3 rsa会给你一个详细的解释。