Volume 1, Issue 6, August 2012
—In today‘s era, almost every single organisation uses a computer and has a computer network to send, receive and store information. Whether it‘s sending emails, storing documents, or serving information through a web server, it is very important to focus on security, especially if your network contains sensitive, confidential and personal information. Now a day‘s Security of network transmission became a vital aspect, because the major security risks occur while conducting business on the Net; the following are some of the security risks occur: Unauthorized-Access, Eavesdropping,
Password Sniffing, Denial of Service, Data modification,
Repudiation and Replay Attack.
There are no.of methods for securing the information. One such method to secure the information is Cryptography. It Protects data transmitted over the network lines, is mainly through appropriate Encryption techniques. The subject Cryptography deals with the encryption and decryption procedures.
Our aim is to provide a Secure & Authenticated Transmission by building Secure Channel. In this paper we proposed a method by which we can provide both Message Authentication and confidentiality by using Very Simplified Secure Protocol.
Index Terms: Security, Secure channel, Cryptography, Digital Signature, Very Simple Secure Protocol (VSSP)
In any modern network, there is a need for security. However, the current internet environment without integrating with security mechanisms has a number of security problems and lacks effective protection and integrity of data transferred over the network. The networking communication will be exposed to all kinds of attacks in such an open hostile environment. The purpose of this paper is to explain how to build a secure channel to transmit the data. We used the structure of a Very Simple Secured Protocol (VSSP) that sits above the TCP/IP layer to build secure channel for transmission of data. This paper is based on lectures given by Prof. Amir Herzberg and the book "SSL and TLS" by Eric Rescorla.
Manuscript received August 20, 2012.
Ramakrishna Mathe, Department of Computer Science & Engineering, Malineni Lakshmaiah Women’s Engineering College. Guntur, INDIA, Phone/ Mobile No:897865277
Veera Raghavarao Atukuri, HOD, Department of Computer Science & Engineering, Malineni Lakshmaiah Women’s Engineering College, Guntur, INDIA.
Chiranjeevi Mathe, Department of Computer Science & Engineering, Chebrolu Engineering College, Chebrolu, INDIA, Phone/ Mobile No. 9949930031.
Venu Babu Panchumarthi, HOD, Department of Information Technology, Malineni Lakshmaiah Women’s Engineering College, Guntur, INDIA, Phone/ Mobile No. 9966441069.
1.1 Introduction to security:
Security is a fundamental component of every network design. When planning, building, and operating a network, you should understand the importance of a strong security policy. A security policy defines what people can and can't do with network components and resources.
1.2 Need for Network Security:
In the past, hackers were highly skilled programmers who understood the details of computer communications and how to exploit vulnerabilities. Today almost anyone can become a hacker by downloading tools from the Internet. These complicated attack tools and generally open networks have generated an increased need for network security and dynamic security policies.
With the development of large open networks, security threats have increased significantly in the past two decades. Hackers have discovered more network vulnerabilities, and because you can now download applications that require little or no hacking knowledge to implement, applications intended for troubleshooting and maintaining and optimizing networks can, in the wrong hands, be used maliciously and pose severe threats.
Every organization needs secrete code to hide information while revealing some secret to another person without being acknowledged by the third. For example if the word ‗krishna‘ is to be sent to other secretly just add ‗ra‘ before word, but so that receiver can easily decode it. The generic name for the collection of tools designed to protect the data and to thwart hacker is computer security.
The Network security measures are needed to protect data during their transmission.
1.3 Types of Attacks: Security Attacks
Not only do you have to focus on security, you also have to be aware of the types of security attacks that can happen on your computer network. Before we go on to discuss about the types of security attacks, an attacker may aim to do one of the following:
Interruption – Interruption is an attack on availability such as a denial of service attack (or DOS). An interruption attacks‘ aim is to make resources unavailable. Not to long ago, Wordpress.com, a popular Blog Hosting Site was faced with a DOS attack taking down the servers so the service was unavailable to its users
Interception – Interception is an attack to gain
unauthorized access to a system. It can be simple eavesdropping on communication such as packet sniffing or just copying of information
Modification – Modification is an attack that tampers with a resource. Its aim is to modify information that is being communicated with two or more parties. An example of a
Implementing Secure Channel for Data Transmission
modification attack could be sending information that was meant to go to one party but directing it to another. Fabrication – A Fabrication attack is also known as
counterfeiting. It bypasses authenticity checks, and essential is mimicking or impersonating information. This sort of attack usually inserts new information, or records extra information on a file. It is mainly used to gain access to data or a service.
Keeping the above in mind, there are two main types of attacks whose aim is to compromise the security of a network – Passive Attack and an Active Attack.
A passive attack can be split into two types. The first type of passive attack is to simply monitor the transmission between two parties and to capture information that is sent and received. This is called as snooping. The attacker does not intend to interrupt the service, or cause an effect, but to only read the information. The second type of attack is a traffic analysis. If information is encrypted, it will be more difficult to read the information being sent and received, but the attacker simply observers the information, and tries to make sense out of it; or to simply determine the identity and location of the two communicating parties. A passive attack is usually harder to detect as there is little impact to the information communicated.
On the other hand, an active attack aim is to cause disruption, and it is usually easily recognized. Unlike a passive attack, an active attack modifies information or interrupts a service. There are four types of an active attack:
Masquerade – To pretend to be someone else. This could
be logging in with a different user account to gain extra privileges. For example, a user of a system steals the System Administrators username and password to be able to pretend that they are them
Modification – To alter the information being sent or received
Denial of service – To cause a disruption to the network Reply – To capture information to send it, or a copy it
elsewhere. i.e., it is a form of network attack in which a valid data transmission is maliciously or fraudulently repeated or delayed. This is carried out either by the originator or by an adversary who intercepts the data and retransmits it, possibly as part of a masquerade attack by IP packet substitution.
The goal of this paper is to provide a communication channel where both the users can have a safe transmission of important data and avoid Reply and Masquerade attacks.
2.1 Introduction to cryptography:
Cryptography is a key technology in electronic key systems. It is used to keep data secret, digitally sign documents, access control, and so forth. Users therefore should not only know how its techniques work, but they must also be able to estimate their efficiency and security.
Cryptography is the ancient science of encoding messages so that only the sender and receiver can understand them. Cryptography is used to secure telephone, Internet, and email
communication and to protect software and other digital property. Cryptography involves to processes. They are Encryption and Decryption.
Encryption is the science of changing data so that it is unrecognizable and useless to an unauthorized person. Decryption is changing it back to its original form.
To complete these two tasks most securely, we use a mathematical algorithm and a variable value known as a 'key'. The selected key is input on encryption and is integral to thechanging of the data. The EXACT same key MUST be input to enable decryption of the data.
Cryptography is now available to everyone thanks to the development of modern computers, which can perform more mathematical operations in a second than a human being could do in a lifetime. An ordinary PC can produce codes of such complexity that the most powerful supercomputer using the best available attack algorithms would not break them in a million years.
2.2 Classical Cryptography:
Existing cryptographic techniques are usually identified as ―traditional‖ and ―modern‖. Traditional techniques date back for centuries and use operations of coding (use of alternative words or phrases), transposition (reordering of plaintext), and substitution (alteration of plaintext characters). Traditional techniques were designed to be simple, for hand encoding and decoding. By contrast, modern techniques use computers, and rely on extremely long keys, convoluted algorithms, and intractable problems to achieve assurances of security.
There are two branches of modern cryptographic techniques: public key encryption and secret key encryption. In Public Key Cryptography (PKC), as mentioned above, messages are exchanged using an encryption method so convoluted that even full disclosure of the scrambling operation provides no useful information for how it can be undone. Each participant has a ―public key‖ and a ―private key‖, the former is used by others to encrypt messages, and the latter is used by the participant to decrypt them. The widely used RSA algorithm is one example of PKC. Anyone wanting to receive a message publishes a key, which contains two numbers. A sender converts a message into a series of digits, and performs a simple mathematical calculation on the series using the publicly available numbers. Messages are deciphered by the recipient by performing another operation, known only to him. In principle, an eavesdropper could deduce the decryption method by factoring one of the published numbers, but this is chosen to typically exceed 300 digits and to be the product of only two large prime numbers, so that there is no known way to accomplish this factorization in a practical time.
Volume 1, Issue 6, August 2012
might make it more vulnerable, but increases in the size of the key can be used to offset this.
The main practical problem with secret key encryption is exchanging a secret key. In principle any two users who wished to communicate could first meet to agree on a key in advance, but in practice this could be inconvenient. Other methods for establishing a key, such as the use of secure courier or private knowledge, could be impractical for routine communication between many users. But any discussion of how the key is to be chosen that takes place on a public communication channel could in principle be intercepted and used by an eavesdropper. For solving this is the appointment of a central key distribution server. Every potential communicating party registers with the server and establishes a secret key. The server then relays secure communications between users, but the server itself is vulnerable to attack. Another method is a protocol for agreeing on a secret key based on publicly exchanged large prime numbers, as in the Diffie Hellman key exchange. Its security is based on the assumed difficulty of finding the power of a base that will generate a specified remainder when divided by a very large prime number, but this suffers from the uncertainty that such problems will remain intractable.
2.3 Problem of improper communication?
If we perform communication over insecure channel, there is great threat to no.of attacks. One such attack is Replaying. This is illustrated with a good example, can be a treasure map that Alice sent to her best friend Bob. This map describes the steps needed in order to reach the treasure. Eve the intruder hates Bob, and does not want to see him become rich. Since the map is encrypted, Eve cannot read the instructions, but she does not have to. All she needs to do is to change the map. She does not care how the changes will affect it, e.g.:
Steps Steps (encrypted)
Go to the water tower R28gdGhlIHRoZSB3YXRlciB0b3dlci4= Turn right and walk
Turn left and walk 90 steps
Dig 2 meters RGlnIDIgbWV0ZXJz
Table 1: The Original Map from Alice to Bob
But the intruder the Eve All she did was to duplicate the third instruction, and by doing so, she destroyed the map. If Bob cannot tell that the map was altered, all the encryptions in the world will not help him find the treasure. As you can see, Bob needs a way to check that no one altered the message.
Steps Steps (encrypted)
Go to the water tower R28gdGhlIHRoZSB3YXRlciB0b3dlci4=
Turn right and walk 100 steps
Turn left and walk 90 steps
Turn left and walk 90 steps
Dig 2 meters RGlnIDIgbWV0ZXJz
Table 2: Altered map data by Eve
Let us change the example. Eve wants to send Bob to a goose chase. She fabricates a treasure map, and sends it to
him. Bob has no way to know that Eve sent him the map and not Alice. If Bob can authenticate somehow the origin of the map, then he can dismiss it as fake the moment he discovers that it did not come from Alice. So, in summary, a secure channel can protect the data from these modifications. A secure channel must have at least three properties:
Encryption, Message validation, Message authentication
2.3.1. Building a basic secure channel
Alice and Bob share a private key (it does not matter how they did it for now), and they want to create a secure channel in order to send a message.
e = encrypt (k, t) d = digest (k, e) m = e + d send to Bob (m) Bob:
(e, d) = m
if (digest (k, e) = = d) t = decrypt (k, e) else
Does this basic secure channel achieve the three properties that we have defined?
1.Encryption – Yes. Bob and Alice share a private key. They use a symmetric encryption algorithm.
2.Message validation – Yes. Bob and Alice use a digest algorithm (HMAC).
3.Message authentication – Yes. Because Bob and Alice share a private key, no one else can use this key to forge a message. The underlying assumption here is that both Alice and Bob‘s machines are secure and no one else has access to this key.
There is one basic flaw in the above algorithm, the assumption that Alice and Bob manage to share a private key. It is not always possible, so is there a way to remove this assumption? Asymmetric encryption comes to the rescue.
initiate connection to Bob over TCP/IP // as_k stands for asymmetric public key as_k = gets from Bob
k = create a random key
encrypted_key = as_encrypt (as_k, k) send to Bob (encrypted_key)
e = encrypt (k, t) d = digest (k, e) m = e + d send to Bob (m) Bob:
initiate connection with Alice over TCP/IP send to Alice (as_k)
encrypted_key = gets from Alice
// as_pk stand for asymmetric private key. k = as_decrypt(encrypted_key, as_pk) (e, d) = m
if (digest (k, e) == d) t = decrypt (k, e) else
By using asymmetric encryption, Bob can now send his public key to Alice. She, in turn, will use it to encrypt the shared secret (marked as k in the pseudo code above), which will be used as the key for the symmetric encryption and digest algorithms.
Does this basic secure channel achieve the properties that we defined?
1. Encryption – Yes. Bob and Alice share a private secret. They use a symmetric encryption algorithm. 2. Message validation – Yes. Bob and Alice use a
digest algorithm (HMAC). 3. Message authentication – No.
What will happen if Eve intercepts the public key and instead sends her own? Thus, Alice cannot be sure who actually sent her the public key. Without knowing it, Alice can accidently share the private secret with Eve. In consequence, when the private secret is compromised, the entire channel is broken.
Certificate and Certificate Authorities (CA) can help us to authenticate the public key. As a substitute for the public key, Bob sends a certificate. The certificate is signed by a trusted party (usually the CA). It binds the public key to a DNS name. Now, Alice can authenticate the public key.
III. PROPOSED METHOD
The above algorithm is using TCP/IP as the underlying transport layer. It has a significant influence on how the secured channel manages its connection. TCP/IP is responsible for ensuring that data packets are sent to the endpoint and assembled in the correct order when they arrive. This assumption removes a lot of overhead from our proposed secured channel.
The following paragraphs will demonstrate a real secured channel called VSSP (Very Simple Secured Protocol), which is a simplified version of SSL/TLS.
Figure 1: TCP/IP Top View
The entire session between a client and a server can be divided into three parts:
1. Handshake - Where the client and the server agree on cryptographic algorithms that will be used, and authenticate each other.
2. Data transfer - Where the real data is transferred, i.e., files, text, etc.
3. Closure - Ending the connection in a secured manner.
In the above algorithms, the assumption is that encrypt, decrypt are known to the client and server but it is not always true. Both client and server need to agree on a set of algorithms that will be used during the entire connection. Try to imagine that not all clients and servers are running the same version of our protocol. Newer versions will include more powerful instances of cryptographic algorithms, stronger keys, or totally different algorithms. We have to ensure that both the client and the server talk in the same language. The handshake phase assures that the authentication occurs during the handshake. There are two types of authentication: server authentication and client authentication. Server authentication happens when the client asks from the server to authenticate itself, and vice versa for client authentication. Authentication in VSSP uses Public Key Infrastructure (PKI), i.e., certificates and only supports server authentication.
Figure 2: Handshake protocol of TCP/IP Handshake protocol phases:
The Hello Client message initiates the connection. It contains two parameters.
The first is a random value (nonce) that is used as a seed to the Key Derivation Function (KDF). The purpose of the random value is to stop an attack known as a replay attack . In a replay attack, the attacker can retransmit all of the client's messages and cause the server to think that the client is sending the message again. By using the random value, the client and the server can be sure that each new session will be unique.
The second is a list of supported suites. A suite is a collection of cryptographic algorithms that will be used during a session. Each suite is composed of four algorithms: asymmetric key algorithm, symmetric algorithm, digest algorithm, and a compression algorithm. When the server receives the Hello Client message and it is willing to accept the connection, it replies with its own Hello Server message.
Volume 1, Issue 6, August 2012
it supports out of the list of suites sent by the client. Note that the server does not necessarily support all of those suites. Powerful, usually, means better encryption algorithms (3DES over DES) or stronger keys (2048 over 1024). Pay attention to the fact that an attacker that wants to intercept the session can change the list of suites sent to the server and remove all powerful algorithms so that the server will choose the weaker one. That weakness is something that the secured channel protocol must deal with, and it will be reviewed later on. The third parameter is a certificate. The certificate contains the public key that will be used during the key exchange, but it also allows the client to validate the server. The current implementation sends an X509 certificate . Phase 2
Figure 3: Key Generation Process
Asymmetric encryption is slow compared to symmetric encryption, so instead of encrypting everything using asymmetric encryption, just encrypt a shared secret (private key). The private key will be used as the key for the symmetric encryption. In this phase, the client encrypts a shared secret using the public key (that was transmitted as part of the certificate in the former phase) and sends it to the server. The shared secret is used not only as a private key for a single algorithm, but as a mold from which the client and the server derive other private keys.
preMaster = Create premaster
keysalt = random server bits + random client bits masterKey = prf(preMaster, salt)
send masterKey to server iv = empty array key = empty array hmackKey = empty array
kdf (masterKey, iv, key, hmacKey)
The pseudo code describes how to create the final keys that will be used to initialize the algorithms that were defined in the chosen suite. The preMaster is a long randomly generated array of bits. The salt is a concatenation of the random values generated by the server and the client in phase1. Both of these values are parameters of PRF (Pseudo Random Function) . The PRF expands the preMaster into a new random value called the masterKey, and from it, we can now derive our various keys. The VSSP uses the RFC2898DeriveBytes class which implements
password-based key derivation functionality. The IV is the initialization vector used for CBC (Cipher Block Chaining) symmetric encryption algorithms, and the hmacKey is the key used for HMAC digest algorithms. KDF (Key Derivation Function) takes the master key, and creates from it the various keys. In VSSP, KDF is simplified, it just ―cuts‖ the appropriate byes (see Figure 3). The server side does exactly the same except for the fact that it does not create the premaster key but receives it from the client.
The entire handshake process does not use any cryptographic or digest algorithm in order to encrypt the messages or validate their integrity. Only after the second phase the cryptographic algorithms are initialized, therefore it is impossible to use them before.
The messages were sent so it is quite useless to encrypt then, but it is perfectly reasonable to validate their integrity. In order to do so, we need to check if any of them where changed by an attacker. Both the client and the server save all the messages that they received and sent. They can run a digest algorithm (created in the last phase) on the sent messages and send it to the other side. The other side compares the digest that it received to the digest that it just calculated on the received messages. If the two digests are equal, then the entire process is valid, otherwise something interfered and there is a need to break the connection. After the handshake is done, the real data can now be sent.
3.1.2. Data transfer
Figure 4: Message formation Process
Data is segmented into VSSP packets. Each packet has a header, payload, and a digest. The header consists of the following values:
VSSP magic number.
VSSP version – the version of the current protocol. Message type - has several values that indicate what the
content of the message is.
header = create_header (t) comp = compress (t) e = encrypt (comp, k)
d = digest (k, header + e + sent_counter) m = header + e + d
sent_counter++ tcpSend (m)
header = extract_header (m) if header is valid
receive_counter++ (k, d) = m
if (digest (k, header + e + receive_counter) == d) comp = decrypt (k, e)
t = decompress (comp) else
error else error
Compression is used in order to reduce the total size of the packet. Compression is being done before encryption for the sole reason that encryption (a good one) creates a totally random data, and totally random data cannot be compressed. Counters
VSSP uses TCP/IP as the underlying transport layer. Keeping packet order is done by the transport layer; however, a clever adversary can retransmit the same VSSP packet. In order to avoid such a situation, a counter is used. Both the client and the server keep track of send and receive counters. Whenever a message is received, the receive counter is increased by 1, and whenever a message is sent, the sent counter is increased by 1.
Closure is a special type of message that is sent by either side to indicate the termination of the session. The purpose of closure is to avoid a situation where an adversary closes a connection in the middle – truncation attack. Alice wants to send Bob a message about how many steps to take in order to reach the treasure. The number of steps needed is 1000, and each digit is encapsulated in a single packet. Eve intercepts the message and closes the connection just before the last 0. Bob will think that the number of steps is 100 and not 1000.
Network security affects many organizations, whether they are large, small, or government organizations. If network security is breached an intruder can do all sorts of harm. That is why people need to be aware of and to be educated about network security and how to secure their computer and network. Systems are required to be updated regularly as new security flaws are discovered. Without being up to date, it makes it easy for a hacker to gain unauthorized access to the system.
In this paper, we develop a secure channel scheme based on VSSP (Simplified version of SSL/TLS) for more efficient and secure transmission of the data. Reliability and security are achieved by adapting the strong algorithms at different
phases in TCP/IP transmission, because our protocol simply sits on-top of TCP/IP. Simulation results show the relevance and superior performance of the proposed scheme compared with the traditional data transmission system. We demonstrated a simple implementation of a secured channel and explained the theory behind it.
V. EXPERIMENTAL RESULTS
These are the experimental results conducted by authors.
Figure 5: Starting a Secure Channel
Figure 6: Session Started
Figure 7: Sharing text messages between Client and Server
Volume 1, Issue 6, August 2012
Figure 9: File sent to Server successfully
Figure 10: Closing of connection channel
Figure 11: Secure channel closed successfully
I thank Dr. D. Srinivasa Kumar, for his helpful feedback on this work. I would also like to thank my family and friends who encouraged me in doing this work.
 Introduction to secure communication and commerce 89-690  SSL and TLS by Eric Rescorla
 Cryptography 101 for the .NET Framework  Diagrams where created using Gliffy
 Replay attack: http://en.wikipedia.org/wiki/Replay_attack  X509 certificate: http://en.wikipedia.org/wiki/X.509  Pseudorandom Function Family
M. RAMAKRISHNA M.Tech, published 6 papers in various International Journals, member of IEEE, Certified by Microsoft (MCSA) and CISCO (CCNA), Areas of interest: Computer Networks, Network Secuirty.
A.V. RAGHAVA RAO B.Tech, M.Tech. (Ph.D). currently doing research in Cloud Computing Security Issues. Member of IEEE. He Published 4 papers in various International Journals. Currently working as Head of the Department, CSE, Malineni Lakshmaiah Women‘s Engineering College, Guntur.
M. CHIRANJEEVI pursing M.Tech in Chebrolu Engineering College. Got 2nd Place in MCA from IGNOU.