473,322 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

Hi all,

I need to fill a System.Security.Cryptography.RSAParameters 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
Apr 11 '08 #1
1 2659
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.RSAParameters 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
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Robin H. Johnson | last post by:
Hi, I'm working on a project making large use of OpenSSL to individually encrypt items inside a database, but I've hit a stumbling block. There appears to be absolutely no native PHP way (eg...
3
by: Gianni Mariani | last post by:
I was a little surprised by this: It seems like the code below should not compile but the Comeau 4.3.3 compiler accepts it and the gcc 3.4(prerel) compiler rejects it and MSVC++7.1 ICE's. ...
0
by: Leeor Chernov | last post by:
Hi, I am taking this Q from an old message cause I have the same problem: Hi everybody: I want to import the private key of my 1st certificate contained in my Certification store. I create...
0
by: tam2005 via DotNetMonster.com | last post by:
I'm going to use WebMethod GetRSAParameters in my c# application which returns RSAParameters object. But when I'm trying too include System.Secrity.Cryptography namespace and when I'm writing...
23
by: Ben Voigt | last post by:
I have a POD type with a private destructor. There are a whole hierarchy of derived POD types, all meant to be freed using a public member function Destroy in the base class. I get warning C4624....
6
by: zfareed | last post by:
Is it possible to print an array that is declared from a class type that also contains private data members? I have declared an array in the main function and then set the values for the array...
4
by: Patrick | last post by:
Hello, I'm currently trying the OpenSSL Library, but I got some problems. I want to create a server and client application that communicate through the OpenSSL API, but this code doesn't work. I...
3
by: acehreli | last post by:
On Jul 21, 1:27 pm, eran <kale...@gmail.comwrote: ... that has a constructor to set all the members. That problem is solved... :) Ali
3
by: Marcin Jurczuk | last post by:
Hello, I'm fighting with Certificate Authority functionality with python I stuck on following problem: How to sign CSR using CA key and write resulted certificate. You can do it using following...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.