473,762 Members | 7,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Apr 11 '08 #1
1 2680
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
Jun 27 '08 #2

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

Similar topics

2
8327
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 without a shell call to openssl) to get the PEM encoded form of a public key, given the private key and applicable passphrase. The closest that can be gotten is a resource key, via:
3
2010
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. 14.6.1 in the standard seems to imply that template parameters are hidden by class members. struct X
0
981
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 the certificate with the private key exportable, but if I run the code below, I obtain "Export of private parameters is not supported"
0
895
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 something like this: RSACryptoserviceProvider rsa = new RSACryptoServiceProvider(); RSAParameters params = webService.GetRSAParameters();
23
2600
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. I read the description, decided that it's exactly what I want, and ignored the warning. Now I'm trying to inherit using a template. Instead of "destructor could not be generated because a base class destructor is inaccessible", I now have an...
6
2275
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 thru member functions. Now I need to print the array from main but the error states that those elements are private. Here is some of my code: class Employee { private:
4
6598
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 tried to understand the error messages but for me they aren't useful. And now I'm here and hope that somebody has experience and can tell me the error. This is the Code for the server: #define _CRT_SECURE_NO_DEPRECATE
3
1895
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
7909
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 openssl cmd: openssl ca -cert CA/cert.pem -keyfile CA/private/cakey.pem -policy policy_anything -out user_cert.pem -infiles userreq.pem My try was:
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9925
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.