You are on page 1of 6

TELECO2011 & 7ème JFMMA

Mars 16-18, 2011 – Tanger MA ROC

Security of information systems: Implementation of Encryption


1
Mohammed ERRITALI ; 2 Mohamed Fakir ; 3 Belaid Bouikhalene
1
Etudiant-Faculté des sciences et techniques Beni Mellal
2
Professeur à la Faculté des sciences et techniques de Beni Mellal
3
Professeur à la Faculté Poli-disciplinaire de Beni Mellal

mederritali@yahoo.fr

Abstract: In this work we provide a panorama on the use of cryptography and digital signature to secure an
informat ion system, we start with a state of the art about cryptographic algorithms, and digital signature
algorith ms and we finish by some applicat ions.

Key words: Sy mmetric encryption, asymmetric encryption, dig ital signature, PKI, SSL.

I. INTRODUCTION are still used for encrypting messages because of


very high speed, they no longer meet the new

T he security of computer systems is generally


limited to guaranteeing rights of access to data
and system resources by implementing
needs.
The public key cryptography has been formalized
and helped meet these needs. These are all ways
authentication mechanisms and monitoring to that can provide solutions to new problems which
ensure that users of these resources have only those are identification, authentication and confidentiality
rights that they were granted. The security of messages.
mechanis ms in p lace can still cause discomfort to The public key cryptography is involved in many
users and guidelines and rules are beco ming everyday applications, the use of smart cards
increasingly comp licated as they as the network through mobile phones, until a user logs in to a
expands. Thus, IT security must be studied in such computer. However, the security of these
a way that does not prevent users to develop uses applications depends mainly on t wo issues
that are necessary, and ensure that they can use the considered difficult nu mber theory: the problem of
informat ion system with confidence. factoring and discrete logarithm problem. Although
Indeed the concept of cryptography is born from these two problems are still resisting the
the mo ment we wanted to provide safe fro m cryptographers, they are not immune fro m a
eavesdroppers. Fro m Julius Caesar and his army, to theoretical breakthrough or even quantum
Ro meo and Ju liet, through all the treasure maps, it computers that would endanger the difficulty of
took encrypt certain information. The contemporary solving them.
period has not improved in this area. Instead, the
consumer society has created new cryptographic
needs. Of course these are military applications
remained secret commun ications, and banking.
II. SYMMETRIC SECRET KEY
But we must also ensure the secrecy of ENCRYPTION
communicat ions on networks remote co mputer, and
the time of Julius Caesar in the late 1970s, many
prevent the modern-day pirates to infiltrate these cryptosystems have been invented (DES, A ES, ...)
networks of co mputers. Cryptography is used
[2], consisting in subjecting a clear text processing
increasingly in various fields.
more o r less complex to derive a text, said
Until recently, the security of these systems was encrypted. The transformat ion is based on two
based on secret information that is shared by users,
elements: a mathematical function and a secret key.
and allowed to co mmun icate confidentially. For this
Only a person familiar with the function and the
reason, all of these systems is called secret key key can perform the inverse transformation, which
cryptography. As secret key systems, it uses
transforms the cipher text into plaintext. The same
algorith ms using the same key for encryption and
key used for encryption and decryption, and for this
decryption and for this, are called symmetric reason it must remain secret.
encryption algorithms. DES, A ES, IDEA are the
Figure 1 is an illustration of the process of
most famous examp les. A lthough these algorith ms
symmetric encryption
TELECOM 2011 & 7è me JFMMA

experts in cryptography were already authors of


