-3

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
Mike Edward Moras
  • 18,161
  • 12
  • 87
  • 240
user5044
  • 11
  • 1
  • 1

1 Answers1

3

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.

Michael
  • 1,509
  • 10
  • 19