RSA signature verification

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
torpeteo
Forum Newbie
Posts: 2
Joined: Tue Oct 06, 2009 6:17 am

RSA signature verification

Post by torpeteo »

I've created the private and public keys via .NET, but have a php client that will have to verify the signature with the public key. Is it possible for them to use the public key that was generated via .NET, in their php code?

considering the public key looks something like this:

Code: Select all

- <RSAKeyValue>
  <Modulus><#####.......#####></Modulus> 
  <Exponent><####></Exponent> 
  </RSAKeyValue>
 
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: RSA signature verification

Post by kaisellgren »

torpeteo wrote:I've created the private and public keys via .NET, but have a php client that will have to verify the signature with the public key.
What is this for? You can encrypt with the private key and send the public key to your PHP application, but I would like to know what you are doing this for.
torpeteo
Forum Newbie
Posts: 2
Joined: Tue Oct 06, 2009 6:17 am

Re: RSA signature verification

Post by torpeteo »

I'm signing a random string sent from the client with the private key and returning the signature. Then the client is verifying the signature with the public key.

I have no problem doing this in .NET. I'm just not very experienced with PHP and am not sure if I can use this type of public key in PHP.
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: RSA signature verification

Post by kaisellgren »

Post Reply