Beruflich Dokumente
Kultur Dokumente
Educational Software
The material in this block can seem a little abstract. To
visualise the concepts an educational program called
CrypTool about cryptography and cryptanalysis is
recommended.
You can download Cryptool from
http://www.cryptool.com/
A Cipher System
Key
Plaintext,
Message
Cipher
Ciphertext,
Cryptogram
Caesar Cipher
Plaintext: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ciphertext: DEFGHIJKLMNOPQRSTUVWXYZABC
Translation Ciphers
If the input and output alphabets are the same then an
encrypting transformation is just a permutation of the input
alphabet. If we compose permutations, that is apply them
successively, then the result is also a permutation.
compose permutations:
apply
write
then apply f :
f 2 for f f , f 3 for f f f ,
f g
superenciphering:
Caesar 3
JKLMNOPQRSTUVWXYZABCDEFGHI
Caesar 4
MNOPQRSTUVWXYZABCDEFGHIJKL
Caesar 17
: ZABCDEFGHIJKLMNOPQRSTUVWXY
Additive Ciphers
and
0 r m.
sometimes written
a a 26 3
3 mod 26
is just
a a m k
.
5
a a m k 1
k m k 1 k 1 m k 1
am k
k m m 1. (FERMATS THEOREM)
kk m 1 m 1
k ( m ) 1 m k 1
If m is prime (m) = m -1 so
k 1 k m 2 mod m
For Example:
Suppose we want the multiplicative inverse of 3 mod 53.
Then we calculate
3 3 10
3 35
2 2
3 6 18
3 18 54 1 mod 53
So
53
3 1 53 18
2 2
12
531441 10 mod 53
300 mod 53 35
35
1225 mod 53 6
as required.
By calculating
k rq 1 mod ps
one possible value for the key is obtained. The others are
ks
, k 2s , k 3s , ...
10
Example
If we know that plaintext 15 produces ciphertext 12 mod 21
15k 12 mod 21
( pqk pr mod ps )
p 3, q 5, r 4
5k 4 mod 21 k 4 51 mod 21
4 17 mod 21 68 mod 21 5
11
12
y H (x )
is a many-to-one function.
13
Indiv. Procedures/Hash/SHA-1
Write down the hash of startingexample-en
Now go to:
File/Open
and Open CrypTool-en and compute its hash using the SHA-1
function.
Write down the hash of CrypTool-en and compare it with that
of startingexample-en.
What do you observe?
One-way hash function is designed so that y H (x) is easy
to compute but given y finding any x such that y H (x) is
extremely hard and finding any x1 and x2 such that H ( x ) H ( x )
is extremely hard.
1
15
Password Protection
Stream Cipher:
A one-way hash function could be used to create a secure
stream cipher as in the diagram below.
Counter
One Way
Hash Function
Output Stream
16
Asymptotic Complexity
A problem with complexity n2 will be harder to solve than a
problem with complexity 10000n for all inputs of size greater
than 10,000.
Thus we choose to ignore constant factors to get a
degree of technology independence, since changes in
technology only affect constant factors.
The graph below shows how some functions vary with n.
A exp( Bn) Cn D log( En ) Fn 3G Hn 2 l
17
f(n)
400
Aexp(Bn)
350
300
Fn3G
Dlog(En)
Cn
250
200
150
Hn2I
100
50
0
0
10
15
20
25
30
n
Figure: Relative rate of Growth of common functions
18
an b
log a
n
log b
n
log a
19
f (n) O ( g ( n))
LOWER BOUND
f(n) grows at least as quickly as g(n).
f (n) ( g ( n))
TIGHT BOUND
f (n) O ( g ( n)) and f ( n) ( g (n)) write f (n) ( g (n))
Example
Consider the function 10
This is
(1)
( n 5 )
(n log n )
(5 10
and
(10
n log n )
log n
log n
log n
5 n
log n
20
21
o( n a )
n10
1.1n
210 1024
1.12 1.21
1000
100010 10 30
1.11000 2.47 10 41
22
Scalable cryptosystems
A cryptosystem is scalable if it allows us to set the
cryptanalyst a harder task whenever the time spent on
encryption and decryption is increased, by using a longer key.
To achieve scalability, it must be arranged that as the
cryptosystem is scaled up, the time required for cryptanalysis
increases much faster than the time spent on encryption and
decryption.
A modern scalable cryptosystem is designed so that
encryption and decryption are computationally feasible but
identification of the key by a cryptanalyst is infeasible.
A problem is considered feasible if it is in class P and
infeasible if it is not.
It follows that cryptosystems are designed so that
encryption and decryption are in P and cryptanalysis is
not.
By choosing a sufficiently large key the cryptographer can
ensure that the cryptanalyst cannot afford sufficient computer
power to attack it.
A user of AES can implement it as a scalable cryptosystem by
increasing its key length; AES supports key sizes of 128, 192,
and 256 bits. IEEE 802.11i recommends the use of AES.
23