another algorithm: Square. AES is a subset of
Rijndael: it only works with blocks of 128 b its,
whereas Rijndael offers block sizes and keys that
are mult iples of 32 (between 128 and 256 b its).
In so doing the AES replaces the DES (chosen as
standard in the 1970s) which today became
obsolete, because it used only 56-b it keys. The AES
Figure 1: has been adopted by NIST (National Institute of
Standards and Technology) in 2001 [9,10].
Moreover, its use is very convenient because it uses
Symmetric Encryption litt le memory and is not based on a Feistel scheme,
its complexity is lower and it is easier to
A. Data Encrypti on Standard (DES) implement.
The first data encryption standard was The algorithm takes as input a b lock of 128 b its (16
developed by German -born American bytes), the key is 128, 192 or 256 bits. The 16 input
cryptographer Horst Feistel in 1934 [2]. His bytes are swapped according to a predefined table.
nationality and profession cryptographer earned These bytes are then placed in a 4x4 mat rix
him some difficulties with the National Security components and lines are rotated to the right. The
Agency (NSA), wants above all to keep control increment fo r the rotation varies with the nu mber
over the means of encryption and to pierce the line. A linear transformation is then applied to the
codes used by private individuals. Finally he put his matrix, it consists of a b inary mu ltip licat ion of each
skills to IBM, for who m he developed in the early element of the matrix with polyno mials fro m an
1970s the cryptosystem Lucifer basis for future auxiliary matrix, this increase is subject to special
Data Encryption Standard (DES). rules as GF (28 ) (Galois group finite) [9,10]. The
DES is based on the following principles: the linear transformation ensures a better distribution
plaintext is encoded in binary and cut into blocks of (propagation of bits in the structure) on several
64 bits. Each block is cut in half b locks whose bits laps.
undergo complex permutations, then the half-blocks Finally, an XOR between the matrix and another
are added together and subjected to other matrix p rovides an intermediate matrix. These
transformations. The operation is repeated sixteen different operations are repeated several times and
times. The transformation function has variations set a "tower". For a key of 128, 192 or 256, A ES
depending on the key, which is an arbitrary number requires respectively 10, 12 or 14 towers.
chosen by the user code. The nu mber o f possible Afficher en écriture latine
values for the key determines the number of ways
in wh ich a message can be encrypted. The sender of C. Protocol Diffie and Hellman
the message secret number according to the DES If t wo network users Ayoub and Mohammed
algorith m using the key, the receiver applies the wants to keep a secret correspondence, they may
inverse function with the same key to decrypt it. agree to encrypt their messages with an algorith m
The NSA has obtained the standardization of DES such as Triple DES or AES, we have presented.
in 1976 [2] has a limit on the key size to 56 b its. This algorith m has all the guarantees of robustness,
Today value is notoriously weak, and it uses the but it will take them to be agreeing on a secret key:
triple DES with a key length of 112 bits. for this they must meet, which may be impossible,
Posterity current DES encryption provides can be or to co mmun icate the key by mail. In both cases,
regarded as robust, on condition that solved the the mo ment of exchange is that a spy can take
crucial problem of all systems that rely on a secret advantage to steal their secret and thus nullify ing
key used for encryption as well as for the the security of their co mmunications. This is the
decryption: the participants should exchange as problem of key exchange.
secret key, wh ich is not simp le.
C. 1. The problem of key exchange
B. Advanced Encryption Standard (AES) For centuries the problem of key exchange
He comes fro m an international call for was seen as a natural disadvantage of encryption.
applications launched in January 1997 and has With the use of computer and tele-t ransmission, and
received 15 proposals. Of these 15 algorithms, five the dematerialization of information they allow the
were selected for further evaluation in April 1999: problem is different. In 1970 an independent
MARS, RC6, Rijndael, Serpent, and Two fish. After researcher, Whitfield Diffie, reflected by two of
this assessment, it was finally the candidate ARPANET users to exchange encrypted emails
Rijndael, named after its two designers Joan without physically meet beforehand to agree on the
Daemen and Vincent Rijmen (both Belgian encryption key that they use it[2]. In 1974 he gave a
nationality) who has been chosen [9,10]. These two lecture on the research center Thomas J. Watson of
TELECOM 2011 & 7è me JFMMA

