CMPS 2433 – Coding Theory Chapter 3

Slides:



Advertisements
Similar presentations
1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
Advertisements

Cryptography and Network Security
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
February 19, 2015Applied Discrete Mathematics Week 4: Number Theory 1 The Growth of Functions Question: If f(x) is O(x 2 ), is it also O(x 3 )? Yes. x.
Announcements: Homework 1 returned. Comments from Kevin? Homework 1 returned. Comments from Kevin? Matlab: tutorial available at
Chapter II. THE INTEGERS
Chapter 3 Coding Theory.
Congruence of Integers
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Division in the Integers Theorem 1. If n and m are integers and n>0, then m=qn+r for unique integers q and r with 0
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
Peter Lam Discrete Math CS.  Sometimes Referred to Clock Arithmetic  Remainder is Used as Part of Value ◦ i.e Clocks  24 Hours in a Day However, Time.
BY MISS FARAH ADIBAH ADNAN IMK
The Integers and Division
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Chapter 2 The Fundamentals: Algorithms, the Integers, and Matrices
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
Mathematics of Cryptography Part I: Modular Arithmetic
February 24, 2015Applied Discrete Mathematics Week 4: Number Theory 1 Modular Arithmetic Let a be an integer and m be a positive integer. We denote by.
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Mathematics of Cryptography Modular Arithmetic, Congruence,
WIKIPEDIA HAS MANY MORE DIVISIBILITY RULES. EXAMPLE Since 52=13(4) is divisible by 4, is divisible by 4 Since 452=56(8)+4 is not divisible.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
YSLInformation Security -- Public-Key Cryptography1 Prime and Relatively Prime Numbers Divisors: We say that b  0 divides a if a = mb for some m, where.
Elements of Coding and Encryption 1. Encryption In the modern word, it is crucial that the information is transmitted safely. For example, Internet purchases,
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Greatest Common Divisors & Least Common Multiples  Definition 4 Let a and b be integers, not both zero. The largest integer d such that d|a and d|b is.
Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
Discrete Mathematics 4. NUMBER THEORY Lecture 7 Dr.-Ing. Erwin Sitompul
Discrete Mathematics
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
Ch04-Number Theory and Cryptography 1. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic.
Module #9 – Number Theory 6/11/20161 Chapter 3 Algorithms, Integers and Matrices.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Chapter 3 The Fundamentals: Algorithms, the integers, and matrices Section 3.4: The integers and division Number theory: the part of mathematics involving.
Agenda Review:  Relation Properties Lecture Content:  Divisor and Prime Number  Binary, Octal, Hexadecimal Review & Exercise.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
Number-Theoretic Algorithms
Modulo-2 Digital coding uses modulo-2 arithmetic where addition becomes the following operations: 0+0= =0 0+1= =1 It performs the.
Mathematical Background for Cryptography: Modular arithmetic and gcd
Mathematics of Cryptography
B504/I538: Introduction to Cryptography
Mathematics of Cryptography
CSE15 Discrete Mathematics 03/15/17
Introduction to Cryptography
Integers and Division Section 3.4.
CMSC Discrete Structures
Cryptology Design Fundamentals
Cryptology Design Fundamentals
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Applied Discrete Mathematics Week 3: Algorithms
Applied Discrete Mathematics Week 4: Number Theory
Applied Discrete Mathematics Week 4: Number Theory
Number Theory (Chapter 7)
Foundations of Discrete Mathematics
Prime and Relatively Prime Numbers
Week #5 – 23/25/27 September 2002 Prof. Marie desJardins
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Modular Arithmetic and Change of Base
Public Key Cryptography
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Section 10.3 Modular Arithmetic
Copyright © Zeph Grunschlag,
Applied Discrete Mathematics Week 10: Introduction to Counting
Clements MAΘ October 30th, 2014
Number Theory.
Discrete Mathematics Chapter 4 Number Theory. Discrete Mathematics Chapter 4 Number Theory.
Section 9.3 Modular Arithmetic.
Presentation transcript:

CMPS 2433 – Coding Theory Chapter 3

