Blockchain Lecture 7
Blockchain Lecture 7
January 20 2025
Introduction
Digital signatures are a fundamental concept in blockchain technology, providing authentication,
integrity, and non-repudiation for transactions. This lecture explores the mathematical foundations,
implementation, and significance of digital signatures.
Formal Definition
A digital signature scheme consists of three algorithms:
1. Key Generation (Gen): Produces a pair of keys (sk, pk), where sk is the private
key and pk is the public key.
2 Mathematical Framework
Let H(m) denote a cryptographic hash function. The signing and verification processes can be
described as follows:
σ = Signsk (H(m))
(
True if valid,
Verify: V erif ypk (m, σ) =
False otherwise.
1
Blockchain Lecture Notes: Digital Signatures
Euclidean Algorithm
The Euclidean algorithm is a highly efficient method for computing the greatest common divisor
of two integers. It is based on the following recursive property:
(
b if b = 0,
gcd(a, b) =
gcd(b, a mod b) if b ̸= 0.
ax + by = gcd(a, b).
Claim
Proof. To prove that an element [k]n ∈ Zn is multiplicatively invertible if and only if gcd(k, n) = 1,
we consider two cases:
Case 1: gcd(k, n) = 1
By Bezout’s theorem, there exist integers x and y such that:
kx + ny = 1.
kx + ny ≡ 1 (mod n).
kx ≡ 1 (mod n).
Thus, [x]n serves as the multiplicative inverse of [k]n , proving that [k]n is invertible.
2
Blockchain Lecture Notes: Digital Signatures
kx + ny = d.
This implies that k (mod n) cannot have a multiplicative inverse, since any candidate for the inverse
would fail to satisfy kx ≡ 1 (mod n).
Hence, [k]n is not invertible when gcd(k, n) > 1.
Conclusion
Combining both cases, we conclude that [k]n ∈ Zn is multiplicatively invertible if and only
if gcd(k, n) = 1.
Conclusion
For a prime p, Z∗p is a cyclic group of order p − 1. Each element in Z∗p has a unique
multiplicative inverse.
Proof. Let a ∈ Z∗p and consider the map f : Z∗p → Z∗p defined by:
• Since a ∈ Z∗p , it has an inverse a−1 such that a · a−1 ≡ 1 (mod p).
a · x1 ≡ a · x2 (mod p).
3
Blockchain Lecture Notes: Digital Signatures
x1 ≡ x2 (mod p).
• Multiplying all elements of this set by some a ∈ Z∗p results in the set {ax1 , ax2 , ax3 , . . . , axk },
with all elements taken modulo p.
• Since a ∈ Z∗p is invertible, the new set {ax1 , ax2 , . . . , axk } is a permutation of the original set
{x1 , x2 , . . . , xk } modulo p.
• Therefore, the product of all elements in both sets is congruent modulo p, leading to:
ak ≡ 1 (mod p).
• Since the cardinality of Z∗p is p − 1, this gives the statement of Fermat’s Little Theorem:
Conclusion
For any integer a coprime to p, Fermat’s Little Theorem states:
where p is a prime number. This result follows from the properties of the group Z∗p under
multiplication modulo p. We will see later that we can generalise this result even if n is not
prime.
4 Applications
• Blockchain transactions
References
• Lecture notes by Professor Tony Zacob