IBM in Yo rktown Heights (already at work of Horst encrypted email while it is on holiday, it will be
Feistel), and there he learned that Martin Hellman, obliged to await its return to establish the key with
a professor at Stanford University in Palo Alto, him.
gave a lecture on the same subject. He immediately Whitfield Diffie had another idea, which he did not
took his car and crossed the continent to meet find appropriate mathemat ical solution: a system
Hellman [2]. which would use a key to encrypt and another to
Diffie and Hellman were looking for a way to agree decrypt. Thus, Mohammed propose to Ayoub an
on a shared secret without being circulated among encryption key, with wh ich it would encrypt the
the participants, in other words, a mathematical message, and Mohammed decrypt it with a
function such that participants can exchange different key, the decryption key (Figure 2). The
informat ion alone could deduce the secret. The encryption key only allows you to encrypt, even
desired characteristics of such a function are the Ayoub would be unable to decipher his own
relative ease of calculat ion in the forward d irection, message with this key, only Mohammed can with
and almost impossible to calculate the inverse his decryption key. As the encryption key only
function. Thus, if s is the secret to clear the works in one direction, it creates secrets but not to
encryption function F, c secret encrypted, the disclose, and may be public, appearing in a
decryption function D, it is necessary that c = F (s) directory or on a website.
is easy to calculate, but if D = (c) impossible to Anyone who wants to send an encrypted message to
calculate for any other participants. Mohammed can take and use.
C.2. Implementation of Diffie -Hellman It must only be sure that nobody can calculate the
The protocol for key exchange Diffie-Hellman is decryption key fro m the encryption key. And that
based on a function of the form, first with P & W mathematical intuition is decisive.
<P. If the idea of asymmetric encryption using public
This function is very easy to calculate, but the keys back to Diffie and Hellman, the realization of
knowledge of K does not imply easily X. Th is this idea came to Rivest, Shamir and Adleman.
function is public, and the values of W and P. They found a mathematical solution to the RSA
1. Ayoub chooses a number that will remain h is implementation.
secret, say A. A person wishing to communicate using this
2. Mohammed chooses a number that will remain method must do the following :
his secret, say B. 1. Take t wo primes p and q.
3. Ayoub and Mohammed want to exchange the 2. Calculate n = pq.
secret key, wh ich is actually, but they do not know 3. Calculate z = (p - 1) (q - 1). (This number is the
yet, since everyone knows that A or B, but not both. value of the function φ (n), called Euler function,
4. Ayoub applies to A the one-way function, α is the and we note that it gives the size of the
result: mu ltip licat ive group modulo n, ).
5. Mohammed applies to B-way function, β is the 4. Take a s mall integer e, odd and prime to z.
result: 5. Calculate the inverse of e (mod z), that is to say d
6. Ayoub sends α to Mohammed, and Mohammed such that ed = 1 mod z. The modular arith metic
sends β, as shown by, they may be known to the theorems assure us that, in our case, d exists and is
whole world without the secret of Ayoub and unique.
Mohammed is disclosed. 6. A pair P = (e, n) is a public key.
7. Ayoub received β and calculates (that 7. The triple S = (d, p, q ) is the private key.
is to say in passing by , but he does Ayoub wants to send a message to Mohammed. it
not know B): . gets the public key of Mohammed on her Web site
8. Mohammed received α and computes and proceeds through encryption of the message M
(that is to say in passing by , but he to obtain the encrypted C as follows:
does not know A): C = P (M) =
Mohammed and Ayoub get to the end of their To obtain the plaintext T, Mohammed decrypt with
respective calculations the same number that has the secret key as follows:
never been exposed to the sight of prying: the S T = S (C) =
key. In fact it is quite log ical:
S (C) =
III. THE ASYMMETRIC PUBLIC =
= mod n
KEY ENCRYPTION = M mod n
The method of Diffie and Hellman allows the The latter result, = M (mod n) arises because e and
exchange of keys, but it imposes a preliminary d are inverse modulo n, it is demonstrated through
dialogue between the actors. Sometimes it is not the Fermat's little theorem.
practical: if Ayoub wants to send to Mohammed an
TELECOM 2011 & 7è me JFMMA

sense that it is almost impossible to find two


mean ingful messages that occur simu ltaneously on
the same digest. Therefore, the probability that a
message tampered produce the same digest as the
original is virtually zero.

Figure 2: Asymmetric Encryption

IV. DIGITAL SIGNATURE Figure 3: Dig ital Signature

A. Introduction The digital signature requires the use of electronic


