Cryptography & Data Security - Comp 547. Assignment 5. Maxime CHAMBREUIL McGill ID:

Similar documents
Cryptosystem. Traditional Cryptosystems: The two parties agree on a secret (one to one) function f. To send a message M, thesendersendsthemessage

Pseudo-random Number Generation. Qiuliang Tang

Introduction to Cybersecurity Cryptography (Part 5)

ECE596C: Handout #11

Cryptography IV: Asymmetric Ciphers

CIS 551 / TCOM 401 Computer and Network Security

Introduction to Public-Key Cryptosystems:

Lecture Notes, Week 6

The RSA cryptosystem and primality tests

Lecture 1: Introduction to Public key cryptography

Number Theory and Algebra: A Brief Introduction

Number theory (Chapter 4)

Math/Mthe 418/818. Review Questions

Chapter 8 Public-key Cryptography and Digital Signatures

basics of security/cryptography

Security Issues in Cloud Computing Modern Cryptography II Asymmetric Cryptography

CODING AND CRYPTOLOGY III CRYPTOLOGY EXERCISES. The questions with a * are extension questions, and will not be included in the assignment.

CPSC 467b: Cryptography and Computer Security

10 Public Key Cryptography : RSA

Math.3336: Discrete Mathematics. Mathematical Induction

RSA ENCRYPTION USING THREE MERSENNE PRIMES

Implementation Tutorial on RSA

Attempt QUESTIONS 1 and 2, and THREE other questions. penalised if you attempt additional questions.

Network Security Technology Spring, 2018 Tutorial 3, Week 4 (March 23) Due Date: March 30

Public-Key Cryptosystems CHAPTER 4

Congruence of Integers

Name: Mathematics 1C03

Cryptography. P. Danziger. Transmit...Bob...

during transmission safeguard information Cryptography: used to CRYPTOGRAPHY BACKGROUND OF THE MATHEMATICAL

CPSC 467b: Cryptography and Computer Security

Lemma 1.2. (1) If p is prime, then ϕ(p) = p 1. (2) If p q are two primes, then ϕ(pq) = (p 1)(q 1).

Cosc 412: Cryptography and complexity Lecture 7 (22/8/2018) Knapsacks and attacks

Ma/CS 6a Class 3: The RSA Algorithm

CPSC 467b: Cryptography and Computer Security

Cryptography and Security Protocols. Previously on CSP. Today. El Gamal (and DSS) signature scheme. Paulo Mateus MMA MEIC

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used.

Cryptography and Security Midterm Exam

CPE 776:DATA SECURITY & CRYPTOGRAPHY. Some Number Theory and Classical Crypto Systems

University of Tokyo: Advanced Algorithms Summer Lecture 6 27 May. Let s keep in mind definitions from the previous lecture:

Senior Math Circles Cryptography and Number Theory Week 2

COMP4109 : Applied Cryptography

Overview. Background / Context. CSC 580 Cryptography and Computer Security. March 21, 2017

Introduction to Modern Cryptography. Lecture RSA Public Key CryptoSystem 2. One way Trapdoor Functions

Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013

Public Key Algorithms

CPSC 467b: Cryptography and Computer Security

Cryptography CS 555. Topic 24: Finding Prime Numbers, RSA

HOMEWORK 11 MATH 4753

Some Comments on the Security of RSA. Debdeep Mukhopadhyay

dit-upm RSA Cybersecurity Cryptography

Elliptic Curve Cryptography

Introduction to Elliptic Curve Cryptography

5199/IOC5063 Theory of Cryptology, 2014 Fall

Pseudorandom Generators

KTH, NADA , and D1449 Kryptografins grunder. Lecture 6: RSA. Johan Håstad, transcribed by Martin Lindkvist

Mathematical Foundations of Public-Key Cryptography

Addition. Ch1 - Algorithms with numbers. Multiplication. al-khwārizmī. al-khwārizmī. Division 53+35=88. Cost? (n number of bits) 13x11=143. Cost?

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

2. Cryptography 2.5. ElGamal cryptosystems and Discrete logarithms

An Introduction to Probabilistic Encryption

Discrete Logarithm Problem

Definition: For a positive integer n, if 0<a<n and gcd(a,n)=1, a is relatively prime to n. Ahmet Burak Can Hacettepe University

Cryptography: Joining the RSA Cryptosystem

Introduction to Cryptography. Lecture 8

RABIN PUBLIC-KEY CRYPTOSYSTEM IN RINGS OF POLYNOMIALS OVER FINITE FIELDS

Public Key Cryptography

Theory of Computation Chapter 12: Cryptography