SECURITY Accuracy

Cryptography - Coding The Code Book, Simon Singh Public-key cryptography Number theory Codes & Error-Correcting Codes

Error Checking - Accuracy Even/Odd Parity Each byte transmitted has one bit added so number of ones is even (or odd) Checked upon receipt – reject if number of ones is NOT even (odd) >99% of all transmission errors are in one bit Example Original: 0110 0011 Sent: 0110 0011 0 0111 0101  0111 0101 1

Error Correcting Parity Send a set of multiple (8) bytes as a matrix. Set parity bit on rows & columns Example 1111 1111 0000 0000 0010 0010 0110 1110

Error Correcting Parity Send a set of multiple (8) bytes as a matrix. Set parity bit on rows & columns Example – even parity 1111 1111 0 0000 0000 0 0010 0010 0 0110 1110 1 1011 0011

Error Correcting Parity Send a set of multiple (8) bytes as a matrix. Set parity bit on rows & columns Example – even parity – one bit error 1111 1111 0 0000 0100 0* 0010 0010 0 0110 1110 1 1011 0011 *

Division Algorithm If m & n are integers, m ≠ 0, n can be written as n = m*q + r, where 0 <= r < |m|. q & r are the quotient & remainder of n/m Examples: Divide 82 by 7 ~~ 82 = 11 * 7 + 5 Divide 26 by 7 ~~ 26 = 3 * 7 + 5 * 82 & 26 are Congruent Modulo 7 because they have the same remainder

Congruence ~ is a Relation Define the congruence relation as follows: Cm = {(a,b)| a & b are integers & have the same remainder when divided by m} Example: C7 = {(82,26), (5,12), (19,5) (4,11), (2,23) (49,0)…}

Properties of Congruence Reflexive? Symmetric? Transitive? Notation: 82 ≡ 26 mod 7 49 ≡ 0 mod 7 Are there equivalence classes?

Equivalence Classes for Congruence Given Cm, how many equivalence classes? Example: Consider C7 [0] = { [1] = { [2] = { Any more???

Equivalence Classes for Congruence Given Cm, how many equivalence classes? Example: C7 [0] = {0, 7, 14, 21,…} [4] = [1] = {1, 8, 15, 22,…} [5] = [2] = {2, 9, 16, 23,…} [6] = [3] = {3, 10, 17, 24…} [7] =

Examples of Congruence Clock Time Hours: (mod 12) + 1 mod 24 Clock Time Minutes mod 60

Examples of Congruence Calendars ~ Days of the Week If Sunday = 0, Monday = 1, etc….. Mod 7 will give us days of week IF used correctly

Note on Modulus on Negatives If m & n are integers, m ≠ 0, n can be written as n = m*q + r, where 0 <= r < |m|. (Note r MUST be positive) q & r are the quotient & remainder of n/m Examples: -34/7 – Which is correct?? -34 = -4 * 7 – 6 r = -6 -34 = -5 * 7 + 1 r = 1

Euclidean Algorithm *Greatest Common Divisor (GCD) Given 2 integers A & B, the largest integer that divides both is called the Greatest Common divisor (GCD) Examples: GCD (12,8) GCD (200, 1000) GCD (7, 122)

Theorem 3.3 (p.107) Let a, b, c, & q be integers with b > 0. If a = qb + c, then gcd(a,b) = gcd(b,c) Example: find gcd(105, 231) gcd(231, 105) 231 = 2 * 105 + 21 gcd(105, 21) 105 = 5 * 21 + 0 gcd(21, 0) = 21

The Euclidean Algorithm (p.108) Calculates gcd(m,n) r-1 = m, r0 = n, I = 0 While rI≠0 //(division algorithm) I = I + 1 determine qI, rI for rI-2/rI-1 Print rI-1

Complexity of Euclidean Algorithm Lame – 1844: no more than 5 * number of digits in smaller of 2 numbers Theorem 3.4 (p. 109) If the Euclidean Alg. is applied to m & n with m ≥ n > 0, the number of divisions needed is less than or equal to 2 log2 (n+1). Thus, O(log2 n).