EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Public key Modulus and Private Key Modulus Match

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#13098
Posted: 04/25/2010 12:44:18
by Nelson Benitez (Basic support level)
Joined: 04/25/2010
Posts: 10

Hello, I can do to compare the exponent and modulus of the public and private keys in Delphi?.

I use PKIBlackbox.


You can set an example code please.


Thank you.
#13099
Posted: 04/25/2010 13:11:41
by Eugene Mayevski (EldoS Corp.)

What keys are you referring to? SecureBlackbox supports RSA keys, DSS keys, X.509 certificates (with corresponding keys inside), SSH keys, OpenPGP keys ...


Sincerely yours
Eugene Mayevski
#13103
Posted: 04/25/2010 20:30:36
by Nelson Benitez (Basic support level)
Joined: 04/25/2010
Posts: 10

Hello, I need to compare modulus of RSA Keys and X.509 Certificates in DER format.


Thank you.

Sincerely yours,
Nelson Benitez.
#13105
Posted: 04/25/2010 22:17:02
by Ken Ivanov (EldoS Corp.)

Please use TElX509Certificate.GetRSAParams() to get the values of the RSA modulus and the public exponent.
#13106
Posted: 04/25/2010 22:55:45
by Nelson Benitez (Basic support level)
Joined: 04/25/2010
Posts: 10

Hello.

How get the same values of the Private Key RSA, modulus and the public exponent. ?


Thanks.
#13107
Posted: 04/25/2010 23:03:42
by Ken Ivanov (EldoS Corp.)

Public and private keys corresponding to the same keypair share the same modulus. The private exponent can be obtained with the use of SaveKeyValueToBuffer() method.
#13108
Posted: 04/25/2010 23:22:20
by Nelson Benitez (Basic support level)
Joined: 04/25/2010
Posts: 10

Hi, this is for certificate.

Certificate.SaveKeyValueToBuffer()

Certificate.GetRSAParams(@Par1[1], Sz1, @Par2[1], Sz2);

And what values need to get the RSA key, and how do I get.

I have already obtained the certificate RSA modulus, missing RSA private key modulus

Please example.

Thanks.
#13109
Posted: 04/25/2010 23:35:58
by Ken Ivanov (EldoS Corp.)

There is no such concept as "RSA private key modulus". The modulus is common for private and public keys.
#13110
Posted: 04/25/2010 23:44:31
by Nelson Benitez (Basic support level)
Joined: 04/25/2010
Posts: 10

Hello.

What I need is to compare the X509 certificate corresponds to a private key. DER format. Is there any way to compare the private and public key with modulus.


Thanks.
#13111
Posted: 04/26/2010 00:14:07
by Ken Ivanov (EldoS Corp.)

Thanks for the explanation, now I understand the task you are trying to accomplish. Please do the following:
1) Load the DER-encoded private key into the TElRSAKeyMaterial object with the use of LoadSecret() method method,
2) Compare the keys by checking that Cert.KeyMaterial.Equals(KM, true) returns true, where KM is the name of the TElRSAKeyMaterial object containing the private key.
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 3186 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!