Semantic Security of RSA. Semantic Security

DM49-2. Obligatoriske Opgave

Public Key Cryptography

Mathematics of Cryptography

Computer Science COMP-547A Cryptography and Data Security

Applied Cryptography and Computer Security CSE 664 Spring 2018

THE RSA ENCRYPTION SCHEME

ICS141: Discrete Mathematics for Computer Science I

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculty of Mathematics and Computer Science Exam Cryptology, Tuesday 30 October 2018

Lecture Notes. Advanced Discrete Structures COT S

CPSC 467: Cryptography and Computer Security

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

Elementary Number Theory MARUCO. Summer, 2018

Security II: Cryptography exercises

Cryptography Assignment 5

Mathematics of Public Key Cryptography

Ti Secured communications

Technische Universität München (I7) Winter 2013/14 Dr. M. Luttenberger / M. Schlund SOLUTION. Cryptography Endterm

COMP424 Computer Security

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

Foundations of Network and Computer Security

Introduction to Modern Cryptography. Benny Chor

On the security of Jhanwar-Barua Identity-Based Encryption Scheme

8 Elliptic Curve Cryptography

Written examination. Tuesday, August 18, 2015, 08:30 a.m.

RSA. Ramki Thurimella

Progress on probabilistic encryption schemes

Question 2.1. Show that. is non-negligible. 2. Since. is non-negligible so is μ n +

CPSC 467: Cryptography and Computer Security

CS March 17, 2009

Computer Science A Cryptography and Data Security. Claude Crépeau

Recent Advances in Identity-based Encryption Pairing-free Constructions

Number Theory A focused introduction

Transcription:

Assignment 5 Maxime CHAMBREUIL McGill ID: 260067572 maxime.chambreuil@mail.mcgill.ca Contents 1 Exercises from Stinson s book 1 1.1 Exercise 5.11 p 220............................................ 1 1.1.1 Inverse operations........................................ 1 1.1.2 Computation of a........................................ 2 1.1.3 In Z n............................................... 2 1.1.4 Maple T M............................................. 3 1.2 Exercise 4.5 p 151............................................ 3 1.2.1 Polynom of degree 2...................................... 3 1.2.2 Polynom of degree d...................................... 4 1.3 Exercise 7.6 p 312............................................ 4 1.3.1 Verification............................................ 4 1.3.2 Computational advantage................................... 4 1.3.3 Security comparison...................................... 4 2 Blum-Goldwasser 5 2.1 Decryption / Verification........................................ 5 2.2 Cyphertext attack............................................ 5 3 Jacobi symbol and least significant bit 5 3.1 Conditions on p and q.......................................... 5 3.2 Entropy.................................................. 5 3.3 Maple T M................................................. 5 4 Goldwasser-Micali 5 1 Exercises from Stinson s book 1.1 Exercise 5.11 p 220 1.1.1 Inverse operations To prove that encryption and decryption are still inverse operations with: λn) = p 1)q 1) gcdp 1, q 1) = φn) gcdp 1, q 1) we will compute x b) a : x b) a x tλn)+1 mod n x tλn) x mod n December 2, 2003 http://www.maxime-chambreuil.fr.st 1

x b ) a x λn)) t x mod n x b ) a 1) t x mod n x mod n So we have to prove that x λn) = 1. We know that p and q are primes, so thanks to Fermat, we have: x p 1 1 mod p x q 1 1 mod q By definition of φn), gcd p - 1, q - 1 ) appears twice in his factorisation : in the one of p-1 and the one of q-1. So if we consider the factorisation of λn), we are going to find the complete one of p and the one of q-1 without the gcd. So we can deduce that: x λn) x p 1) q 1 gcdp 1,q 1) 1 mod p With the same reasoning, we deduce: x λn) 1 mod q p and q are relatively primes so we can use the Chinese Reminder Theorem to set:!x, x λn) 1 mod pq 1 mod n So we have proved that x λn) 1 mod n and that enables us to finish the original demonstration. To conclude, we have found the original message so encryption and decryption are still inverse operations. 1.1.2 Computation of a Given p = 37 and q = 79, we can find φpq) = 2808 and with b = 7, we have: 7 a 1 mod 2808 7a = 2808 t + 1 With t = 6, we obtain a = 2407 using the original RSA. Using the modified cryptosystem, we have λn) = 468, so: With t = 1, we obtain a = 67. 7 a = 468 t + 1 1.1.3 In Z n Let me remind you that Z n = {x/gcdx, n) = 1} and Z n = Z n {x/x = kp} So we need to prove that the encryption/decryption is still valid for multiples of p it would be the same for q): dekp)) = d [ kp) b mod n ] = [ kp) b mod n ] a mod n = kp) ab mod n = kp mod n We can obtain the last line because of the first question. Therefore, the encyption/decryption is still valid in Z n. December 2, 2003 http://www.maxime-chambreuil.fr.st 2

