<p>Signature generation: </p>

<pre><code>xRandSignPoint, yRandSignPoint = EccMultiply(Gx,Gy,RandNum)
R = xRandSignPoint % N
S = ((HashOfThingToSign + R * privKey) * (modinv(RandNum,N))) % N
</code></pre>

<p>Signature verification:</p>

<pre><code>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"
</code></pre>

<p><code>EccMultiply</code> – elliptic curve point on scalar multiplication.</p>

<p><code>ECadd</code> – elliptic curve 2 points addition.</p>

<p>Here is the original <a href="https://github.com/wobine/blackboard101/blob/master/EllipticCurvesPart5-TheMagic-SigningAndVerifying.py" rel="nofollow noreferrer">source</a>.</p>

CC BY-SA 4.0
2018-07-01T13:46:24.480Z
2018-07-01T14:15:51.230Z
2018-07-01T14:15:51.230Z
Denis Leonov
<p>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.</p>

<p>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...</p>

<p>Thank you all in advance. Cheers</p>

<signature><validation>
Link to Algorithmic behind signatures verification
mosegui
# Link to Algorithmic behind signatures verification

(Asked by: username_0 on 2018-07-01)

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

**Tags:** signature, validation


---

## 1 answers

### Answer by username_1 on 2018-07-01. Score: 0

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](https://github.com/wobine/blackboard101/blob/master/EllipticCurvesPart5-TheMagic-SigningAndVerifying.py).


---

