is defined as identity, therefore and , for any or
?
Line through the two points is vertical, and does not intersect any third
If per definition
Scalar Multiplication
How to compute where is a natural number?
Using double and add algorithm, computation needs less than additions.
Note that there are faster algorithms.
Logarithm Problem
Find such that for known and .
Note that this is actually a division problem, but called logarithm problem for conformity with other cryptosystems.
Finite Fields and Discrete Logarithm
A finite field is a set with a finite number of elements with two binary operations: addition () and multiplication ().
Both operations are closed, associative and commutative. For both operations exist a unique identity element, and for every element a unique inverse element. Also, multiplication is distributive over addition: .
Elliptic Curves in
is the finite field of integers modulo , where is a prime number. consists of the integers from to .
The set of points of elliptic curves in is:
where is point at infinity and .
Note that elliptic curves in are an abelian group.
Order of an Elliptic Curve Group
Whats the number of points in an elliptic curve group, i.e. the order of the group?
No idea, but the Schoof algorithm computes the order in polynomial time.
Note, that the Schoof algorithm can only be used on whole elliptic curves, not subgroups.
Scalar Multiplication and Cyclic Subgroups
Due to modular arithmetic: . The result of multiplications repeat cyclically.
The set of these results, i.e. the set of multiples of is a cyclic subgroup of the group formed by the elliptic curve.
A subgroup is a group which is a subset of another group. A cyclic subgroup is a subgroup which elements are repeating cyclically.
The Point is called generator or base point of the cyclic subgroup.
Order of a Cyclic Subgroup
How to compute the order of a subgroup generated by point ? How to compute the order of ?
The order of is the smallest positive integer such that
Note that with starts a "new cycle"
Lagrange's theorem states that the order of a subgroup is a divisor of the order of the parent group
If group contains points and one of its subgroups containt points, then is a divisor of .
Compute order of subgroup by:
Compute elliptic curve's order using Schoof's algorithm.
Find all divisors of .
For every divisor of , compute
The smallest such that is the order of the subgroup
Cofactor of a Subgroup
The number , with for being the order of the group and the order of the subgroup, is called the cofactor of the subgroup.
Note that is always an integer.
Finding a Generator
Want:
subgroups with high order
order of subgroup () must be prime number
Algorithm:
Compute order of elliptic curve.
Choose order of the subgroup. Note that must be a prime number.
Copmute cofactor .
Choose random point on the curve.
Compute
Note that generates a subgroup of order iff .
Discrete Logarithm Problem (for Elliptic Curves)
Find such that for known and .
Remember the normal discrete logarithm problem: Find such that for known and .
ECDH and ECDSA
Domain Parameters
ECDH and ECDSA work in a cyclic subgroup of an elliptic curve over a finite field.
The following parameters are therefore needed:
The prime that specifies the size of the finit field.
The coefficients and of the elliptic curve equation.
The generator that generates the subgroup.
The order of the subgroup
The cofactor of the subgroup
Elliptic Curve Cryptography
private key is a random integer , where is the order of the subgroup.
public key is the point , where is the generator of the subgroup.
Knowing and its easy to compute . Knowing and , its hard top compute , because it requires solving the discrete logarithm problem.
Via ECDSA, Alice can sign a message with her private key (), and others can validate the signature using Alice's public key ().
ECDSA works on the hash of the message, rather than on the message itself. The hash must be truncated so that the bit length of the hash equals the bit length of (the order of the subgroup).
The truncated hash is an integer, denoted as .
Signature Generation
Take a random integer.
where is the subgroup order.
Compute a point .
where is the subgroup's generator.
Compute the number .
where is the coordinate of .
If , choose different and try again.
Compute .
where:
is Alice's private key.
is the multiplicative inverse of modulo .
is the truncated message's hash.
If , choose different and try again.
The pair is the signature.
To summarize: The algorithm first generates a secret (), which is hidden in thanks to point multiplication, i.e. discrete logarithm problem. Afterwards, is bound to the message's hash via the computation of .
Signature Verification
Compute integer .
Compute integer .
Compute point .
Signature is valid iff .
Importance of
It is of utmost importance to keep secret, and never use a chosen for multiple signatures. Otherwise, the private key can be extracted!