Dan Boneh Intro. Number Theory Arithmetic algorithms Online Cryptography Course Dan Boneh.

Slides:



Advertisements
Similar presentations
ElGamal Security Public key encryption from Diffie-Hellman
Advertisements

Looping while … do …. Condition Process 2 Process 1 Y Repeated Loop.
Chapter 4 Finite Fields. Introduction of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key concern operations on “numbers”
Cryptography and Network Security Chapter 4 Fourth Edition by William Stallings.
Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Capstone Project Presentation A Tool for Cryptography Problem Generation CSc 499 Mark Weston Winter 2006.
Arithmetic Intro Computer Organization 1 Computer Science Dept Va Tech February 2008 © McQuain Algorithm for Integer Division The natural (by-hand)
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Finite Arithmetics of Integers FORTRAN codes: INTEGER*2INTEGER HTML HTML version.
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
Lecture 3.2: Public Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 7 Tuesday, 11/6/01 Number-Theoretic Algorithms Chapter.
Dan Boneh Intro. Number Theory Modular e’th roots Online Cryptography Course Dan Boneh.
Dan Boneh Collision resistance Generic birthday attack Online Cryptography Course Dan Boneh.
Dan Boneh Basic key exchange The Diffie-Hellman protocol Online Cryptography Course Dan Boneh.
Dan Boneh Public Key Encryption from trapdoor permutations The RSA trapdoor permutation Online Cryptography Course Dan Boneh.
Dan Boneh Intro. Number Theory Intractable problems Online Cryptography Course Dan Boneh.
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
Arithmetic.
Dan Boneh Stream ciphers The One Time Pad Online Cryptography Course Dan Boneh.
1 Intro to Computer Science I Chapter 1 Introduction to Computation Algorithms, Processors, and Programs.
CPSC 3730 Cryptography and Network Security
1 Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 4 – Finite Fields.
CS 312: Algorithm Analysis Lecture #3: Algorithms for Modular Arithmetic, Modular Exponentiation This work is licensed under a Creative Commons Attribution-Share.
Lecture 2 Computational Complexity
Introduction to Computational Linguistics Programming I.
Multiplication of signed-operands
Dan Boneh Block ciphers More attacks on block ciphers Online Cryptography Course Dan Boneh.
Advanced Algebraic Algorithms on Integers and Polynomials Prepared by John Reif, Ph.D. Analysis of Algorithms.
Dan Boneh Introduction Discrete Probability (crash course) Online Cryptography Course Dan Boneh See also:
Chapter 4 – Finite Fields
Dan Boneh Stream ciphers Pseudorandom Generators Online Cryptography Course Dan Boneh.
Linear Feedback Shift Register. 2 Linear Feedback Shift Registers (LFSRs) These are n-bit counters exhibiting pseudo-random behavior. Built from simple.
The Fast Fourier Transform and Applications to Multiplication
CSE 311: Foundations of Computing Fall 2014 Lecture 12: Primes, GCD.
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
COE 308: Computer Architecture (T032) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
Division. Just as multiplication can be expressed as a series of additions, division can be seen as a series of subtractions. 21 ÷ 7 asks how many times.
Dan Boneh Collision resistance The Merkle-Damgard Paradigm Online Cryptography Course Dan Boneh.
Dan Boneh Stream ciphers PRG Security Defs Online Cryptography Course Dan Boneh.
Dan Boneh Intro. Number Theory Fermat and Euler Online Cryptography Course Dan Boneh.
Algorithms an Introduction. History This course was first taught in the late 1960s The main principals that maintained the area –Find algorithms that.
CSE 311: Foundations of Computing Fall 2013 Lecture 11: Modular arithmetic and applications.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
Cryptography Lecture 14 Arpita Patra © Arpita Patra.
MA/CSSE 473 Day 06 DivisionPrimes Modular Arithmetic.
MA/CSSE 473 Day 05 More induction Factors and Primes Recursive division algorithm.
System Calls & Arithmetic
IGCSE 1 Cambridge Algorithms and flowcharts Unit 7 Computer Science
MA/CSSE 473 Day 06 Euclid's Algorithm.
Lecture 3.2: Public Key Cryptography II
Number Theory (Chapter 7)
Cryptography Lecture 22.
1 Step Equation Practice + - x ÷
CSCI206 - Computer Organization & Programming
Modular Arithmetic I Lecture 9: Oct 4.
Review # 2 Math 8.
Lecture 20 Guest lecturer: Neal Gupta
Discrete Math for CS CMPSC 360 LECTURE 12 Last time: Stable matching
CPU Design & Computer Arithmetic
Modular Arithmetic and Change of Base
Arithmetic MOD 7 a finite algebra
CSE 321 Discrete Structures
Division and Modulo 15 Q A = Dividend B = Divisor Q = Quotient = A/B
Functions and Tables.
Cryptography Lecture 18.
Cryptography Lecture 16.
Cryptography Lecture 18.
Presentation transcript:

Dan Boneh Intro. Number Theory Arithmetic algorithms Online Cryptography Course Dan Boneh

Dan Boneh Representing bignums Representing an n-bit integer (e.g. n=2048) on a 64-bit machine Note: some processors have 128-bit registers (or more) and support multiplication on them 32 bits ⋯ n/32 blocks

Dan Boneh Arithmetic Given: two n-bit integers Addition and subtraction: linear time O(n) Multiplication: naively O(n 2 ). Karatsuba (1960) : O(n ) Basic idea: (2 b x 2 + x 1 ) × (2 b y 2 + y 1 ) with 3 mults. Best (asymptotic) algorithm: about O(n ⋅ log n). Division with remainder: O(n 2 ).

Dan Boneh Exponentiation Finite cyclic group G (for example G = ) Goal: given g in G and x compute g x Example: suppose x = 53 = (110101) 2 = Then: g 53 = g = g 32 ⋅ g 16 ⋅ g 4 ⋅ g 1 g g 2 g 4 g 8 g 16 g 32 g 53

Dan Boneh The repeated squaring alg. Input: g in G and x>0 ; Output: g x write x = (x n x n-1 … x 2 x 1 x 0 ) 2 y g, z 1 for i = 0 to n do: if (x[i] == 1): z z ⋅ y y y 2 output z example: g 53 y z g 2 g g 4 g g 8 g 5 g 16 g 5 g 32 g 21 g 64 g 53

Dan Boneh Running times Given n-bit int. N: Addition and subtraction in Z N : linear time T + = O(n) Modular multiplication in Z N : naively T × = O(n 2 ) Modular exponentiation in Z N ( g x ): O ( (log x) ⋅ T × ) ≤ O ( (log x) ⋅ n 2 ) ≤ O( n 3 )

Dan Boneh End of Segment