The electronic signature is a very concrete certificates. These are generated by Certificat ion
application of the asymmetrical cryptography which Authorities (CA), wh ich can uniquely identify the
was invented in the middle of the Seventies. person (or entity) who holds the key public and
Indeed modern cryptography is no longer limited to private: they can be seen as the digital identity card
ensure confidentiality of informat ion, but it can also person or entity. In addition to this role, the
authenticate them through the digital signature. certificates can be used to encrypt information.
The digital signature is a mechanism to authenticate
a message, i.e. to prove that a message really co mes B. Principle of the digital signature
fro m a specific sender. • M = set of messages to sign,
According to ISO 7498-2 on the security • S = set of signatures,
architecture for open systems, the definition of • K = set of keys
digital signature: ‘’data appended to a data uni t, For a g iven key k ∈ K, a signature function: M → S
or cryptographic transformati ons of a data uni t, and verificat ion function:
enabling a reci pient of prove the source and M × S → (true, false) such that for every message
integrity of the data unit and protects against m ∈ M and each signature s ∈ S we have
counterfeiting by the reci pient’’ [7]. (m,s)= true ⇔ (m)= s.
The signature is made using the signer's private key,
so all partners can check the signature using the B.1 RSA Signature
public key. In all operat ional protocols, it is actually • M = S = , where n is the product of two
a hash, not the whole document is signed, for primes p and q.
performance reasons; asymmetric algorithms are • K = ((n, e, d) | ed ≡ 1 (mod φ (n))) n and e are
very resource-intensive. public, d are secret.
The technique used to calculate the hash is the hash. The signature function is calculated by
The technique produces a message digest which is a s= (m) =
small representation of the unique and complete Verificat ion by computing m' = (mod n) and
message. Figure 3 illustrates the steps of the digital (m,s)= true ⇔ m= m'
signature. Hash algorith ms are one-way encryption B.2 El Gamal Signature
algorith ms, so it is impossible to find the orig inal Signature process
message fro m the digest. The main reason why it Choosing a prime nu mber p.
produced a digest of the message are: Generator g of the mult iplicative group
1. The integrity of the message sent is preserved, Choose an integer x between 0 and p-1
and any alteration of the message will be It calculates y= mod p
immed iately detected; The public key is (p, g, y)
2. The digital signature will be applied to condense The private key is x
whose size is usually much smaller than the To sign a message m:
message itself; Choose k <p-1 and the first random p-1.
3. Hash algorithms are much faster than any Co mpute r= mod p and s= (H(m)-xr) mod
encryption algorithm (either public key or p-1.
symmetric key). The signature of m is (r, s).
The message digest is very probably unique in the To verify a signature:
TELECOM 2011 & 7è me JFMMA

Test if 0 <r <p of messages called SSL handshake. The negotiation


