Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

webcrypt: A Software Tool for Learning Cryptanalysis of Classical Ciphers, Slides of Cryptography and System Security

Webcrypt is a software tool created for the purpose of learning about cryptanalysis of classical ciphers. It includes modules for substitution, affine, vigenère, hill, and enigma ciphers. Users can encrypt messages and analyze the results using various cryptanalysis tools such as frequency analysis, digrams, trigrams, quadragrams, and the friedman test. The document also covers attack models and examples of cracking substitution, vigenère, hill, and enigma ciphers.

Typology: Slides

2012/2013

Uploaded on 04/27/2013

divyaa
divyaa 🇮🇳

4.4

(59)

71 documents

1 / 40

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cryptanalysis with
webcrypt
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download webcrypt: A Software Tool for Learning Cryptanalysis of Classical Ciphers and more Slides Cryptography and System Security in PDF only on Docsity!

Cryptanalysis with

webcrypt

2

webcrypt

4

Encrypting with

webcrypt

  1. Go to web-page or file you wish to encrypt
  2. Click “Crypto”
  3. Choose cipher (click on radio-button)
  4. Enter key
  5. Click “Encrypt”
  6. Save resulting file locally

5

Key-types

  1. Substitution: keyword

CAPTAINAHAB CAPTINHB

  1. Affine: a_b with

7_

  1. Vigenère: keyword repeated in keystream

PHAT PHATPHATPHAT...

  1. Hill: d_keyword with d the matrix dimension

3_traderjoe

  1. Enigma r1r2r3_c1_c2_c3_c4_c

hog_az_by_cx_dw_ev

a ∈ Z

∗ 26

, b ∈ Z 26

  19 3 9 17 4 14 0 17 4  

7

Attack Models

known ciphertext: Eve only sees ciphertexts

known plaintext: Eve knows a limited number of ciphertext-plaintext pairs

chosen plaintext: Eve tricks Alice into encrypting a limited number plaintexts of Eve’s choice

chosen ciphertext: Eve tricks Bob into decrypting a limited number ciphertexts that has created

8

Cryptanalysis Examples

Will describe how to crack

Substitution and Vigenere with known ciphertext attacks

Hill and Enigma with known plaintext attacks

Affine is a special case of Substitution

Ciphertext examples used located at: ~zeph/4261/studentdirs/assignments/zeph/

10

Frequency Analysis

Compare frequencies expected (from analysis of entire Moby Dick) with frequencies found in ciphertext. List from most common to least. e, t, a occur each more than 8%. O thru H all near 7% hard to distinguish. N,B,S similar. Guess {e,t,a} → {N,B,S} as unordered sets expected ACTUAL e N t B a S o E n K i Q s T h F r P l A

11

Digraph Analysis

Reasonable to expect mapping between most frequent letters: e→N. Confirmed by looking at top two digraphs. Assume: (e,t,h)→(N,S,E) (as ordered tuples). Next: “BJ” at 2.4% stands above crowd, similar to “in” at 2.1%. Guess (i,n)→(B,J). expected ACTUAL t h S E h e E N in BJ er EB an JL

13

Partial Alphabets

Summarize with transformation tables: plain a b c d e f g h i j k l m n o p q r s t u v w x y z CIPHER (^) T N L E B J Q S CIPHER (^) A B C D E F G H I J K L M N O P Q R S T U V WX Y Z plain i h n g e s t a

14

Exploit Keyword

Method

Assuming moderate sized keyword implies that after keyword:

cipher-alphabet monotonic

cipher letter ≤ plain letter

many simple sequences

cipher letter = plain letter rest equal plain a b c d e f g h i j k l m n o p q r s t u v w x y z CIPHER (^) T N L E B J Q S plain a b c d e f g h i j k l m n o p q r s t u v w x y z CIPHER (^) T N L E B J K M O P Q S U V W (^) X Y Z

16

Guess from context

Lines 6-

partial decrypt: XVING HISWH OXESP INXXE XXOXY SOTHA TWHEN HISVA STWRI NXXEX XOREH EAXRO SESOX ETWEN TYORX OREXE ETOUT OXTHE WATER THENO WRISI NGSWE XXSWI THAXX THEIR XONXX UENTW AVESX AZZXI NGXYX ROXEA GAINS TITVI NXIXT IVEXY TOSSI NGTHE IRSHI VEREX SPRAY

cipher text: FVBJL EBQWE KFNQM BJAFN ARKAY QKSET SWENJ EBQVT QSWPB JDFNA GKPNE NTAPK QNQKH NSWNJ SYKPH KPNGN NSKUS KGSEN WTSNP SENJK WPBQB JLQWN FFQWB SETFF SENBP IKJGF UNJSW TVNQA TZZFB JLFYR PKDNT LTBJQ SBSVB JABIS BVNFY SKQQB JLSEN BPQEB VNPNA QMPTY

conclude: whole→WEKFN, vindictively→VBJABISBVNFY

(c,d,l) →(I,A,F)

17

Partial Decrypt

Summarize with transformation tables: Can now guess keyword... plain a b c d e f g h i j k l m n o p q r s t u v w x y z CIPHER (^) T R I A N L E B C D F J K M O P Q S U V W (^) X Y Z CIPHER (^) A B C D E F G H I J K L M N O P Q R S T U V W (^) X Y Z plain d i j k h l c n o g p e q r s b t a u v w x y z

19

Find invertible known

plaintext matrix

the blue whale is the biggest creature

the blu ewh ale ist heb

= -6496 not invertible mod 26

Try another matrix: = -3317. Mod 26 11.

xi

det   19 1 0 7 1111 5 20 4   det   19 1 4 7 1122 5 20 7  

20

Solve System

Corresponding texts:

plain = the blu ewh ale ist

CIPHER = NSK RMC NZY ISF RBM

NSK,RMC,ISF=(13,18,10)’,(17,12,2)’,(8,18,5)’

Solution to is

Y =

K · X = Y K^ =^ Y X^

− 1

X

− 1

mod 26 =