PHP Classes

Broken code

Recommend this page to a friend!

      RSA  >  All threads  >  Broken code  >  (Un) Subscribe thread alerts  
Subject:Broken code
Summary:Signing part of the class is broken
Messages:1
Author:Tobia Wennergren
Date:2010-04-12 02:10:04
 

  1. Broken code   Reply   Report abuse  
Picture of Tobia Wennergren Tobia Wennergren - 2010-04-12 02:10:04
I might have understood this
wrong but in you are signing with your public key
and verifying with your private key. It should be the
oppsite right?

The purpose of signing a message is the people can verify it
by having your public key. You don't want to give out your
private key to people.

To sign a message, you should use the same operation as decrypt, not
encrypt. (d mod n).. (Dangerous to call the variable $d as in private
key, but then to send the public key (e) as argument).