0

I have implemented Elgamal Digital Signature algorithm by the help of wikipedia page. http://en.wikipedia.org/wiki/ElGamal_signature_scheme

But now I am confused on how to use hash of a message for calculation?

The algo is working fine for m (message), but we have to use
H(m), for calculating s = (H(m)-xr)k^-1 (mod p-1)

m = 7
Hash(m) 512 = F05210C5B4263F0EC4C3995BDAB458D81D3953F354A9109520F159DB1E8800BCD45B97C56DCE90A1FC27AB03E0B8A9AF8673747023C406299374116D6F966981

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
Ajay
  • 1
  • What do you mean by `to use hash of a message for calculation`? For calculation of what? – kkuilla Mar 18 '15 at 12:27
  • The Hash is just a number (albeit, a very large number). You have to use properties of modular arithmetic to simplify the operation and evaluate. – Rollen Mar 18 '15 at 14:11
  • kkuilla... Hey I need to calculate digital signature of a message m – Ajay Mar 18 '15 at 16:10
  • Rollen D'Souza... Can you please let me know how to use properties of modular arithmetic in this case. – Ajay Mar 18 '15 at 16:11
  • @Ajay algorithms for digital-signture are computational costly operations. Hashes are a unidirectional algorithms to "compress" the data to sign, a hash algorithms generate a hash of the same lenght (for example sha1 generate hash of 20byte). So before to perform a digital-signature you've to hash the data to be signed. I've experience with digital-signatures in java however, I've no experience in matlab due I can't provide a helper comment, sorry. – albciff Mar 23 '15 at 20:59
  • Note that the [tag:signature] tag is not correct as that's about *method* signatures. – Maarten Bodewes Apr 08 '15 at 21:46

0 Answers0