SlideShare a Scribd company logo
1Solutions www.domain.com
Workshop #1
Inroduction to RSA
Cryptography
Cb_salah_salah@esi.dz
2Solutions www.domain.com
Introduction
3Solutions www.domain.comCb_salah_salah@esi.dz
Quantum
cryptography
03
02
01
Mathematical
cryptography
Mechanical
Cryptography
Cryptography Evolution
4Solutions www.domain.comCb_salah_salah@esi.dz
Terminology
Ciphertext
•Encryption
•Stéganography
Decryption
•Encode, decode
•Plaintext
•Key
•Cryptography
•Cryptanalysis
•Cryptology
5Solutions www.domain.com
Traditional Cryptography
6Solutions www.domain.comCb_salah_salah@esi.dz
History of cryptography
Transposition Cipher
It is another type of cipher where the
order of the alphabets in the plaintext
is rearranged to create the ciphertext.
The actual plaintext alphabets are not
replaced.
Playfair Cipher
In this scheme, pairs of letters are encrypted,
instead of single letters as in the case of simple
substitution cipher
The Vigenere code
It uses a text string (say, a word) as a key, which
is then used for doing a number of shifts on the
plaintext
.
The code of CAESAR
It is a mono-alphabetic cipher
wherein each letter of the plaintext is
substituted by another letter to form
the ciphertex
7Solutions www.domain.com
Exemple:Caesar1
DLWFE TNT DYLVP UP GZFD OTD WP XZE AZFC
ALDDPC WP RCZD NSTPY OF QLXPFI NPDLC
DTTZTSLNYPLA
offset is 15
SALUT ICI SNAKE JE VOUS DIS LE MOT POUR
PASSER LE GROS CHIEN DU FAMEUX CESAR
SIIOIHACNEAP
8Solutions www.domain.com
Exemple: Vigenere2
The sender and the receiver decide on a key. Say ‘point’ is the key. Numeric representation of this key is ‘16
15 9 14 20’.
The sender wants to encrypt the message, say ‘attack from south east’. He will arrange plaintext and numeric
key as follows:
a t t a c k f r o m s o u t h e a s t
16 15 9 14 20 16 15 9 14 20 16 15 9 14 20 16 15 9 14
The Cipher text will be as follows
Q I C O W A U A C G I D D H B U P B H
9Solutions www.domain.com
Exemple: Playfair Cipher3
T U O R I
A L S B C
D E F G H
K M N P Q
V W X Y Z
HI DE MO NE YZ
T U O R I
A L S B C
D E F G H
K M N P Q
V W X Y Z
T U O R I
A L S B C
D E F G H
K M N P Q
V W X Y Z
T U O R I
A L S B C
D E F G H
K M N P Q
V W X Y Z
The sender and the receiver deicide on a particular key, say ‘tuorials’
Let us say we want to encrypt the message “hide money”. It will be written as:
Using these rules, the result of the encryption of ‘hide money’ with the key of ‘tuorials’
would be:
QC EF NU MF ZV
10Solutions www.domain.com
Exemple: Transposition Cipher3
The plaintext is “golden statue is in eleventh cave” and the secret random key chosen is “five”. We arrange this
text horizontally in table with number of column equal to key value. The resulting text is shown below.
G O L D E
N S T A T
U E I S I
N E L E V
E N T H C
A V E
The ciphertext is obtained by reading column vertically downward from first to last column. The ciphertext is
‘gnuneaoseenvltiltedasehetivc’.
11Solutions www.domain.com
Modern cryptography:Case od study RSA
12Solutions www.domain.com
• Basicly used in e-commerce but it is
also used in bleu cardes and some
softwares like opnessh(secure
communication using ssh protocol)
• Was first created by Ron Rivest,
Adi Shamir et LenAdleman, en 1977 )
Cb_salah_salah@esi.dz
Asymmetric cryptography : RSA
13Solutions www.domain.comCb_salah_salah@esi.dz
RSA: How Does it Work?
World of cryptography
 A single key used for
encryption and
decryption
 Called private key
 Ex: Ceasar
 Two keys are used
 One for encryption, known by
every one, called public key.
 The other one for decryption,
known only by the receiver,
called private key .
 Ex :RSA
