Wednesday, 21 December 2011

STATIC AND DYNAMIC ROUTING


Static Routing


Static routing is not really a routing protocol. Static routing is simply the process of manually entering routes into a device's routing table via a configuration file that is loaded when the routing device starts up. As an alternative, these routes can be entered by a network administrator who configures the routes manually. Since these manually configured routes don't change after they are configured (unless a human changes them) they are called 'static' routes.

Static routing is the simplest form of routing, but it is a manual process.

Use static routing when you have very few devices to configure  and when you know the routes will probably never change.

Static routing also does not handle failures in external networks well because anyroute that is configured manually must be updated or reconfigured manually to fix or repair any lost connectivity.


Dynamic Routing



Dynamic routing protocols are supported by software applications running on the routing device (the router) which dynamically learn network destinations and how to get to them and also advertise those destinations to other routers. This advertisement function allows all the routers to learn about all the destination networks that exist and how to to those networks.

A router using dynamic routing will 'learn' the routes to all networks that are directly connected to the device. Next, the router will learn routes from other routers that run the same routing protocol (RIP, RIP2, EIGRP, OSPF, IS-IS, BGP etc). Each router will then sort through it's list of routes and select one or more 'best' routes for eachnetwork destination the router knows or has learned.

Dynamic routing protocols will then distribute this 'best route' information to otherrouters running the same routing protocol, thereby extending the information on whatnetworks exist and can be reached. This gives dynamic routing protocols the ability to adapt to logical network topology changes, equipment failures or network outages 'on the fly'.

What is PPP and PPPoE?



Point To Point Protocol (PPP) and Point To Point Protocol over Ethernet (PPPoE) are network protocols that allow data communication between two network entities or points. Throughout the documentation for both protocols, points are referred to as nodes, computers, or hosts. The protocols are similar in design with a major difference - PPPoE is encapsulated in Ethernet frames. Both protocols exist at the network access layer (also known as the data link layer) that supports network layer protocols including IPv4 and IPv6.

Point To Point Protocol (PPP)

PPP was first proposed as a standard by the Internet Engineering Task Force (IETF) in 1989 and became a working standard in 1994. The IETF specification for PPP is RFC 1661. PPP is a protocol most widely used by Internet service providers (ISPs) to enable dial up connections to the Internet. PPP facilitates the transmission of data packets between point to point links. Originally designed to work with serial connections, PPP was adopted by ISPs to provide dial up Internet access. PPP can be encapsulated in a number of data link layer protocols, including Ethernet (PPPoE) and Asynchronous Transfer Mode (PPPoA).
PPP uses Link Control Protocol (LCP) to establish a session between a user's computer and an ISP. LCP is responsible for determining if the link is acceptable for data transmission. LCP packets are exchanged between multiple network points to determine link characteristics including device identity, packet size, and configuration errors.
PPP supports three types of user authentication protocols that provide varying levels of security. Password Authentication Protocol (PAP) is an access control protocol used to authenticate a user's password on the network access server. The network access server requests a password from the client machine and sends the retrieved password to an authentication server for verification. As an authentication protocol, PAP is considered the least secure because the password is not encrypted in transmission.
Challenge Handshake Authentication Protocol (CHAP) is similar to PAP with several unique characteristics. Instead of requesting a password, the network access server sends a challenge message to the client machine. The challenge message is a random value. The client machine encrypts the challenge message with a user's password and sends the combination back to the access server. The access server forwards the challenge/password combination to the authentication server. The authentication server encrypts the challenge with the user's password stored in the authentication database. If the user's response is a match, the password is considered authentic. CHAP uses the model of a shared secret (the user password) to authenticate the user. The use of CHAP is considered a moderately secure method of authentication.
Extensible Authentication Protocol (EAP) is considered an authentication framework used by a number of secure authentication protocols. EAP is most commonly used for authentication on wireless networks.

Point To Point Protocol over Ethernet (PPPoE)

