Professional Documents
Culture Documents
Chapter 1 Introduction To Crypto
Chapter 1 Introduction To Crypto
4
Financial Cryptography
• The term Financial Cryptography was invented by Robert Hettinga which includes
cryptographic algorithms necessary for the secure financial transaction.
• Therefore, it has become an essential component for electronic commerce which refers
to commercial transactions conducted online.
• For example, in an online transaction, the user’s credit card information is transmitted over the internet.
• There is a possibility for a hacker to steal this personal information.
• Therefore, when transmitting confidential information, it is important to use a data protection method.
• One such method is cryptography. It hides the real information when they are
transmitted over the network.
Cryptography
Basic idea of secure communication
• Cryptography is the practice and study of
hiding information. It is the Art or Science of
converting a plain intelligible data into an
unintelligible data and again retransforming
that message into its original form.
• In a broader sense
• Mathematical techniques related to
information security
• About secure communication in the
presence of adversaries
• Authentication: Both the sender and receiver need to confirm the identity of other party involved in the
communication
• Data integrity: The content of their communication is not altered, either maliciously or by accident, in
transmission.
• Access control: An entity cannot access any entity that it is not authorized to.
Cryptographic
Attacks
chosen text
Threatens the
security goals-
Non
confidentiality,
Cryptanalytic
integrity, & Security Attacks
authentication
Set of Integers
The set of integers, represented as “Z“ contains all integral numbers (with no
fraction) from negative infinity to positive infinity.
Binary Operations
• A binary operation takes two inputs and creates one output.
• In cryptography, we are interested in three binary operations i.e.,
addition, subtraction, and multiplication.
Ex:
• 5+(-9)=-4, Note: division doesn’t fit here
• (-5)× 9=-45 bcz it produces 2 output
Example
When we divide two integers we will have an equation that looks like the following:
= q remainder r or a= q × n +r
where a is the dividend, n is the divisor, q is the quotient, and r is the remainder.
Assume that a = 255 and n = 11. We can find q = 23 and R = 2 using the division algorithm.
Restriction on integer division relation
• While using computer or calculator when a is
negative then r and q are also negative.
(so how to impose the restrictions)
The solution is, we decrement the value of q by 1
and we add the value of n to r to make it positive.
n>0 0
-255=(-23 ×11) +(-2)
-255=(-24 × 11) +9
Divisibility
• If a is not zero and we let r = 0 in the division relation , we get a = q × n
• When we are not interested in the value of q, we can write-
If the remainder is zero, a | n
If the remainder is not zero, a n
Example:
• The integer 4 divides the integer 32 because 32 = 8 × 4.
We show this as 4 | 32
• The number 8 does not divide the number 42 because 42 = 5 × 8 + 2. There is a remainder, the
number 2, in the equation.
• We show this as 8 42
Properties of divisibility
Greatest Common Divisor
• The greatest common divisor of two positive integers is the largest
integer that can divide both integers.
Euclidean Algorithm
• To be faster while finding the GCD of 2 large numbers.
• Facts:
Fact 1: gcd (a, 0) = a
Fact 2: gcd (a, b) = gcd (b, r), where r is the remainder of dividing a by b
The Fact 2 allows us to change the value of a, b until b becomes 0.
• Example:
gcd (36,10)= gcd (10,6)= gcd (6,4)= gcd(4,2)= gcd(2,0)=2
Euclidean Algorithm
Note: When gcd (a, b) = 1, we say that a and b are relatively prime
Find the greatest common divisor of 25 and 60.
• The extended Euclidean algorithm can calculate the gcd (a, b) and at
the same time calculate the value of s and t.
Extended Euclidean algorithm, part a
Extended Euclidean algorithm, part b
Given a = 161 and b = 28, find gcd (a, b) and the values of s and t.
Some Zn sets
Congruence
• In cryptography we use the concept of congruence instead of
equality.
• For example, 2 mod 10 =2, 12 mod 10=2, 22 mod 2=2.
• Therefore, 2,12, and 22 are called congruent mod 10.
• To show that two integers are congruent, we use the congruence
operator ( ≡ ).
Discussion
• In Zn, The additive inverse of a can be calculated as b=n-a. For example, the additive inverse of 4
in Z10 is 10-4=6
• Find all additive inverse pairs in Z10.
• The six pairs of additive inverses are (0, 0), (1, 9), (2, 8), (3, 7), (4,6), and (5, 5). In this list, 0 is the
additive inverse of itself, so is 5.
Multiplicative inverse
• In Zn , two numbers a and b are the multiplicative inverse of each
other if