Beruflich Dokumente
Kultur Dokumente
= =
where n = 24, k
1
has the value of b
i
, and
=
=
=
+
0 ,
0 ,
1
j
j
j j
k if number digit one
k if number digit two
k k
where k
i
= 0, 1, 2,,9. The stream key k
consists of the residuals mod.26 of m
1
, m
2
,...,
m
12
, that is k
j
=(m
j
mod.26). As a rule, if the
plaintext is x = x
1
x
2
x
3
x
n
, then the
components of the stream key are applied to
the letters x
j
of the plaintext for encryption
according to (5), and according to (6) to
decrypt:
( ) ( ) ) 5 ( 26 . mod e
k j j j j
x m c x
j
+ = =
( ) ( ) ( ) 6 26 . mod d
k j j j
m c c
j
=
For the case in study
x = 2 17 8 15 19 0 13 0 11 8 25 0
we shall obtain, using , n
0
= 1, n
1
= 2 (i.e.,
the number of consecutive digits which will be
taken):
=2.6457513110645905905016157536392
6042571025918308245018036833445920
q = 64 57 51 31 10 64 59 05 90 50 16 15
k = 12 5 25 5 10 12 7 5 12 24 16 15
and k is the stream key. The encryption is
made by componentwise addition mod.26 to
x, cf. (5). We get the cryptogram c
14 22 07 20 03 12 20 05 23 06 15 15
corresponding to OWHUDMUFXGPP
Remarks. The methods 1 and 2 are
polyalphabetic ciphers. There is a similitude
to Vigenre cryptosystem. The difference
consists in the use of a key of length equal to
the length of the plaintext message. There
are some disadvantages steaming from that
the possibility to find the irrational number
used when n
0
is known. In addition, the
complexity of these methods remains to be
studied. To avoid such disadvantages, we
may transform the decimal sequence in
various manners aiming to realize the
substitution, confusion and diffusion of the
cryptogram
Method 3 will be exemplified by an
application to the plaintext CRIPTANALIZA.
Its length is 12. The steps 1 and 2 are the
same as in the methods 1 and 2. In step (s1),
we chose the irrational, [9],
=2.6457513110645905905016157536392
604257102591830824501803683
Step (s2): we chose the value i of n
0
(e.g.,
i=1). The decimal sequence to be used for the
given 12 letters plaintext consists in the
sequence of the twelve decimals located in
the positions i, i+1, i+2, ..., i+12. The
sequence of decimals, which we shall use, is
5 4 3 2 1
9 5 0 9 5 4 6 0 1 1 3 1 5 7 5 4 6
b b b b b =
= = q
In step (s3), we shall transform q into a
sequence h by performing the following
operations: (i) a decimal of numerical value 0
located into the n
th
position is transformed
into the value of the decimal located into the
(n -1)
th
position; (ii) a decimal of a non-null
numerical value "p where
{ } 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 e p
located in the n
th
position in q is transformed
into the numerical value of the decimal
located in the p
th
position counted from the
(n+1)
th
place to the right (i.e. it is transformed
into the numerical value of the decimal
located in the (n+p)
th
position). Therefore, b
n
will produce the value of provided
0 =
n
b ; and if b
n
=0 then it will produce the
value of b
n -1
. The indicated transformation
produces the sequence h = (h
n
)
n=1,2,3
given
by
( )
=
=
=
+
7
0 ,
0 ,
1 n n
n b n
n
b if b
b if b
h
n
By convention, b
0
is the last digit of the
integral part of the considered irrational
number (e.g., for the irrational number
32.00458763... the above method yields h
1
=
2, h
2
= 0, h
3
="the value of the 7
th
position"=6).
Finally, the sequence h is the support of the
stream key we look for as simply k=h or k is
obtained from h as in method 2 by taking the
residuals mod.26 of the numbers m
j
given by
taking consecutive disjoint groups of n
1
consecutive digits from h
2 1
k k k =
For CRIPTANALIZA, we shall obtain using
, n
0
= 1, n
1
=2, and applying (7):
w=(2, 17, 8, 15, 19, 0, 13, 0, 11, 8, 25, 0)
q=6457513110645905905016157536392604
257102591830824501803683
h=31160301019509159556653624
m=31 16 03 01 01 95 09 15 95 56 65 36 24 ...
k =5 16 3 1 1 17 9 15 17 4 13 10 24 ...
c = 7 7 11 16 20 17 22 15 2 12 12 10
corresponding to HHLQURWPMMK. It easy
to describe now, in formulae comprising only
the digits b
j
and h
j
, the algorithm used for
encryption and decryption when the
parameters , n
0
, n
1
are known.
4. Perfect Secrecy: a theorem and some
problems
It is a natural question to ask if there are
irrational numbers for which at least one of
the above methods produces a perfect
secrecy stream cipher for plaintexts of given
length m. Let Q = (P, C, K, e, E, d, D) be a
cryptosystem over the alphabet V = Z
26
where
P = K = C = V
m
.
The encryption-decryption mappings are
( ) ( ) k c c w k w
k k
= + = d e ,
where the addition and subtraction are the
componentwise arithmetical operations
mod.26, i.e. they are the arithmetical
operations in the commutative ring ( )
m
26
Z .
By Shannon's theorem, Q will guarantee
perfect secrecy if and only if the conditions (3)
and (4) are fulfilled. Condition (3) holds as a
consequence of the encryption method,
because of
k w c k w c = + =
(if + = + = w c and k w c for two keys
K e , k , then = = w c k ). Therefore,
condition (4) remains to be fulfilled. Let be
an irrational number, and let ( )
,... 3 , 2 , 1 =
=
j
j
b b
be its decimal sequence of digits (base 10).
Each of the methods 1-3 in the previous
section produces, by the aid of , a set of
stream keys k whose restriction to their first
m terms combined with the reduction mod.26
of the values of those m terms give a subset
K() of K. Thus, the stream keys produced by
merely are a random variable key B with
values in K and the events on which B takes
values depend on the parameters n
0
, n
1
.
Hence, Shannon's condition (4) holds for the
original Q if and only if both K() = K and the
uniform distribution of B hold. We shall
denote by (Q,) the stream cipher whose
keys are chosen accordingly to the random
variable B. As a subsequent problem, we
may ask under what conditions the stream
cipher Q