notes - MIT 6.857 Computer and Network Security Class Notes...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 MIT 6.857 Computer and Network Security Class Notes Revision: December 2, 2002 Computer and Network Security MIT 6.857 Class Notes by Ronald L. Rivest December 2, 2002 c 1 Copyright 2002 Ronald L. Rivest.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 MIT 6.857 Computer and Network Security Class Notes Revision: December 2, 2002 Introduction to Number Theory Elementary number theory provides a rich set of tools for the implementation of cryptographic schemes. Most public-key cryptosystems are based in one way or another on number-theoretic ideas. The next pages provide a brief introduction to some basic principles of elementary number theory. c 1 Copyright 2002 Ronald L. Rivest.
Background image of page 2
3 MIT 6.857 Computer and Network Security Class Notes Revision: December 2, 2002 Bignum computations Many cryptographic schemes, such as RSA, work with large integers, also known as “bignums” or “multi- precision integers.” Here “large” may mean 160–4096 bits (49–1233 decimal digits), with 1024-bit integers (308 decimal digits) typical. We briefly overview of some implementation issues and possibilities. When RSA was invented, efficiently implementing it was a problem. Today, standard desktop CPU’s perform bignum computations quickly. Still, for servers doing hundreds of SSL connections per second, a hardware assist may be needed, such as the SSL accelerators produced by nCipher www.ncipher.com/ . A popular C/C++ software subroutine library supporting multi-precision operations is GMP (GNU Multi- precision package) www.swox.com/gmp/ . A more elaborate package (based on GMP) is Shoup’s NTL (Number Theory Library) www.shoup.net/ntl/ . For a survey, see https://www.cosic.esat.kuleuven.ac.be/nessie/call/mplibs.html . Java has excellent support for multiprecision operations in its BigInteger class java.sun.com/j2se/1.4.1/docs/api/java/math/BigInteger.html ; this includes a primality- testing routine. Python www.python.org/ is a personal favorite; it includes direct support for large integers. Scheme www.swiss.ai.mit.edu/projects/scheme/ also provides direct bignum support. Some other pointers to software and hardware implementations can be found in the “Practical Aspects” section of Helger Lipmaa’s “Cryptology pointers” www.tcs.hut.fi/˜helger/crypto/= . When working on k -bit integers, most implementations implement addition and subtraction in time O ( k ) , multiplication, division, and gcd in time O ( k 2 ) (although faster implementations exist for very large k ), and modular exponentation in time O ( k 3 ) . To get you roughly calibrated, here are some timings, obtained from a simple Python program on my IBM Thinkpad laptop (1.2 GHz PIII processor) on 1024-bit inputs. SHA-1 is included just for comparison. The last column gives the approximate ratio of running time to addition. 2.2 microseconds
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

notes - MIT 6.857 Computer and Network Security Class Notes...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online