The working standard for the PPPoE protocol was published by the IETF in 1999. The IETF specification for PPPoE is RFC 2516. PPPoE expands the original capability of PPP by allowing a virtual point to point connection over a multipoint Ethernet network architecture. PPPoE is a protocol that is widely used by ISPs to provision digital subscriber line (DSL) high speed Internet services, of which the most popular service is ADSL. The similarity between PPPoE and PPP has led to the widespread adoption of PPPoE as the preferred protocol for implementing high speed Internet access. Service providers can use the same authentication server for both PPP and PPPoE sessions, resulting in a cost savings. PPPoE uses standard methods of encryption, authentication, and compression specified by PPP.
PPPoE is configured as a point to point connection between two Ethernet ports. As a tunneling protocol, PPPoE is used as an effective foundation for the transport of IP packets at the network layer. IP is overlaid over a PPP connection and uses PPP as a virtual dial up connection between points on the network. From the user's perspective, a PPPoE session is initiated by using connection software on the client machine or router. PPPoE session initiation involves the identification of the Media Access Control (MAC) address of the remote device. This process, also known as PPPoE discovery, involves the following steps:
  1. Initiation - The client software sends a PPPoE Active Discovery Initiation (PADI) packet to the server to intitiate the session.
  2. Offer - The server responds with a PPPoE Active Discovery Offer (PADO) packet.
  3. Request - Upon receipt of the PADO packet, the client responds by sending a PPPoE Active Discovery Request (PADR) packet to the server.
  4. Confirmation - Upon receipt of the PADR packet, the server responds by generating a unique ID for the PPP session and sends it in a PPPoE Active Discovery Session (PADS) confirmation packet to the client.
When a PPPoE session is initiated, the destination IP address is only used when the session is active. The IP address is released after the session is closed, allowing for efficient re-use of IP addresses.








Saturday, 17 December 2011

Cryptography



Cryptography is an art, as well as a science, that involves the process of transforming plaintext into scrambled text and vice-versa. The purpose of cryptography is to conceal the confidential information from unauthorized eyes and ensure immediate detection of any alteration made to the concealed information.

It is one of the most important domains in the CISSP (Certified Information System Security Professional) examination. This domain includes important concepts which are the fundamental building blocks for information security.


Public key infrastructure

Public Key Infrastructure (PKI) is a framework that enables integration of various services that are related to cryptography.

The aim of PKI is to provide confidentiality, integrity, access control, authentication, and most importantly, non-repudiation.

Non-repudiation is a concept, or a way, to ensure that the sender or receiver of a message cannot deny either sending or receiving such a message in future. One of the important audit checks for non-repudiation is a time stamp. The time stamp is an audit trail that provides information of the time the message is sent by the sender and the time the message is received by the receiver.

Encryption and decryption, digital signature, and key exchange are the three primary functions of a PKI.

RSS and elliptic curve algorithms provide all of the three primary functions: encryption and decryption, digital signatures, and key exchanges. Diffie-Hellmen algorithm supports key exchanges, while Digital Signature Standard (DSS) is used in digital signatures.

Public Key Encryption is the encryption methodology used in PKI and was initially proposed by Diffie and Hellman in 1976. The algorithm is based on mathematical functions and uses asymmetric cryptography, that is, uses a pair of keys.


The image above represents a simple document-signing function. In PKI, every user will have two keys known as "pair of keys". One key is known as a private key and the other is known as a public key. The private key is never revealed and is kept with the owner, and the public key is accessible by every one and is stored in a key repository.

A key can be used to encrypt as well as to decrypt a message. Most importantly, a message that is encrypted with a private key can only be decrypted with a corresponding public key. Similarly, a message that is encrypted with a public key can only be decrypted with the corresponding private key.

In the example image above, Bob wants to send a confidential document to Alice electronically. Bob has four issues to address before this electronic transmission can occur:
Ensuring the contents of the document are encrypted such that the document is kept confidential.
Ensuring the document is not altered during transmission.
Since Alice does not know Bob, he has to somehow prove that the document is indeed sent by him.
Ensuring Alice receives the document and that she cannot deny receiving it in future.

PKI supports all the above four requirements with methods such as secure messaging, message digests, digital signatures, and non-repudiation services.
Secure messaging

To ensure that the document is protected from eavesdropping and not altered during the transmission, Bob will first encrypt the document using Alice's public key. This ensures two things: one, that the document is encrypted, and two, only Alice can open it as the document requires the private key of Alice to open it. To summarize, encryption is accomplished using the public key of the receiver and the receiver decrypts with his or her private key. In this method, Bob could ensure that the document is encrypted and only the intended receiver (Alice) can open it. However, Bob cannot ensure whether the contents are altered (Integrity) during transmission by document encryption alone.
Message digest

In order to ensure that the document is not altered during transmission, Bob performs a hash function on the document. The hash value is a computational value based on the contents of the document. This hash value is known as the message digest. By performing the same hash function on the decrypted document the message, the digest can be obtained by Alice and she can compare it with the one sent by Bob to ensure that the contents are not altered.

