<<---Back to Micke´s Web Security Main Page

Cryptographic systems
last changed 980613 by Micke Pettersson

Here is some terminology and a description of cipher systems.

Contents of this page:


Terminology

Network security problems can be divided roughly in four intertwined areas:
· Secrecy
· Authentication
· Non-repudiation
· Integrity

Secrecy deals with keeping information out of hands of unauthorized users. Data has to be encrypted before transfer on a general network to ensure secrecy.

Authentication deals with determining whom you are talking to before revealing sensitive information or entering a business deal.
Non-repudiation deals with signatures: A receiver should be able to prove that a message really was from the sender even if he denies it.

Integrity ensures that a malicious user will not be able to delete, modify, or replay a data exchanged between parties without detection.

Security mechanisms can be placed at several layers. The main advantage of having them at lower layers is that they will be transparent to users. Unfortunately, the application layer is the only layer that can deal with all issues. This means that the mechanisms must be linked together with the application, which will make it a little bit more complicated.


Crypthographic algorithms

Today's  cryptographic algorithms are based on keys to achieve encryption and decryption. There are two different main directions, symmetric (secret-key) and asymmetric (public-key) algorithms. Symmetric algorithms use the same key whereas asymmetric algorithms use two keys for encryption and decryption, one of the keys is public and open and the other is held private. It is not possible to derive one key from the other. Public key systems solves the problem with exchanging keys between to parties, anyone can use the public key to encrypt a plain-text and then only the owner of the public key can decrypt the cipher-text with it's private key. Symmetric algorithms are much faster to execute than asymmetric ones, therefore there is often a combination of them both. Public key methods are mostly used to encrypt session keys to be used to encrypt data with a symmetric cipher.

Short descriptions of commonly used cryptographic algorithms:

Symmetric algorithms

· DES - Data Encryption Standard
It was developed in the 1970s and has become very widely used. It is a block cipher - encrypts fixed-size block of data. DES uses a 64-bit block size and 56-bits key, with the relative small key size it's nowadays easy to break the cipher with the right hardware.
There is an approved variant-called 3DES that uses DES three times with different keys. It is considered to be more secure.
· IDEA - International Data Encryption Algorithm
A block cipher operates on 64-bit plaintext blocks with a 128-bit key. The same algorithm is used for both encryption and decryption. It is considered to be very secure. It is a relative new developed algorithm and so far no one has succeeded to break it. It is patented and is not free for commercial use and therefore not very common.

· RC4
Developed by RSA Data Security, Inc. The algorithm is very fast, and breaking it seems not be easy. The key length is variable. Is essentially a pseudo random number generator, and the output from the generator is xored with the data stream.

Asymmetric algorithms
· RSA - Rivest Shamir Adelman
Very commonly used, and can be used both for encryption and for signing. The key length is variable, a 1024 bit key is considered safe. It is built upon the difficulty of factoring large numbers. The public and private keys are functions of a pair of large prime numbers. Recovering the plaintext from the cipher-text is equivalent to factoring the product of the two primes. Patented in USA but free elsewhere.

· Diffie-Hellman
Commonly used for key exchange. Key size is variable. Security relies on the difficulty of the discrete logarithm problem.
· ElGamal
Can be used for both encryption and digital signatures. Security relies on the difficulty of the discrete logarithm problem.

· DSA - Digital Signature Algorithm
Is a variant of the ElGamal signature algorithm


Cryptographic hash functions

A one-way hash function operates on messages and returns a hash value of some length. There are some things that makes the hash functions specific: given a message M it is easy to compute a hash value h, given a hash value h it is hard to compute the message M, it is hard to find another message M´ so that Hash (M) = Hash (M´).

Hash functions are used to give a unique fingerprint of a message, this fingerprint is called Message Authentication Code, MAC. The MAC is used to check if the message has been changed during the transport. Take the message and eventual extra data and compute the hash value and compare with the appended MAC, if they differ then discard the message. Here are the most common and freely available two hash functions.

SHA - Secure Hash Algorithm
Developed by NIST & NSA to be used in DSA. It produces a 160-bit hash value from an arbitrary length string. There are no known crypt-attacks that have been successful on this algorithm.
MD5 - Message Digest Algorithm
Developed by RSA Data Security, Inc. It can be used to hash an arbitrary length byte string into a 128-bit hash value. Very commonly used and considered to be quite secure.


Authentication and certificate(X.509)

Authentication and certificate(X.509)
To exclude the risk that an intruder, Trudy, does a man-in-the-middle attack, see section 5.2.3, an extra step can be added to the protocols where risks for this type of attack exists. This step is based upon certificates and digital signatures. It is used to ensure that authorization is done in a correct way.

