Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Is it possible to generate signature only from Public key. See example below where i have valid signature but what if I change hash ? Is then any way to do this?

Public key(160 bytes):

024000004800000940000000602000000240000525341310004000001000100B7
373AAC1521A3EF2F5C72DFD3D3F715C56810F2A222AD9179D9DEE099389B7A672
8D01BB5907898AE5222779A5BACE26516DE3B68BCF864F1E464AD94B1413761BB
07FC3AAB7771D20A90D20733465EF22ECF30E5FC06DEB9F643443966DC7AC6D1D
75270373B7146303431E3201B5366BF2B93A03F75E5936EC15BCBE7DCA1

Public key exponent(4 bytes) :

00010001

Public key modulus(128 bytes):

A1DCE7CB5BC16E93E5753FA0932BBF66531B20E331343046713B377
052D7D1C67ADC66394443F6B9DE06FCE530CF2EF25E463307D2900A
D27177AB3AFC07BB613741B194AD64E4F164F8BC683BDE1665E2AC5
B9A772252AE987890B51BD028677A9B3899E0DED97991AD22A2F210
68C515F7D3D3DF725C2FEFA32115AC3A37B7

Hash(20 bytes):

5EC4612543BFAACC5604C4C6796068E58244F937

Signature(128 bytes):

92DA7C04209EBB55823157D23B5E6EED67DC40A64FEEE3C5AF8EE59C0
D5BD2E200F508B6AA3EE15FAB1898EC32A9FFDFC2426F6C3A6FEC3D84
E4D7A14B67D50E231455F1680589EC6560FEC29DF87103E5F469EFC76
0AD3F01A0D2DC96955880D2FDA5A9904D2D85C1FB03B40416F412D611
B7BA50E884DF09190D56CA781935
share|improve this question
2  
If this were easily possible, do you think anyone would still use RSA? –  Paŭlo Ebermann Feb 16 '13 at 15:57
    
The idea that "a public key allows you to verify signatures but does not allow you to create new ones" really is the concept behind public key cryptography. –  poncho Feb 16 '13 at 19:05
    
What would be the point of a signature that anyone could make? What purpose would it serve? –  David Schwartz Feb 18 '13 at 4:08
add comment

1 Answer

No, it's not possible.

RSA based signatures can only be generated if you know the private key. At the RSA primitive level, signing is the same as decrypting a message (where the data being decrypted in this instance is a hash of the message).

If you change the hash, then verification of that signature would fail. Without knowledge of the corresponding private key there is no practical way to generate a valid signature for a different hash.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.