1.1.4 Maple T M This is my first algorithm when I read the questions, but it doesn t return any p and q : find := proc): roll := rand10ˆ99..10ˆ100): p := roll): q := roll): while gcdp-1,q-1)< 10ˆ74 ) do: p := roll): q := roll): end do: return p,q: end proc: So I took the problem upside down : find := proc): roll := rand10ˆ74..10ˆ75): gcd := roll): p := 3*10ˆ25*gcd: q := 4*10ˆ25*gcd: while not isprimep+1)) or not isprimeq+1)) ) do: gcd := roll): p := 3*10ˆ25*gcd: q := 4*10ˆ25*gcd: end do: return p+1,q+1: end proc: and I finally find: p = 588660476800131775105978461149584613361071240656615403980188348579939200766 0000000000000000000000001 q = 784880635733509033474637948199446151148094987542153871973584464773252267688 0000000000000000000000001 1.2 Exercise 4.5 p 151 1.2.1 Polynom of degree 2 So To solve the SecondPreimage problem, assume we have: { x y = x 2 + ax + b mod 2 m x y = x 2 + ax + b mod 2 m y = x 2 + ax + b = x 2 + ax + b x 2 x 2 + ax ax = 0 x x )x + x + a) = 0 x = x or x = x a We can find a second preimage by computing x a, which is really easy. December 2, 2003 http://www.maxime-chambreuil.fr.st 3

1.2.2 Polynom of degree d I first try to solve the SecondPreimage problem in the same way as before, but I finally obtained: i x i x i j 0 mod 2 m j=0 which doesn t help us to find a second preimage to x. I was told that the problem is easy to solve by using the fact that n > m, but I was not able to figure out the problem with this hint. 1.3 Exercise 7.6 p 312 1.3.1 Verification To verify this new signature scheme, we have to compute β δ γ γ : 1.3.2 Computational advantage β δ γ γ = α a ) x kγ)a 1 γ γ mod p = α) x kγ) γ γ mod p = α) x kγ) α k) γ mod p = α x mod p In the original El Gamal Signature Scheme, we have to compute the multiplicative inverse of k ofr each message. In this modified scheme, we can invert a once for all message. So it is computaionally faster. 1.3.3 Security comparison We have seen in class that behind the original El Gamal Signature Scheme, there is always the Discrete Logarithm Problem DLP). Let s now see what there is behind the modified scheme : Given x, set a γ and then try to find δ with: which is equivalent to the DLP. Given x, set a δ and then try to find γ with: which seems to be easier than the DLP. β δ = α x γ γ mod p γ γ = α x β δ mod p Given x, try to simultaneously find δ and γ with: which is equivalent to the DLP. β δ γ γ = α x mod p December 2, 2003 http://www.maxime-chambreuil.fr.st 4

So we can conclude that the modified scheme is less secure than the original El Gamal. 2 Blum-Goldwasser 2.1 Decryption / Verification Concerning the decryption, the modification does not affect encryption so the decryption is the same as in the original cryptosystem. The verification consists in reproducing the same operations described in the exercise and compare w obtained with the one transmitted. 2.2 Cyphertext attack In the cyphertext attack, Oscar has an temporary access to the decryption machinery and he can compute dec y ) = x. If this modified cryptosystem fails under this attack, it means that Oscar can find the private key p and q. But he can also break the system with the least significant bit of x 2, but I was not able to deal with that information. 3 Jacobi symbol and least significant bit 3.1 Conditions on p and q So We know that: ) n 1 = n ) ) n 1 n 1 = +1 p q n 1) QR p n 1) QR q 3.2 Entropy n 1) QNR p n 1) QNR q To clarify the formulae, we have to prove that the proportion of odd and even number doesn t change because of the Jacobi Symbol of M e. We know that if ) n 1 n = +1, the number of odd and even number are equally distributed in the set of x such that x n) = +1. So let s consider a bijection, which associates an odd to an even number and an even to an odd. Therefore we keep the same proportion of even and odd number. If both number in each pair has the same Jacobi Symbol, we can conclude that the Jacobi Symbol of M e has no incident on the proportion. 3.3 Maple T M Finding a counter example should be enough to prove that it is false with the Jacobi Symbol -1. 4 Goldwasser-Micali December 2, 2003 http://www.maxime-chambreuil.fr.st 5