Symmetric
cryptography
Asymmetric
cryptography
14Solutions www.domain.comCb_salah_salah@esi.dz
RSA: How Does it Work?
15Solutions www.domain.comCb_salah_salah@esi.dz
RSA: How to create public and private key?
Public Key: (N,C)
• P ,Q: two prime number
• N=P×Q
• M=(P−1)×(Q−1
• C :coprime number with M
Private Key: (N,U)
• Need to calcualte U
• Theory of Etienne Bézout: to prove
that two numbers a and b are
coprime if only existed two
number u and v that for
a×u+b×v=1 ( u and v are integers)
• It existed u v for that for
C×u+M×v=1
16Solutions www.domain.comCb_salah_salah@esi.dz
RSA: How to find U?
17Solutions www.domain.comCb_salah_salah@esi.dz
RSA: Secure keys
N is the product
of P & Q and it is
public
We construct our
keys only by P Q
Decomposition of
any number into
prime factors is
unique
So it is not thar
secure!!!
18Solutions www.domain.comCb_salah_salah@esi.dz
RSA: Real keys exemple
N = 31074182404900437213507500358885679300373460228427275457201619488232064405
18081504556346829671723286782437916272838033415471073108501919548529007337
724822783525742386454014691736602477652346609
P = 16347336458092538484431338838650908598417836700330
92312181110852389333100104508151212118167511579
Q = 1900871281664822113126851573935413975471896789968
515493666638539088027103802104498957191261465571
80 processors Opteron 2.2GHz for 5 months to find P and Q
19Solutions www.domain.comCb_salah_salah@esi.dz
RSA: Encryption process?
Alice wants to send to Bob : « Bonjour ! »
Step2
B⇔66⇒66^7
o⇔111⇒111^7
n⇔110⇒110^7
j⇔106⇒106^7
o⇔111⇒111^7
u⇔117⇒117^7
r⇔114⇒114^7
(espace)⇔32⇒32^7
!⇔33⇒33^7
Step1
B⇔66
o⇔111
n⇔110
j⇔106
o⇔111
u⇔117
r⇔114
(espace)⇔32
!⇔33
Step3
(66^7)mod(5141)=386
(111^7)mod(5141)=1858
(110^7)mod(5141)=2127
(106^7)mod(5141)=2809
(111^7)mod(5141)=1858
(117^7)mod(5141)=1774
(114^7)mod(5141)=737
(32^7)mod(5141)=3675
(33^7)mod(5141)=244
"Bonjour !" becomes "386 1858 2127 2809 1858 1774 737 3675 244"
20Solutions www.domain.comCb_salah_salah@esi.dz
RSA: Decryption process?
Bob receives from Alice this message : « 386 737 970 204 1858 »
Step2
(386^4279)mod(5141)=66
(737^4279)mod(5141)=114
(970^4279)mod(5141)=97
(204^4279)mod(5141)=118
(1858^4279)mod(5141)=111
Step1
386⇒386^4279
737⇒737^4279
970⇒970^4279
204⇒204^4279
1858⇒1858^4279
Step3
66⇔B
114⇔r
97⇔a
118⇔v
111⇔o
21Solutions www.domain.com
THANK YOU FOR YOUR
ATTENTION!

More Related Content

PPTX
Cryptography
PPTX
Cryptography.ppt
PPTX
caeser chiper
PDF
Classic Cryptography
PDF
Format String Exploitation
PPTX
BSides algiers - Malware History - Sofiane Talmat
PPTX
Cryptography
ODP
BSides Algiers - Nmap Scripting Engine - Hani Benhabiles
Cryptography
Cryptography.ppt
caeser chiper
Classic Cryptography
Format String Exploitation
BSides algiers - Malware History - Sofiane Talmat
Cryptography
BSides Algiers - Nmap Scripting Engine - Hani Benhabiles

Viewers also liked (20)

PDF
Code Week 2014 - atelier d'initiation à la programmation avec python
PDF
Programmation objet
PDF
Biopython
PDF
PyConFR - testons en python
PDF
Présentation de l'appication Nao Beer Buddy
PDF
Grile évaluation rappel de cours
PDF
PhD Proposal
PDF
Algorithmique_et_programmation_part2
KEY
Python et les bases de données non sql
ODP
Base NoSql et Python
PDF
Python in Computer Vision
PPTX
Cours fabrication mécanique5
PPTX
cryptography
PDF
Cours fabrication mécanique1
PPTX
Python et son intégration avec Odoo
PPTX
Cryptography.ppt
PPTX
Cryptography
PDF
Chap XIII : calcul scientifique avec python
PPTX
Cissp d5-cryptography v2012-mini coursev2
PDF
Notion de fonction en Python
Code Week 2014 - atelier d'initiation à la programmation avec python
Programmation objet
Biopython
PyConFR - testons en python
Présentation de l'appication Nao Beer Buddy
Grile évaluation rappel de cours
PhD Proposal
Algorithmique_et_programmation_part2
Python et les bases de données non sql
Base NoSql et Python
Python in Computer Vision
Cours fabrication mécanique5
cryptography
Cours fabrication mécanique1
Python et son intégration avec Odoo
Cryptography.ppt
Cryptography
Chap XIII : calcul scientifique avec python
Cissp d5-cryptography v2012-mini coursev2
Notion de fonction en Python
Ad

Similar to Cryptography basics (20)

PPTX
Information system security Unit 2.pptx
PPTX
IANSunit 1_cryptography_2.pptxv xvxvxvxv
PPT
Crypt
DOCX
Introduction to Cryptography Week4 Part1-ISrevisionSu.docx
PPTX
Cryptography and applications
PPTX
Information security (Symmetric encryption, cryptography, crypto-analysis)
PPT
Cryptography and E-Commerce
PDF
Computer Security Chapter III.pdf
PDF
Cryptography Intro - NCL
PDF
1network security encryption_methods-1
PPTX
Introduction to cryptography
PPTX
Symmetric and asymmetric key cryptography
PPT
Cryptography - An Overview
PPTX
3 pkc+rsa
PPTX
Cryptography
PPT
Rsa diffi-network security-itt
PDF
international security system data threats
PDF
PRINCIPLES OF INFORMATION SYSTEM SECURITY
PPT
Cryptography
PPTX
cryptographyandnetworksecu-module-1.pptx
Information system security Unit 2.pptx
IANSunit 1_cryptography_2.pptxv xvxvxvxv
Crypt
Introduction to Cryptography Week4 Part1-ISrevisionSu.docx
Cryptography and applications
Information security (Symmetric encryption, cryptography, crypto-analysis)
Cryptography and E-Commerce
Computer Security Chapter III.pdf
Cryptography Intro - NCL
1network security encryption_methods-1
Introduction to cryptography
Symmetric and asymmetric key cryptography
Cryptography - An Overview
3 pkc+rsa
Cryptography
Rsa diffi-network security-itt
international security system data threats
PRINCIPLES OF INFORMATION SYSTEM SECURITY
Cryptography
cryptographyandnetworksecu-module-1.pptx
Ad

More from Shellmates (13)

PPTX
HTML basics
PDF
Malware Analysis par Mohamed Ali FATHI - BSides Algiers 2k15
PDF
Atelier Python 2eme partie par Achraf Kacimi El Hassani
PPTX
JavaScript 1.0 by Zakaria Smahi
PDF
Introduction à Python - Achraf Kacimi El Hassani
PPTX
BSides Algiers - Stuxnet - Sofiane Talmat
PDF
BSides Algiers - Linux Kernel and Recent Security Protections - Djallal Harouni
PPTX
BSides Algiers - Layer7 DoS Attacks - Oussama Elhamer
PPTX
BSides Algiers - Reversing Win32 applications - Yacine Hebbal
PDF
BSides Algiers - Normes ISO 2700x - Badis Remli
PPTX
BSides Algiers - Metasploit framework - Oussama Elhamer
PDF
BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar
PDF
BSides Algiers - Certification Electronique - Lilia Ounini
HTML basics
Malware Analysis par Mohamed Ali FATHI - BSides Algiers 2k15
Atelier Python 2eme partie par Achraf Kacimi El Hassani
JavaScript 1.0 by Zakaria Smahi
Introduction à Python - Achraf Kacimi El Hassani
BSides Algiers - Stuxnet - Sofiane Talmat
BSides Algiers - Linux Kernel and Recent Security Protections - Djallal Harouni
BSides Algiers - Layer7 DoS Attacks - Oussama Elhamer
BSides Algiers - Reversing Win32 applications - Yacine Hebbal
BSides Algiers - Normes ISO 2700x - Badis Remli
BSides Algiers - Metasploit framework - Oussama Elhamer
BSides Algiers - PHP Static Code Analysis - Abdeldjalil Belakhdar
BSides Algiers - Certification Electronique - Lilia Ounini

Recently uploaded (20)

PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
RMMM.pdf make it easy to upload and study
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Sports Quiz easy sports quiz sports quiz
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Insiders guide to clinical Medicine.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
master seminar digital applications in india
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Institutional Correction lecture only . . .
O7-L3 Supply Chain Operations - ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
RMMM.pdf make it easy to upload and study
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPH.pptx obstetrics and gynecology in nursing
Sports Quiz easy sports quiz sports quiz
STATICS OF THE RIGID BODIES Hibbelers.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Insiders guide to clinical Medicine.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
TR - Agricultural Crops Production NC III.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
master seminar digital applications in india
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Institutional Correction lecture only . . .

Cryptography basics