# Link to Algorithmic behind signatures verification [duplicate]

This question already has an answer here:

Does anyone know a good paper where the process of signature verification is explained (message+signature+public key = valid/not_valid) ??? And I mean it at a low level, with the code or pseudo-code of the algorithms doing the verification or similar. All sources I have found explain it with the verification process being pretty much a black box.

I know StackExchange is not the place to ask for references, but I haven't found what I am looking for, so someone might now a good source...

Thank you all in advance. Cheers

## marked as duplicate by pebwindkraft, Raghav Sood, Andrew Chow♦Jul 3 '18 at 8:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 1 Answer

Signature generation:

``````xRandSignPoint, yRandSignPoint = EccMultiply(Gx,Gy,RandNum)
R = xRandSignPoint % N
S = ((HashOfThingToSign + R * privKey) * (modinv(RandNum,N))) % N
``````

Signature verification:

``````w = modinv(S,N)
xu1, yu1 = EccMultiply(Gx,Gy,(HashOfThingToSign * w)%N)
xu2, yu2 = EccMultiply(xPublicKey,yPublicKey,(R * w)%N)
X,Y = ECadd(xu1,yu1,xu2,yu2)
if R == X:
print "Signature verified"
``````

`EccMultiply` – elliptic curve point on scalar multiplication.

`ECadd` – elliptic curve 2 points addition.

Here is the original source.