Bitcoin Forum

Other => Beginners & Help => Topic started by: newcn on December 13, 2013, 11:24:20 AM



Title: who can explain how signing/verifing message works?
Post by: newcn on December 13, 2013, 11:24:20 AM
Using a bitcoin client, one can sign/verify messages.
I understand that I use my private key to sign a message,
but I wonder why other people can verify messages which I signed?
since the  key is private, and other people don't know.


Title: Re: who can explain how signing/verifing message works?
Post by: Aeequtio on December 15, 2013, 06:01:14 AM
I would like to know more about that as well.
Can anyone shed some light on it?


Title: Re: who can explain how signing/verifing message works?
Post by: binaryclock on December 15, 2013, 06:44:50 AM
Me 3, plz


Title: Re: who can explain how signing/verifing message works?
Post by: shorena on December 15, 2013, 06:58:17 AM
The verfication is done with your public key.

Basicly its a o = m^d (mod N)

where o is the signature, m is the message and d is the private key
Because RSA has some vulnerabilites, the message gets hashed first.

To check the signature you calulate o^e = m (mod N)
where e is the public key to the former used private key.

If the hashes match the message wasnt changed durring transport.

This works because ed = 1 (mod phi(N))
while e and N again are part of the public key
and d is the private key



If you want more details, read the rfc 3447, its explained for RSA, but the principle is still the same

Link: http://tools.ietf.org/html/rfc3447#page-27



Edit: phi(x) is eulers phi function ( http://en.wikipedia.org/wiki/Euler%27s_totient_function )


Title: Re: who can explain how signing/verifing message works?
Post by: newcn on January 04, 2014, 12:41:30 PM
The verfication is done with your public key.

Basicly its a o = m^d (mod N)

where o is the signature, m is the message and d is the private key
Because RSA has some vulnerabilites, the message gets hashed first.

To check the signature you calulate o^e = m (mod N)
where e is the public key to the former used private key.

If the hashes match the message wasnt changed durring transport.

This works because ed = 1 (mod phi(N))
while e and N again are part of the public key
and d is the private key



If you want more details, read the rfc 3447, its explained for RSA, but the principle is still the same

Link: http://tools.ietf.org/html/rfc3447#page-27



Edit: phi(x) is eulers phi function ( http://en.wikipedia.org/wiki/Euler%27s_totient_function )

thank you very much!