Module 3 Ch3
Module 3 Ch3
By Marwa Al-Musawy
-78-
Technical collage /Najaf Communication security
Initialization of S
To begin, the entries of S are set equal to the values from 0 through
255 in ascending order; that is; S[0] = 0, S[1] = 1,..., S[255] = 255. A
temporary vector, T, is also created. If the length of the key K is 256
bytes, then K is transferred to T. Otherwise, for a key of length keylen
bytes, the first keylen elements of T are copied from K and then K is
repeated as many times as necessary to fill out T.
By Marwa Al-Musawy
-79-
Technical collage /Najaf Communication security
Stream Generation
Once the S vector is initialized, the input key is no longer used.
Stream generation involves cycling through all the elements of S[i], and,
for each S[i], swapping S[i] with another byte in S according to a scheme
dictated by the current configuration of S. After S[255] is reached, the
process continues, starting over again at S[0].
By Marwa Al-Musawy
-80-
Technical collage /Najaf Communication security
By Marwa Al-Musawy
-81-
Technical collage /Najaf Communication security
Public-Key Cryptosystems
Asymmetric algorithms rely on one key for encryption and a
different but related key for decryption.
These algorithms have the following important characteristic:
By Marwa Al-Musawy
-82-
Technical collage /Najaf Communication security
(a) Encryption
(b) Authentication
Figure (10-3) Public key Encryption
By Marwa Al-Musawy
-83-
Technical collage /Najaf Communication security
By Marwa Al-Musawy
-84-
Technical collage /Najaf Communication security
With this approach, all participants have access to public keys, and
private keys are generated locally by each participant and therefore need
never be distributed. As long as a user's private key remains protected and
secret, incoming communication is secure. At any time, a system can
change its private key and publish the companion public key to replace its
old public key.
Table 10.1 summarizes some of the important aspects of symmetric
and public-key encryption. To discriminate between the two, we refer to
the key used in symmetric encryption as a secret key. The two keys used
for asymmetric encryption are referred to as the public key and the
private key. Invariably, the private key is kept secret, but it is referred to
as a private key rather than a secret key to avoid confusion with
symmetric encryption.
Table 10.1 Conventional and Public-Key Encryption
By Marwa Al-Musawy
-85-
Technical collage /Najaf Communication security
By Marwa Al-Musawy
-87-
Technical collage /Najaf Communication security
public key. Because the message was encrypted using A's private key,
only A could have prepared the message.
It is, however, possible to provide both the authentication function and
confidentiality by a double use of the public-key scheme (Figure 10.6):
Z = E(PUb, E(PRa, X))
X = D(PUa, D(PRb, Z))
By Marwa Al-Musawy
-88-