Welcome to BitDevsUyo's Thirteenth Socratic Seminar!
Thank you to our sponsor Btrust
📍Details
- Date: July 25, 2026
- Time: 14:00- 16:00
- Location: CafeOne UYO, 162 Oron Road, Uyo (Map)
Agenda
1. Digital Signature Fundamentals & Functional Flow
- Digital Signatures (ECDSA)
- High-Level Signature Function:
Signature = Sign(Hash(Message), Private_Key)
- Verification Function:
Verify(Message, Signature, Public_Key) -> True / False
2. Practical Math Breakdown (Step-by-Step Whiteboard Example)
-
Alice's Setup:
- Private Key (x) = 3
- Generator (G) = 5
- Public Key (Xg) = x * G = 3 * 5 = 15
- Private Nonce (k) = 7
- Public Nonce (kG) = k * G = 7 * 5 = 35
- Message Challenge (e) = 11
-
Signing Process:
- Formula:
S = k + (e * x)
- Calculation:
S = 7 + (11 * 3) = 7 + 33 = 40
- Output Signature:
S = 40
-
Verification Process:
- Left-Hand Side:
S * G = 40 * 5 = 200
- Term 2:
e * Xg = 11 * 15 = 165
- Verify Equation:
S * G == kG + (e * Xg)
- Calculation Check:
200 == 35 + 165
- Result:
200 == 200 (Signature Verified!)
3. ECDSA Mathematics: Signing Step-by-Step
- Generating a Signature (r, s)
- Step 1: Message Digest: Compute
z = SHA256(SHA256(message))
- Step 2: Ephemeral Nonce: Select random secret scalar
k
- Step 3: Calculate r: Compute point
R = k * G, set r = R.x mod n
- Step 4: Calculate s: Compute
s = k^-1 * (z + r * d) mod n
- Signature Output Pair:
(r, s)
4. ECDSA Mathematics: Verification Step-by-Step
- Signature Verification
- Step 1: Compute Inverse:
w = s^-1 mod n
- Step 2: Compute Scalar Multipliers:
u1 = z * w mod n
u2 = r * w mod n
- Step 3: Reconstruct Verification Point:
P = (u1 * G) + (u2 * Q)
- Verification Rule: Signature is valid if
P.x mod n == r
5. Nonce Security & Practical Vulnerabilities
- Nonce Reuse and Why It's Dangerous
- Private Key Extraction from Nonce Reuse:
k = (z1 - z2) / (s1 - s2) mod n
d = ((s1 * k) - z1) / r mod n
- Deterministic Nonces (RFC 6979):
k = HMAC-SHA256(private_key, message_hash)
- Low-s Rule (BIP 62): Require
s <= n / 2 to prevent signature malleability
🏛 House Rules