Public key signature and verification process

Public key signature and verification process

Set

Private key: k,
public key: K,
elliptic curve base point: G,
and satisfy K = k * G, private key k → Public key K, the process is irreversible
Temporary random private key: r,
temporary public key: R = r * G
Message to be encrypted: Message
The message after the hash: hash
Message Digest: Digest
Digital Signature: Signature
Random number: x

一、The process of signature

  1. Calculate the temporary public key: R = r ∗ G R = r * G R=rG
  2. calculate the signture: S i g n a t u r e = h a s h + k ∗ x r Signature = \frac{hash+ k * x}{r} Signature=rhash+kx
  3. Send the temporary public key R, Message and Signature to the message receiver

二、The process of verifying

The principle of check is to calculate the temporary public key r *G according to the public key K, Message and digital signature,
V = h a s h + k ∗ x s ⋅ × G = h a s h s × G + k ∗ x s ⋅ × G = h a s h s × G + x s ⋅ × K V = \frac{hash+ k * x}{ s} \cdot \times G\\ = \frac{hash}{s}\times G + \frac{k * x }{s}\cdot \times G\\ = \frac{hash}{s}\times G + \frac{x }{s}\cdot \times K V=shash+kx×G=shash×G+skx×G=shash×G+sx×K

then verify whether it is consistent with the received message R.
If V == R, the signature is valid; if v ≠ r, the signature is invalid.

Guess you like

Origin blog.csdn.net/William__Ma/article/details/128943489