Elliptic Curve Cryptography: 2 History
Elliptic Curve Cryptography: 2 History
Ramesh Singh
National Informatics Centre
Government Of India
1
ACM Ubiquity, Volume 9, Issue 20 May 20 – 26, 2008
that they both have already shared a key k. Alice 1. Alice passes the message m and Bob’s public key
encrypts m using the shared key k to get the cipher B
∗∗
to an appropriate encryption algorithm to
text. construct the encrypted message.
2
ACM Ubiquity, Volume 9, Issue 20 May 20 – 26, 2008
3.2 Application of destroying the Card and waiting for a new one to
be shipped to him/her. A typical Java Card device
Smartcards were invented and patented in early
has an 8- or 16-bit CPU running at 5 MHz, with 2K
1970’s, but the first mass use of smartcards was made
of RAM and more than 32K of non-volatile memory
in 1983, in French pay-phones. A major boom in
(EEPROM or Flash). High performance smartcards
Smartcard use came in 1990’s, with their introduc-
come with a separate processor and cryptographic
tion as SIM cards in mobile phones. They are com-
chip and memory for encryption, and some come with
monly in use now. Smartcard technology is an in-
a 32-bit CPU.
dustry standard defined and controlled by the Joint
Technical Committee 1(JCT1) of the International
Standards Organization (ISO) and the International 4 Current technology - RSA
Electronic Committee (IEC). The series of interna-
tional standards ISO/IEC 7816, introduced in 1987 RSA stands for Rivest, Adleman and Shamir, who
with the latest update in 2003, defines various as- devised this algorithm in 1977 at MIT. RSA is the
pects of a smartcard, including physical characteris- most widely used public-key encryption scheme to-
tics, physical contacts, electronic signals and trans-day. The US patent on the RSA algorithm expired
mission protocols, commands, security architecture in 2000, but as the algorithm was already published
etc. Smartcards don’t contain a battery, and become prior to patent application, it precluded patents else-
active only when connected with a card reader. When where.
connected, after a reset sequence, the card remains The security of the RSA cryptosystem is based on
passive, waiting to receive a command request from two mathematical problems: the problem of factoring
a client(host) application. Smartcards can be con- very large numbers, and the RSA problem. Both of
tactless (based on Radio Frequency ID tags), or can these problems are hard, i.e., no e cient algorithm
have a standard 8-pin contact[Ort03]. exists for solving them.
Today smartcards are used for various applica- The RSA problem is defined as the task of taking
tions all over the world including Banking, Medical eth roots modulo a composite n: recovering a value
records, GSM SIM cards, Identification and crypto- m such that me = c (mod n), where (e, n) is the
graphic services. They have storage and processing public key and c is the ciphertext. Currently the most
capability, and are convenient to carry around, and aspromising approach to solving the RSA problem is
the processing power and memory capacity of smart- to factor the modulus n. With the ability to recover
cards improves, their range of applications is expand-prime factors, an attacker can compute the secret
ing as well. exponent d from a public key (e, n), then decrypt c
using the standard procedure. To accomplish this,
3.3 Java Card an attacker factors n into p and q, and computes
(p−1)(q−1) which allows the determination of d from
Java Card technology adapts the Java platform for e. No polynomial-time method for factoring large
use on smart cards and other devices whose environ- integers on a classical computer has yet been found,
ments are highly specialized, and whose memory and but it has not been proven that none exists[wik].
processing constraints are typically more severe than
those of J2ME devices. On a Java Card platform mul-
tiple applications from di erent vendors can co-exist
4.1 Basic Algorithm
securely. Java Cards are capable of running Java byte 4.1.1 Key Generation
codes, and upto 3 applets at once. A major advantage
Suppose Alice and Bob are communicating over an in-
of running downloadable applets is that in case of a
secure (open) transmission medium, and Alice wants
security breach, the user only need to download and
Bob to send her a private (or secure) message [wik].
write a new applet onto his/her Java Card, instead
3
ACM Ubiquity, Volume 9, Issue 20 May 20 – 26, 2008
Using RSA, Alice will take the following steps to gen- 4.1.3 Decrypting Messages
erate a public key and a private key:
Alice receives c from Bob, and knows her private key
1. Choose two large numbers prime numbers p and d. She can recover m from c by the following proce-
q such that p "= q, randomly and independent of dure:
each other. m = cd (mod n) (9)
• e, the public exponent (sometimes encrpytion Since p and q are distinct prime numbers, applying
exponent) the Chinese remainder theorem to these two congru-
ences yields
The private key consists of:
med ≡ m (mod pq). (15)
• n, the modulus, and
• e, the private exponent (sometimes decryption Thus,
exponent), which must be kept secret. cd ≡ m (mod n). (16)
4
ACM Ubiquity, Volume 9, Issue 20 May 20 – 26, 2008
in proportion to the processor power available, there elliptic curves, and their usage is given in the follow-
arises a need to devise a scheme which provies the ing section.
same level of cryptographic security with smaller key
lengths. ECC is one such scheme, described in the 5.1 Basic Algorithm
following section.
5.1.1 Operations on Elliptic Curves
∴ 2P = P + P
5.1.2 Cryptography
Alice, Bob, Cathy, David. . . agree on a (non-secret)
elliptic curve and a (non-secret) fixed curve point F.
Alice chooses a secret random integer Ak which is her
secret key, and publishes the curve point AP = Ak F
as her public key. Bob, Cathy and David do the same.
Now suppose Alice wishes to send a message to Bob.
One method is for Alice to simply compute Ak BP and
use the result as the secret key for a conventional
symmetric block cipher (say DES). Bob can compute
the same number by calculating Bk AP , since
Figure 1: Elliptic curve showing the operation P + The security of the scheme is based on the assumption
Q = R. (See Appendix B) that it is di cult to compute k given F and kF.
† can also be used in the form
5.1.3 Choosing the Fixed Curve
y 2 = x3 + ax + b
A finite field is first chosen (see Appendix A). If the
field is GF(p) where p is a large prime, the xy term
5
ACM Ubiquity, Volume 9, Issue 20 May 20 – 26, 2008
is omitted, leaving us with (see Equation 17) ECC has a few attacks on a few particular classes
of curves. These curves can be readily distinguished
y 2 = x3 + ax2 + b, where 4a3 + 27b2 "= 0. (19) and can be avoided. On the other hand, RSA already
has a known sub-exponential attack which works in
If the field is GF(2m ), then we include the xy term
general. Thus, to maintain the same degree of secu-
to get
rity, in view of rising computing power, the number
y 2 + xy = x3 + ax2 + b, where b "= 0. (20) of bits required in the RSA generated key pair will
rise much faster than in the ECC generateed key pair,
Fields GF(pm ) with both p > 2 and m > 1 are not as seen in table 1.
considered here. Menezes and Jurisic, in their paper [JM97], said
that to achieve reasonable security, a 1024-bit mod-
5.1.4 Choosing the Fixed Point ulus would have to be used in a RSA system, while
160-bit modulus should be su cient for ECC.
For any point P on a elliptic curve in the GF(pm ),
Time to break RSA key-size ECC key-size
lim kP → 0. (in MIPS-years) (in bits) (in bits)
k→∞
104
512 106
For some a and b, b > a, we will have aP = bP. This 108 768 132
implies cP = 0 where c = b−a. The least c for which 1011 1024 160
this is true is called the order of the point, and c must 1020 2048 210
divide the order of the curve. 1078 21000 600
For good security, the curve and fixed point are
chosen so that the order of the fixed point F is a Table 1: Comparison of strength of RSA and ECC
large prime number. This is determined from the
order of the curve, which is done from Schoof ’s Algo- Most attacks on ECC are based on attacks on sim-
rithm[IKNY98]. For good security, the order of the ilar discrete logarithm problems, but these work out
fixed point should also satisfy the MOV condition to to be much slower due to the added complexity of
prevent certain possible attacks. point addition. Also, mathods to avoid each of the
As far as is known, with the above provisions, if attacks have already been designed.[Pie00]
the order of the fixed point F is an n-bit prime, then
n
computing k from kF and F takes roughly 2 2 oper-
5.2.2 Space Requirements
ations.
This is what makes the use of elliptic curves attrac- Due to increasing computation required for higher bit
tive – it means that public keys and signatures can be encryption, more transistors are required onboard the
much smaller than with RSA for the same predicted smart card to perform the operation. This leads to
security. an increase in area used for processor. Using ECC,
the number of transistors can be cut back on since
5.2 Advantages over RSA the numbers involved are much smaller than an RSA
system with as similar-level security.
5.2.1 Security Also, the bandwidth requirements for both of the
The main advantage ECC has over RSA is that the systems is the same when the messages to be signed
basic operation in ECC is point addition (see Ap- are long, but ECC is faster when the messages are
pendix B), which is known to be computationally short. This is more relevant, since PKC is used to
very expensive. This is one of the reasons why it transmit mostly short messages, e.g. session ids.
is very unlikely that a general sub-exponential attack
on ECC will be discovered in the near future, though
6
ACM Ubiquity, Volume 9, Issue 20 May 20 – 26, 2008
5.2.3 Efficiency for elliptic curves was only discovered in the process
of finding out new attacks on the RSA system.[Len87]
Both methods can be made faster – in RSA, by using
smaller public exponent, though this holds a greater
security risk and in ECC, some results of the calcula- A Galois Fields
tion can be stored beforehand. Certicom, a Canadian
company, has been studying and promoting the ECC The familiar examples of fields are R, C, Q and Z
system since the early ’80s. Some of their results of (mod p)∀p = prime numbers. The latter is an exam-
fast implementations of ECC compared to RSA are ple of a finite field. The requirements of a field are
given in table 2. the operations of addition and multiplication, plus
the existence of both additive and multiplicative in-
Function ECC 163-bit RSA 1024-bit verses (except that 0 doesn’t have a multiplicative
(in ms) (in ms) inverse). To put it another way, a field has addition,
Key Generation 3.8 4708.3 subtraction, multiplication and division – and these
Sign 2.1(ECNRA) 228.4 operations always produce a result that is in the field,
3.0(ECDSA) with the exception of division by zero, which is un-
Verify 9.9(ECNRA) 12.7 defined.
10.7(ECDSA) Recall that complex numbers can be defined as a +
b · ι with the reduction rule ι2 + 1 = 0. To multiply
Table 2: Comparison of RSA and ECC complex numbers we treat ι as an unknown, collect up
powers of ι, and apply the reduction rule to simplify
the result. It turns out that this construction works
for other reduction rules involving higher powers of ι.
6 Conclusions To avoid confusion, in what follows, t is used instead
of ι.
In the discussion above, we have seen that ECC is
The coe cients of the powers of t can be from any
faster, and occupies less meory space than an equiv-
field – but if we take the field to be the Z (mod p),
alent RSA system. This means that it is suitable for
we get a finite field with pm elements, where m is the
constrained environments, especially in smartcards,
degree of the reduction rule – that is the exponent of
where fast operations are necessary. Though the in-
the highest power of t.
dustry has been excruciatingly slow in adopting the
For example, if we set p = 2, m = 4, and use the
new technique, RSA Security in an article on their
reduction rule t4 + t + 1 = 0, we get a field with
website has implicitly agreed that ECC is the way to
24 = 16 distinct elements: 0, 1, t, t + 1, t2 , t2 + 1, t2 +
the future. The di erence in the key-sizes between
t, t2 + t + 1, t3 , t3 + 1, t3 + t, t3 + t + 1, t3 + t2 , t3 + t2 +
ECC and RSA will grow exponentially to maintain
1, t3 + t2 + t, t3 + t2 + t + 1.
the same relative strength as compared to the aver-
This construction works for all p and m, as long
age computing power available.
as p is prime; in fact every finite field can be con-
The one thing working against ECC is that though
structed in this way; moreover two finite fields with
elliptic curves has been a well-researched field, albeit
the same number of elements are always isomorphic
an esoteric and extremely vast one2 , its cryptographic
– that is there is a 1-1 map between them which pre-
applications have been noticed only recently. This is
serves the addition and multiplication rules. This
the only advantage that RSA has over ECC. RSA
field is called the Galois Field with pm elements, de-
has been well-researched and has been the topic of
noted by GF(pm ).
many seminal theses. In fact, the cryptographic use
2 ”It is possible to write endlessly on elliptic curves. (This
7
ACM Ubiquity, Volume 9, Issue 20 May 20 – 26, 2008
References
[Bar97] George Barwood. Elliptic curve cryptog-
raphy faq v1.12. 1997.
[DH76] Whitfield Di e and Martin E. Hellman.
New directions in cryptography. IEEE
Transactions on Information Theory, IT-
22(6):644–654, 1976.
[IKNY98] Tetsuya Izu, Jun Kogure, Masayuki Noro,
and Kazuhiro Yokoyama. E cient imple-
mentation of schoof’s algorithm. In ASI-
ACRYPT ’98: Proceedings of the Interna-
tional Conference on the Theory and Ap-
plications of Cryptology and Information
Security, pages 66–79, London, UK, 1998.
Springer-Verlag.