A third trusted part called Certificate Authority, CA, is involved and this CA creates certificates for the involved parts. These certificates normally looks like:

 C(N) = < id(N), t, ver(N), id(CA), sig(CA)(id(N),ver(N)) >

This can be read as: the identity of N and the public key of N are signed (decrypted) with CA´s private key, this is together with the identity of N in clear text, a valid-before-time t, the public key of N in clear text and the identity of CA in clear text sent to the peer that wants a certificate from N.

The certificate provides assurance that the holder of the private key of a key-pair is really who the certificate says it is. Who does then provide certificate for the CA? One CA can issue a certificate for another CA and so on, in a chain like structure or hierarchic structure. If someone want to examine the certificate of an issuer she can go further up in the structure until a trusted part is found.
But there must be a root level where no one above can issue a certificate, here is the certificate self signed. Extra care must be taken so a user doesn’t choose a CA that is not trustworthy. There exists some big CA:s, such as VeriSign which are selfsigning and widely trusted.

The certificate can be used as follows:
A sends her certificate to B
B checks the timestamp to see if the certificate is valid
B checks the identity of the CA to see if it the CA is someone to trust
B encrypts the signature with CA´s public key to see who the owner of this certificate is and the owner’s public key
B sends a challenge encrypted with A’s public key to A, to be ensure that A really is A.
A decrypts and send back the challenge to prove that he was able to match the public key.

Now B can be certain that A is A and that A has A´s private key. Trudy can not do the man-in-the-middle attack though she doesn’t have the certificate to prove that she is A. Furthermore she doesn’t have A:s private key to respond the challenge or to decrypt to find out the secret key.


Firewalls

A firewall is used to protect a local network from the rest of the world. It may, depending on its function, allow some traffic through and stop other.

Firewalls range from Internet Protocol routers configured to filter IP addresses (packet filtering) to higher-end UNIX hosts with custom software for comprehensive filtering, logging and analysis (proxy servers).

A firewall is usually built as two routers with an application gateway in the middle. The Internet is connected to the outer router and the Intranet is connected to the inner router. The routers ensure that traffic goes from and to approved addresses. The application gateway unpacks the packets and looks what is in the packets. The packets can for example be scanned for forbidden words.
 
Many system administrators buy a firewall and then thinks that they have solved all security issues, but to often there is a lot of holes open by default that the sys admin "forgets" to close. A typical example of a security hole is the port for Telnet, where hackers may find their way in. For a firewall to work it must be part of a consistent overall organizational security architecture.

We have mentioned two different techniques and will now study them closer:
Network level firewalls makes decisions based on the source/destination and ports in individual IP packets.  Modern network level firewalls tend to be fast and transparent to the users.
Application level firewalls are generally hosts running proxy servers, traffic is not permitted directly between networks, can be used as network address translators. The traffic goes in on one side and out on the other, passing an application that masks the origin of the initiating connection. Has a negative impact on the performance and are not transparent to the users. Major enhancements in this area will come in newer products and they tend to lie in the middle between the Network level and application level firewalls.

We have scanned the web and found out that there are about 35 brands of firewalls available at the market, by 30 producers.
 


References:

  Schneier,Bruce , Applied Cryptography, 2nd Edition, Wiley, 1996. See     HYPERLINK http://www.counterpane.com/   http://www.counterpane.com/

  Introduction to Cryptography,   HYPERLINK http://www.cs.hut.fi/crypto/intro.html   http://www.cs.hut.fi/crypto/intro.html

  Kaliski ,Burton S.,Jr., "An Overview of the PKCS Standards", An RSA Laboratories Technical Note,
   revised November 1, 1993,   HYPERLINK http://www.rsa.com/rsalabs/pubs/PKCS/   http://www.rsa.com/rsalabs/pubs/PKCS/

  Datakommunikation 1 , part 2, Lecture Notes, Per Gunningberg & Eric Malmström, 1997

  Netscape Certificate Specifications,   HYPERLINK http://www.netscape.com/eng/security/certs.html   http://www.netscape.com/eng/security/certs.html

  VeriSign Digital Id FAQ,   HYPERLINK http://digitalid.verisign.com/id_faqs.htm   http://digitalid.verisign.com/id_faqs.htm

  Overview of Certification Systems: X.509, CA, PGP and SKIP,   HYPERLINK http://mcg.org.br/cert.htm   http://mcg.org.br/cert.htm

  Computer Networks, Andrew S. Tanenbaum, 3rd edition, ISBN:0-13-394248-1

 


Created 980414 by Micke Pettersson, pettersson@tsl.uu.se, http://www3.tsl.uu.se/~micke