This process will ensure the integrity requirement.
Digital signature

In order to prove that the document is sent by Bob to Alice, Bob needs to use a digital signature. Using adigital signature means applying the sender's private key to the message, or document, or to the message digest. This process is known as as signing. Only by using the sender's public key can the message be decrypted.


Bob will encrypt the message digest with his private key to create a digital signature. In the scenario illustrated in the image above, Bob will encrypt the document using Alice's public key and sign it using his digital signature. This ensures that Alice can verify that the document is sent by Bob, by verifying the digital signature (Bob's private key) using Bob's public key. Remember a private key and the corresponding public key are linked, albeit mathematically. Alice can also verify that the document is not altered by validating the message digest, and also can open the encrypted document using her private key.

Message authentication is an authenticity verification procedure that facilitates the verification of the integrity of the message as well as the authenticity of the source from which the message is received.
Digital certificate

By digitally signing the document, Bob has assured that the document is sent by him to Alice. However, he has not yet proved that he is Bob. To prove this, Bob needs to use a digital certificate.

A digital certificate is an electronic identity issued to a person, system, or an organization by a competent authority after verifying the credentials of the entity. A digital certificate is a public key that is unique for each entity. A certification authority issues digital certificates.

In PKI, digital certificates are used for authenticity verification of an entity. An entity can be an individual, system, or an organization.

An organization that is involved in issuing, distributing, and revoking digital certificates is known as aCertification Authority (CA). A CA acts as a notary by verifying an entity's identity.

One of the important PKI standards pertaining to digital certificates is X.509. It is a standard published by the International Telecommunication Union (ITU) that specifies the standard format for digital certificates.

PKI also provides key exchange functionality that facilitates the secure exchange of public keys such that the authenticity of the parties can be verified.
Key management procedures

Key management consists of four essential procedures concerning public and private keys. They are as follows:

Secure generation of keys—Ensures that private and public keys are generated in a secure manner.

Secure storage of keys—Ensures that keys are stored securely.

Secure distribution of keys—Ensures that keys are not lost or modified during distribution.

Secure destruction of keys—Ensures that keys are destroyed completely once the useful life of the key is over.

Type of keys


Private signature key—It is a private key of public key pairs and is used to generate digital signatures. It is also used to provide authentication, integrity, and non-repudiation.

Public signature verification key—It is the public key of the asymmetric (public) key pair. It is used to verify the digital signature.

Symmetric authentication key—It is used with symmetric key algorithms to provide assurance of the integrity and source of the messages.

Private authentication key—It is the private key of the asymmetric (public) key pair. It is used to provide assurance of the integrity of information.

Public authentication key—Public key of an asymmetric (public) pair that is used to determine the integrity of information and to authenticate the identity of entities.

Symmetric data encryption key—It is used to apply confidentiality protection to information.

Symmetric key wrapping key—It is a key-encryptin key that is used to encrypt the other symmetric keys.

Symmetric and asymmetric random number generation keys—They are used to generate random numbers.

Symmetric master key—It is a master key that is used to derive other symmetric keys.

Private key transport key—They are the private keys of asymmetric (public) key pairs, which are used to decrypt keys that have been encrypted with the associated public key.

Public key transport key—They are the public keys of asymmetric (public) key pairs that are used to decrypt keys that have been encrypted with the associated public key.

Symmetric agreement key—It is used to establish keys such as key wrapping keys and data encryption keys using a symmetric key agreement algorithm.

Private static key agreement key—It is a private key of asymmetric (public) key pairs that is used to establish keys such as key wrapping keys and data encryption keys.

Public static key agreement key— It is a public key of asymmetric (public) key pairs that is used to establish keys such as key wrapping keys and data encryption keys.

Private ephemeral key agreement key—It is a private key of asymmetric (public) key pairs used only once to establish one or more keys such as key wrapping keys and data encryption keys.

Public ephemeral key agreement key—It is a public key of asymmetric (public) key pairs that is used in a single key establishment transaction to establish one or more keys.

Symmetric authorization key—This key is used to provide privileges to an entity using symmetric cryptographic method.

Private authorization key—It is a private key of an asymmetric (public) key pair that is used to provide privileges to an entity.

Public authorization key—It is a public key of an asymmetric (public) key pair that is used to verify privileges for an entity that knows the associated private authorization key.