Sunday 27 November 2016

transition in css

To change property values smoothly, CSS transition can be used. CSS transition allows us to transform any rapid or sudden change in property values smoothly over a period of time.
The syntax for transition is : 
"transition: property duration timing-function delay;"
  • Property can be any value which is changing, be it be height, width etc.
  • The duration is the time over which the transition should take place.
  • Function is the way the transition would take place.
  • Delay specifies the time after which the transition period starts.
The example:
<style>
      transition: width 2s linear 2s
<style>
The above example will change the width linearly over the period of 2 seconds with an offset of 1second.    

The transition-function property can have the following values:
  • Linear:  Transition effect with the same speed from start to end.
  • Ease: Specifies a transition effect with a slow start, then fast, then end. slowly. This is default, if nothing is specified.
  • Ease-in: Transition effect with a slow start.
  • Ease-out: Specifies a transition effect with a slow end.

Friday 25 November 2016

WhatsApp Security - 1

Ever hesitated to share confidential details with your close ones over a phone call or a text message because of security reasons? Here's a messaging service which not only provides you with secured and protected message sharing over text messages but also over Internet calls: "WhatsApp". 

WhatsApp is something with which we all are familiar. Many of us use it daily for exchanging messages and all it uses is small Internet data. On March 31, 2016, WhatsApp came up with a release which supported end-to-end encryption of messages between sender and receiver. The end-to-end encryption protocol was designed by Open Whisper Systems. Private keys, Public Keys and Session Keys play a role in secure message exchange.The protocol is open source and available at: https://github.com/whispersystems/libsignal-protocol-java/. Lets take an overview of the protocol.

1. It all starts with installing the WhatsApp. During Installation time, the WhatsApp client generate public keys. These public keys gets stored at the WhatsApp server during client registration. At no time, WhatsApp have access to the private keys.

2. Next stage is session setup, which starts when a initiator (sender) sends the message to someone for the first time. This stage can be divided into two: Initiator session setup and Receiver session setup.

Initiator Session Setup
  • Initiating client request public key of the receiver. 
  • Server returns the public keys and Initiator saves them.
  • Initiator generates a master key using one of its public key, receiver's public keys and self generated Curve25519 key.
  • Initiator now generates Root Key (Session key) and Chain Key (Session key generated using Root key) using the master key.
  • Now sender sends its first message to the receiver with one of its public key (Identity Key) and self generated ephemeral Curve25519 key in the header of the message.
Receiving Session Setup 
  • Receiver also generates master key using own private keys and public keys received in the message header.
  • Receiver then generates its session keys using the master key.
3. Now comes Exchanging Messages after session setup. Clients exchange messages using Master Key (Session key generated using Chain Key). Message key allow encryption and authentication. Its changes for every message transmission and cannot be reconstructed after a message has been transmitted or received.

After all these WhatsApp also provide its users to verify the other user to whom they are communicating so that they are able to confirm an authorized user at the other side and no man-in-the-middle attack. WhatsApp provides this facility by QR code and a 60-digit number, which can be compared for verification.

In the later posts, we will discuss about the exchange of media, attachments, group messages and call setups.



Ref.: https://www.whatsapp.com/security/

Keep Learning...Keep Sharing..~~!!
Ta-Ta.

Sunday 20 November 2016

Mobile Networks

The mobile network didn't started with all those facility we see or use today. It all started with analog communication, known today as 1G network. Later with the advancement it was digitalised in the name of 2G. Then we saw 3G and 4G comming. We will discuss them all in detail:
1G: Stared in 1987, mobile commmunication was analog in nature. It worked as normal radio transmission. One could use 1G network for only calling purpose. The channel used for communication was split between users using FDMA technique. In FDMA (Frequency Division Multiple Access) the users are distributed over the network by spliting the fequency band. The available spectrum was divided in 30KHz band channels and each channel was dedicated for only one user. Though the same the same frequency channel was resued at other mobile user away from the user aleady using it. This concept is called as frequency reuse. The drawbacks of 1G was:
  • Not able to support the increasing number of users.
  • Security issues as it was analog in nature.
  • Disturbance, interference, background noise were the other concerns.
2G: 'G' means generation. So, the next generation of mobile network was named as 2G and previous was given the name 1G. (1G got its name after second generation was introdued. 2G was a jump from analog communication to digital communcation. Digitalization brought security, more clear voice, and transfer of data packets for the internet. 2G worked on TDMA. In TDMA (Time Division Mulple Access), each channel band was again didvied using time parameter, which helped in accomodating more number of users. 2G made possible to communicate with anyone around the globe. 2G brought so many possibilities but, it also had limitations.

Limitation with 2G will discussed in the next post, along with 3G and 4G.

Keep Learning, Keep Sharing..~~!!
Ta-Ta