C2 Cryptography I
C2 Cryptography I
Cryptography
Software controls
Hardware controls
Policies and procedures
Physical controls
What is Crypto?
Y=EZ(X) Y X=DZ’(Y)
Sender Alice Receiver Bob
Why insecure
just break it under a certain reasonable attack model
(show failures to assure security goals)
Why secure:
Evaluate/prove that under the considered attack model,
security goals are assured
Provable security: Formally show that (with mathematical
techniques) the system is as secure as a well-known secure
one (usually simpler).
Breaking ciphers …
Ciphertext-only attack:
The cryptanalyst knows only the ciphertext.
Goal: to find the plaintext and the key.
NOTE: such vulnerable is seen completely insecure
Known-plaintext attack:
The cryptanalyst knows one or several pairs of
ciphertext and the corresponding plaintext.
Goal: to find the key used to encrypt these messages
or a way to decrypt any new messages that use the same key
(although may not know the key).
Breaking ciphers …
Chosen-plaintext attack
The cryptanalyst can choose a number of messages and
obtain the ciphertexts for them
Goal: deduce the key used in the other encrypted
messages or decrypt any new messages (using that key).
Chosen-ciphertext attack
Similar to above, but the cryptanalyst can choose a
number of ciphertexts and obtain the plaintexts.
if your crypto system can defend this hardest
Both can be adaptive anomy, your crypto system become most
security
The choice of ciphertext may depend on the plaintext
received from previous requests.
Models for Evaluating Security
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
P = CRYPTOGRAPHYISFUN
K = 11
C = NCJAVZRCLASJTDQFY
Shift Cipher: Cryptanalysis
Multiplicative Cipher
𝑌 = 𝑋 × 𝑍 𝑚𝑜𝑑 26 OR 𝑌 ≡26 𝑋 × 𝑍
How many possible keys?
Affine Cipher
𝑌 ≡26 𝑋 × 𝑍 + 𝐾
How many possible keys?
Can you think of other ciphers?
Example:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
π=BADCZHWYGOQXSVTRNMSKJIPFEU
BECAUSE → AZDBJSZ
Looks secure, early days
J,V,B,H,D,I,L,C {t,a,o,i,n,s,h,r}
t,a h
JZB = te ? { teo, tei, ten, ter, tes } n B
s => I
- n h - - - - - - t - - - - - - - - - - - a - - - e
key
A B C D E F G H IIntroJto Cryptography
K L M- Van N K.O P Q R S T U V W
Nguyen
X Y Z
Slide #2- 28
YKHLnA the Sast ten TeaHs the aHt DR seXKHLnA aSS RDHEs DR
Yata LnXSKYLnA YLALtaS sFeeXh has LEFHDNeY EanLRDSY the
FHLEaHT HeasDn RDH thLs has Ween the aYNent DR
ELXHDeSeXtHDnLXs the XDEFSeQLtT DR the RKnXtLDns that Xan
nDP We FeHRDHEeY WT the EaXhLne has HLsen YHaEatLXaSST as
a HXXsKSt DR thLs HeXent YeNeXDFEent Ln teXhnDSDAT EanT
DR the XLFheH sTsteEsthat PeHe DnXe XDnsLYXHeYseKHe aHenDP
WHeaMaWSe
- n h - - - - - s t - - - - - - - - - - - a - - - e
key
A B C D E F G H IIntroJto Cryptography
K L M- Van N K.O P Q R S T U V W
Nguyen
X Y Z
Slide #2- 29
YKHinA the Sast ten TeaHs the aHt DR seXKHinA aSS RDHEs DR
Yata inXSKYinA YiAitaS sFeeXh has iEFHDNeY EaniRDSY the
FHiEaHT HeasDn RDH this has Ween the aYNent DR
EiXHDeSeXtHDniXs the XDEFSeQitT DR the RKnXtiDns that Xan nDP
We FeHRDHEeY WT the EaXhine has Hisen YHaEatiXaSST as a
HXXsKSt DR this HeXent YeNeXDFEent in teXhnDSDAT EanT DR the
XiFheH sTsteEsthat PeHe DnXe XDnsiYXHeYseKHe aHenDP
WHeaMaWSe
- n h - - - - - s t - i - - - - - - - - - a - - - e
key
A B C D E F G H IIntroJto Cryptography
K L M- Van N K.O P Q R S T U V W
Nguyen
X Y Z
Slide #2- 30
YKrinA the Sast ten Tears the art oR seXKrinA aSS RorEs oR Yata
inXSKYinA YiAitaS sFeeXh has iEFroNeY EaniRoSY the FriEarT
reason Ror this has Ween the aYNent oR EiXroeSeXtroniXs
the XoEFSeQitT oR the RKnXtions that Xan noP We FerRorEeY WT
the EaXhine has risen YraEatiXaSST as a rXXsKSt oR this reXent
YeNeXoFEent in teXhnoSoAT EanT oR the XiFher sTsteEsthat Pere
onXe XonsiYXreYseKre arenoP WreaMaWSe
reason Ror this has Ween reason for this has been
this reXent this recent
- n h o - - - r s t - i - - - - - - - - - a - - - e
key
A B C D E F G H IIntroJto Cryptography
K L M- Van N K.O P Q R S T U V W
Nguyen
X Y Z
Slide #2- 31
YKrinA the Sast ten Tears the art of secKrinA aSS forEs of Yata
incSKYinA YiAitaS sFeech has iEFroNeY EanifoSY the FriEarT reason
for this has been the aYNent of EicroeSectronics the coEFSeQitT of
the fKnctions that can noP be FerforEeY bT the Eachine has risen
YraEaticaSST as a rccsKSt of this recent YeNecoFEent in technoSoAT
EanT of the ciFher sTsteEsthat Pere once consiYcreYseKre
arenoP breaMabSe
u => K, p => F
- n h o - - - r s t - i - - - - - f - - - a b c - e
key
A B C D E F G H IIntroJto Cryptography
K L M- Van N K.O P Q R S T U V W
Nguyen
X Y Z
Slide #2- 32
YurinA the Sast ten Tears the art of securinA aSS forEs of
Yata incSuYinA YiAitaS speech has iEproNeY EanifoSY the priEarT
reason for this has been the aYNent of EicroeSectronics the
coEpSeQitT of the functions that can noP be perforEeY bT the Eachine
has risen YraEaticaSST as a rccsuSt of this recent YeNecopEent in
technoSoAT EanT of the cipher sTsteEsthat Pere once
consiYcreYseure arenoP breaMabSe
- n h o - p - r s t u i - - - - - f - - - a b c - e
key
A B C D E F G H IIntroJto Cryptography
K L M- Van N K.O P Q R S T U V W
Nguyen
X Y Z
Slide #2- 33
And the answer is
during the last ten years the art of securing all forms of data including
digital speech has improved manifold the primary reason for this has
been the advent of microelectronics the complexity of the functions that
can now be performed by the machine has risen dramatically as a result
of this recent development in technology many of the cipher systems
that were once considered secure are now breakable
fP = 3, fM = 1
P can be {j, k, q, z, w}
Pere = ?ere {jere, kere, qere, zere, were}. w => P
M can be {j, k, q, z}
breaMable {breajable, breakable, breaqable, breazable} k => M
g n h o m p - r s t u i k v - - x f l y - a b c d e
key
A B C D E F G H IIntroJto Cryptography
K L M- Van N K.O P Q R S T U V W
Nguyen
X Y Z
Slide #2- 34
How can we design better ciphers?
Observations:
A cipher system should not allow statistical properties of
plaintext to pass to the ciphertext.
The ciphertext generated by a "good" cipher system should
be statistically indistinguishable from random text.
Idea for a stronger cipher (1460’s by Alberti)
use more than one cipher alphabet, and switch between
them when encrypting different letters Poly-alphabetic
Substitution Ciphers
Developed into a practical cipher by Vigenère (published in
1586)
Vigenère cipher: a special Poly-
alphabetic Substitution Cipher
Definition:
Given m, a positive integer, P = C = (Z26)n, and K = (k1, k2,
…, km) a key, we define:
Encryption:
ek (p1, p2… pm) = (p1+k1, p2+k2…pm+km) (mod 26)
Decryption:
dk (c1, c2… cm) = (c1-k1, c2-k2 … cm- km) (mod 26)
Example:
Plaintext: C R Y P T O G R A P H Y
Key: LUCKLUCKLUCK
Ciphertext: N L A Z E I I B L J J I
Vigenere Cipher: Cryptanalysis
https://users.soict.hust.edu.vn/vannk/AntoanTh
ongtin/ComputerSecurity.htm