Calculate u= mod p and v= mod p allo ws a server to authenticate the client using
Accept if u = v public key techniques, then allows the client and
server to cooperate in creating sy mmetric keys used
B.3 DSA Signature (Digital Signature Algorithm) for rapid encryption, decryption, and detection of
An American standard (FIPS 186) dating fro m 1995 alteration of data during the fo llo wing session.
signature based on the princip le o f the ElGamal Eventually, the SSL handshake can also allow the
signature. client to authenticate to the server. Figure 4
Process signature:
We selected the follo wing parameters:
A prime number p
A second prime q div iding p-1
A generator g of the cyclic group of order q
An integer x <q, we calcu lates y= mod p
The public key is (p, q, g, y).
The private key is x
To sign a message m:
Choose an random integer k <q
Calculate:
r=( ) mod q
s= (H (m) +xr) mod q
The signature of m is (r, s)
To verify the signature:
Verify that r and s are in the interval [1, q-1]
Calculate:
illustrates this authentication.
w=
u=wH(m) mod q Figure 4: Authentication Process with an X.509
v=rw mod q certificate
z= ( mod p) mod q
Accept if z = r This authentication is performed by using an X.509
digital certificate issued by a certification authority
V. SECURITY OF EXCHANGE ON (CA). But mo re and mo re web applications are now
using authentication client by exp loiting TLS. It is
INTERNET then possible to provide mutual authentication
A. Introduction between the client and the server. The client
The security protocol SSL / TLS is currently certificate can be stored as software on the client or
the main protocol used worldwide for secure the physical format (s mart card, USB token) to
exchange and online transactions (e-commerce, increase the security of TLS link. This solution can
bank accounts, online auctions, electronic voting provide strong authentication.
...).
In the pile of protocol TCP/ IP, SSL is located
between the application layer (like HTTP, and lay VI. APPLICATION
down it transport TCP. Its most common use
In this work our aim is to test certain cryptographic
remains however in lower part of HTTP (Hypertext
Transfer Protocol). Layer SSL is implemented by algorith ms as well as digital signature.
To make these algorithms accessible to users in a
the session layer of the pile, which has two
first step, we have developed a java application
consequences:
• For any existing application, it can exist an which provided the users the possibility of giv ing
texts clear to encrypt or decrypt using four
application using SSL. For examp le, applicat ion
cryptographic algorith ms DES, A ES, Blowfish, and
HTTPS (Hypertext Transfer Protocol secured)
corresponds to HTTP above SSL; RSA, to verify the integrity of files with MD5 hash
functions (message digest 5), SHA 1 and SHA 256
• An application SSL is seen allotting a new
or signing it with DSA (Digital Signature
number of port by the IANA (Internet Assigned
Nu mbers Authority). For example HTTPS is Algorith m).
Then we discussed the comparison of execution
associated port 443.
time of software imp lementations to show that the
B. SSL Client Authenticati on with digital public key algorith ms are very slow and resource-
intensive.
certificate X.509
Finally, to test the functioning of X.509 certificates
An SSL session always begins with an exchange
used in SSL we wrote a program that just lets you
TELECOM 2011 & 7è me JFMMA

use the SSL functionality. Springer, 1996.


[6] David Bru mley et Dan Boneh, Remote Timing
Attacks Are Practical, 12th USENIX Security
VII. CONCLUSION Symposiu m, 2003.
[7] La Lettre d'ADELI n°46 ,Signature
Cryptography is an area that attracts increasing cryptographique : du numérique à l’électronique ,
attention of research groups. Janvier 2002.
Indeed, the public key cryptography is very [8]Sammy POPOTTE-Laboratoire SUPINFO des
attractive and rich in perspectives, incorporating technologies Microsoft ,Présentation d'IPSEC dans
both encryption and digital signature. It is a real un environnement Windows 2000,
breakthrough compared to symmetric key [9] National institute of standards and technology
cryptosystems. (NIST),Advanced Encryption standard (AES)
Beyond the technical aspect, we must see the need Conference, (Ro me, Italy), March 1999.
to develop architecture or a PKI, wh ich includes the [10] Nat ional institute of standards and technology
tools needed to effectively manage and use keys (NIST),Advanced Encryption standard (AES),
and certificates. In this work, we first presented Federal Informat ion Processing Standards (FIPS)
some ideas about cryptography and digital publication197,2001.
signatures and their uses to secure exchanges on
internet. I wish in conclusion to mention a few
related lines of work that I have unfortunately not
had time to dig in my work: cryptography with
elliptic curves and cryptanalysis.
For elliptic curves I thin k they are beginning to be
known to a wider audience. Perhaps in a world
dominated by the RSA public key cryptography, the
latter eventually become a credib le alternative.
Some ideas and prototype of the cryptosystem
presented in this work remain to be completed. But
the cryptographic concepts that we are developed
permit to see more clearly the importance of
encryption and digital signature in trade security in
informat ion systems.
Today, two types of encryption allow to secure
digital exchange, however, is not to our knowledge
of systems that combine these two techniques.
We conclude that both techniques are
complementary and can be combined into a single
system if we wish to obtain an encryption system
not only efficient, but also respond to the needs and
expectations of users.

VIII. REFERENCES
[1] Ewelle Ewelle Richard ,TPE : Connectivité et
sécurité des réseaux sans fils, Institut de la
francophonie pour l'info rmatique, rapport final,
Hanoï, Ju illet – 2009
[2] Laurent Bloch et Christophe Wolfhugel
,Sécurité info rmatique Principes et méthode,
éditions Eyrolles 2007.
[3] Cédric Llorens , Laurent Levier et Denis Valo is
,Tableau x de bord de la sécurité réseau, éditions
Eyro lles ,2éme éd ition 2006.
[4] CGI, Étude technique : Cryptographie à clé
publique et signature numérique Principes de
fonctionnement, Septemb re 2002 .
[5] Mohammed C Kocher, Timing Attacks on
Implementations of Diffie-Hellman, RSA, DSS, and
Other Systems, Advances in Cryptology -
CRYPTO’96,LectureNotes in Co mputer Sciences,

You might also like