Monday, October 7, 2013

SSL and HTTPS

Communications over networks or internet could become very insecure if the proper secure measures are not in place. This could be critical for applications like payment transactions on the web, causing losses of millions of dollars to the customer and the enterprise. This is where SSL and HTTPS come in. SSL is a cryptographic protocol used to provide security to communications above transport layer. HTTPS is a combination of HTTP and SSL that can cerate secure channels over insecure networks.
What is SSL?
SSL (Secure Socket Layer) is a cryptographic protocol that is used to provide security for the communications taking place over the internet. SSL uses asymmetric cryptography to preserve privacy and message authentication codes for ensuring the reliability for all the network connections above the transport layer. SSL is widely used for web browsing, email, faxing over internet, IM (instant messages) and VoIP (Voce-over-IP). SSL was developed by Netscape Corporation and it was succeeded by TLS (Transport Layer Security). SSL 2.0 was released in 1995 (version 1.0 was never released to public), and version 3.0 (released a year layer) replaced the version 2.0 (which had several significant security flaws). Later, TLS was introduced as SSL 3.1. The current version is SSL 3.3, which is mostly identified as TLS 1.2. SSL encapsulates the application layer protocols like HTTP, FTP and SMTP by being implemented over the transport layer. Traditionally it has been used with TCP (Transmission control Protocol) and to a lesser extent with UDP (User Datagram Protocol). SSL is used with HTTP to obtain HTTPS, which uses public key certificates to identify endpoints for the applications such as e-commerce.
What is HTTPS?
HTTPS (HTTP Secure) is a protocol created by combining HTTP (HyeperText Transfer Protocol) and SSL/TLS protocols. HTTPS provides secure communication by encryption and identifies end points of the connections making it ideal for applications like payment transitions on WWW (World Wide Web) or sensitive transactions in corporations. Basically, HTTPS can create a secure connection through an insecure network. If the used cipher suites are adequate and the server certificates are trusted, then these HTTPS secure channels will safeguard against eavesdroppers and Man-in-the-Middle attacks. But, even if HTTPS is used, the user can guarantee that the channel is fully secure only if all the following conditions are satisfied: browser implements HTTPS correctly with CAs (Certificate Authorities), CAs only vouch for legitimate sites, the certificate provided by the site is valid, web site is correctly identified by the certificate and finally, intermediate hops are trustable. All modern browsers warn users if they receive invalid certificates from the web sites. Of course, the user is given the option of continuing further at her own risk.
What is the difference between SSL and HTTPS?
Main difference between SSL and HTTPS is that SSL is a cryptographic protocol, while HTTPS is protocol created combining HTTP and SSL. But, sometimes, HTTPS is not identified as a protocol per se, but a mechanism that merely uses HTTP over encrypted SSL connections. In other words, HTTPS uses SSL to create a secure HTTP connection. Because of encryption provided by SSL, HTTPS is able to withstand eavesdropping and man-in-the middle attacks.

Wednesday, July 24, 2013

Adding VLAN information in Linux

One day I had a need to add a VLAN tag to one of my Linux test PC. Basically I wanted traffic generated by my linux to be tagged with a VLAN. That's where I found some information and the easiest way worked for me was to use 'vconfig' command. Following is the procedure:

Add VLAN ID 5 with follwing command for eth0:
# vconfig add eth0 5
The vconfig add command creates a vlan-device on eth0 which result into eth0.5 interface. You can use normal ifconfig command to see device information:# ifconfig eth0.5Use ifconfig to assign IP address to vlan interfere :
# ifconfig eth0.5 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 upGet detailed information about VLAN interface:
# cat /proc/net/vlan/eth0.5If you wish to delete VLAN interface delete command:
# ifconfig eth0.5 down
# vconfig rem eth0.5

Wednesday, May 23, 2012

Some C Programs

Found a good collections of C programs. Follow the links provided below and practice them to improve your programming skills. 
http://condor.depaul.edu/mkalin/ed3/
http://condor.depaul.edu/mkalin/cse/
Tips
  • Try to write these programs on your own and keep above links for your reference
  • Edit and debug programs, its the best way to learn programming.

Friday, May 4, 2012

Three Ways to Web Server Concurrency

Multiprocessing, multithreading and evented I/O: the trade-offs in Web
servers.
A Web server needs to support concurrency. The server should service clients in a timely, fair manner to ensure that no client starves because some other client causes the server to hang. Multiprocessing and multithreading, and hybrids of these, are traditional ways to achieve concurrency. Node.js represents another way, one based on system libraries for asynchronous I/O, such as epoll (Linux) and kqueue (FreeBSD). To highlight the trade-offs among the approaches, I have three echo servers written in close-to-the-metal C: a forking_server, a threading_server and a polling_server.
Click here to know more