How to map openssl obtained private key parameters to RSAParameters struct members?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SammyBar

    How to map openssl obtained private key parameters to RSAParameters struct members?

    Hi all,

    I need to fill a System.Security .Cryptography.R SAParameters structure with
    my private key parameters. The private key is in PEM format so by using
    openssl I can obtain all the parameters. But openssl names the parameters
    different to the RSAParameters struct. The openssl output is in the form

    openssl rsa -in key.pem -noout -text

    modulus: ...
    publicExponent: ...
    privateExponent : ...
    prime1: ...
    prime2: ...
    exponent1: ...
    exponent2: ...
    coefficient: ...

    How these map to the RSAParameters membersD, DP, DQ, Exponent, InverseQ,
    Modulus, P y Q?

    Thanks in advance
    Sammy


  • =?Utf-8?B?Q2xhdWRpbw==?=

    #2
    RE: How to map openssl obtained private key parameters to RSAParameter

    Hi Sammy,

    version Version,
    modulus INTEGER, n
    publicExponent INTEGER, e
    privateExponent INTEGER, d
    prime1 INTEGER, p
    prime2 INTEGER, q
    exponent1 INTEGER, d mod (p-1)
    exponent2 INTEGER, d mod (q-1)
    coefficient INTEGER, (inverse of q) mod p

    C.


    "SammyBar" wrote:
    Hi all,
    >
    I need to fill a System.Security .Cryptography.R SAParameters structure with
    my private key parameters. The private key is in PEM format so by using
    openssl I can obtain all the parameters. But openssl names the parameters
    different to the RSAParameters struct. The openssl output is in the form
    >
    openssl rsa -in key.pem -noout -text
    >
    modulus: ...
    publicExponent: ...
    privateExponent : ...
    prime1: ...
    prime2: ...
    exponent1: ...
    exponent2: ...
    coefficient: ...
    >
    How these map to the RSAParameters membersD, DP, DQ, Exponent, InverseQ,
    Modulus, P y Q?
    >
    Thanks in advance
    Sammy
    >
    >
    >

    Comment

    Working...