Wednesday, November 11, 2015

Happy Diwali!

Wish you all a happy Diwali!
Let a billion lights shine,
And light a billion others.

Let's work towards a brighter, happier, open and more inclusive world.

A special request for my friends in Delhi NCR. Please cut down on crackers this year. For the sake of our children and our environment.

The radio this morning announced that the particulate level in chanakyapuri, the greenest area in Delhi was 200+ against recommended max 15 by WHO. Other areas is over 600. Tomorrow morning this number will be 1000+!

These quantities can cause lung cancer besides exacerbating problems for those who have breathing issues.

Please be considerate. Happy Diwali once again.

Thursday, July 16, 2015

Introducing Keybase + cryptography primer

First, visit: 

Why is this significant?
It marries social identities with public key cryptography and makes it accessible for all. And they just raised a $10M round from Andreessen Horowitz ;)

What's the catch?
It stores your private keys on their server based on a pass-phrase.

----------------------------------------------------------
Primer stuff (really basic 'how does this work?' stuff):
Cryptography relies on mathematics to ensure that two entities can have a trusted communication, which is the critical bedrock of all things digital and requiring trust. 
  
What's all this talk about public and private keys?
Assume that both of us have two keys each: One called the private key and the other called the public key. Also only you can see and use your private key but your public key is visible to all.

Just like physical keys are used to lock down and restrict access to physical assets, these digital keys help lock down and provide access to assets that are digital. A text message I send to you could be that digital asset that I need to protect. Unlike the physical world where we touch/ see/ hear each other and can simply talk to each other, in the digital world, we may be continents apart and there are no cues that can really help trust anything and everything digital can be easily manipulated.

So, assume really I need to send you a super secret message (eg: 'OMG. Pluto's on Pluto!') that ONLY you can read, I will first get YOUR public key, then use it to encrypt MY message and send it to you. By now the message will look like garbage for everyone else (eg: "23nfn32323n32djksgdsgdad3").

However, YOU and only you can use your private key and decrypt the gibberish into the original message ('OMG. Pluto's on Pluto!'). So, presto! I was able to send you a message to you that only you could read!

Cool, but you still don't trust me, what else can we do?
Now, when you read the message, there are two problems: 
One: How can you be really sure that the message was not changed by someone in transit?
Two: How can you be really sure that it was I who sent it? 

Maths to the rescue again!
There is a cryptographic tool called hashing. Hash is a function that provides one way conversion of any text into a unique signature. For example, 'Hello' hashed may look like '2nwfd3232'. If I make ANY change to my message eg: change 'Hello' to 'HellO' the hash will also change. Unlike encryption, hashes are one way. That is, it is not computationally easy to get back to Hello from just its hash.

So assume that instead of a plain and simple Hello, the text was a legal agreement that I sent to you. So once you receive it, all you need to do is to again hash the legal agreement and check if the hash provided by me was exactly the same as the one that you derived yourself using the agreement text. If both the hashes match, it proves mathematically that no changes were made to the document after I had hashed it.

What about problem Two mentioned above?
Just a little more of the same mathematical tools above should help here. Remember the hash that I just created a short while ago? I will encrypt that hash with my private key and send this as my digital signature along with the encrypted message to you. So, for you to verify that it was indeed I who sent the message, you decrypt it with my public key and then do the hash comparison as explained in the previous paragraph. If the hashes don't match, it means either that the message was tampered OR that it was not really sent by me.

So, a lot of mathematics and two pair of keys is what it takes for us to have a trusted, non-repudiable digital communication with each other. However, what was lacking was a robust and a simple set of tools that could hide all this complexity and make this ubiquitous in the digital world. Keybase seems to be a step in that direction!



Tuesday, April 21, 2015

I wish 10. Cats at Indian Traffic Signals

I wish we have traffic signals where cut-out cats pop-up on the road. No more plain red lights. Let me explain.


To anyone who has travelled on Indian roads, this should be pretty obvious; to others, it might sound fatally amusing. One thing that vehicle drivers in India seem inherently incapable of doing is stopping before the white lines drawn at traffic signals (that is if they decide to stop in the first place).

Thankfully, there is ONE thing that can stop almost all of them: cats. A cat crossing ones path is considered inauspicious (to put it mildly) and Indians would do anything to avoid being crossed thus! A larger animal's cut-out; a cow's for instance, would have been eminently more visible, but that would not have served the purpose since the holy cows are considered very much a part of the road ecosystem and people are adept at swerving right past them.

Note: No animals were harmed or intended to be harmed for this post. The cut-outs could very well be made of indestructible silicon, latex and fibreglass sheets.

The 'I wish' series will be short posts highlighting simple, interesting, innovative and useful twists to daily random routines and objects. 

Tuesday, February 24, 2015

My song

Past slow streams, and paddy plains,
A gentle breeze, the drizzling rain,
A blue-bird tries catch-up in vain,
To a soulful beat, my rocking train

Back ten years, my numb mind panes,
A time that sure no more remains,
Had no money and had no pains,
Nor plans beyond the morrow made,

When music was the sole refrain,
And dreams my waiting soul had gained,
To love, I was not yet ordained,
Just longings that were best contained,

In the sleepy city, along the drain,
My good 'ol car, on a narrow lane,
Driving with the rolled down panes,
Humming a tune the radio made,

Next to me, the guitar he played,
My fingers drummed on the wheel splayed,
On a sharp high note, our voices strained,
In my head they'd still remained!

A thousand miles about to end,
Round the last corner, the rail-road bends,
Draws up to the station almost spent,
In my notebook, these words I pen:

If there'd be something that I could ask of life,
That'd be to make music when the sun shines,
'Cause when the night falls and darkness stays,
While I sleep, I'd hope my song still plays.

- A
V

Thursday, October 23, 2014

Don't let the festival of noise kill the festival of light

Diwali or Deepawali, the festival of light symbolizes the victory of light over darkness.

Thus goes a beautiful prayer [source]:

Thamasoma jyothirgamaya, From darkness, lead to light,
Asathoma sadgamaya, From untruth, lead to truth,
Mrityoma amritamgamaya, From death, lead to life,
Om shanti, shanti, shantihi, Let there be peace, peace, peace

Diwali today has unfortunately turned unto an occasion that leads to more distress than peace. People with heart ailments, asthmatics, infants and animals will have a tough time today. There will be death and injury due to improper and unsafe use, transfer and manufacturing of crackers. There will be loud bangs and dark clouds of smoke instead of light.

A lot of money [Rs. 5000 crore+] is going to be literally burnt today. Crass commercialization has claimed this celebration too!

Don't let a festival of noise and pollution kill the beautiful festival of light. Do your bit to reverse this trend. For those who have not yet lighted the flames to your bundle of bank notes, please head to http://www.giveindia.org/ and see how you can really light up someone's life with the same money you were about to burn. Buy little diyas from the potters on the street-side and decorate your house with them.

Trust me, you will be happier :)

Happy Diwali!

Saturday, October 11, 2014

The Demo Demon

They say that a demon lurks within every demonstration and its a good friend of Murphy's. Ha! I say...


Thursday, April 10, 2014

Mirror, mirror on the wall, who's the most corrupt of them all?

"Mirror, mirror, on the wall, who's the most corrupt of them all?"
There is this story from the Bible [John 8: 1-11], of a 'condemned' woman, about to be stoned as the 'rules' then required, being brought infront of Jesus. His simple response was to ask anyone from the crowd who had never sinned, to throw the first stone. Each one of the accusers slithered away.

I tried to imagine. If this incident had happened in the world we are living in today, not only would she have been stoned by the very people who had 'caught' her, each one of them; her captors would most likely also have been her past clients. One could almost mistake hypocrisy for a virtue these days!

A case in point: It has apparently become fashionable for Indians to accuse India of being very corrupt. The problem is that most of us seem to look elsewhere for an answer. Maybe its an overdose of Harry Potter movies on our cable TVs? We seem to be searching for a magic wand. And perhaps a magic mantra to go along- 'arrestus corruptus'? Perhaps its an overdose of Hollywood. We seem to be waiting for super-heroes to set this right. Well, super-heroes are fictional. Maybe a few larger than life political netas could do instead? Yeah! Hmm..maybe! Bingo! We need 'em laws to set us right! Draft 'em bills! A thousand pages at font ten, no less! Smirk! How dare I corrupt now?

Considering the length and breadth of some of the scandals that have been unearthed in the recent past, one could be forgiven for expecting a miracle. Unfortunately, that miracle needs to start from within: within each of us. That is exactly where it gets tough. Really tough. We're so mired in the muck that its almost become second nature. Pigs don't think they get dirty when they frolic in the sewer, they kinda enjoy it! Asking pigs to suddenly behave like royal felines is TOUGH. Tough is an understatement. It needs a miracle!

And miracles do happen. I believe in miracles. This one starts with a simple mirror. And me. And you. And a little bit of introspection. 

Just ask the man or the woman in the mirror. He or she has all the answers.
"Or how can you say to your brother, 'Let me take the speck out of your eye,' and behold, the log is in your own eye? You hypocrite, first take the log out of your own eye, and then you will see clearly to take the speck out of your brother's eye." [Mathew 7: 1-5]

Thursday, March 27, 2014

The Fly

There was once a fly,
Shown a beautiful sky,
Thrown a wonderful pie,
O'er joyed! it tried,
Flew higher and high,
Till the lights drew nigh;
Then hit a damn glass ceiling!

Tried harder than hell,
Cast all the spells,
Rang all the bells,
But down it fell,
Godspeed him well!
What could it tell?
Kept hitting that damn glass ceiling!

No longer a kid,
Evolve it did,
Diamond claws it hid;
The skies now lit,
This time it flew,
Fast as it could;
@###, who removed the damn ceiling?!

Moral of the poem is: Always wear a helmet before you fly.

Friday, March 14, 2014

Can a facebook post be defamatory?

The world wide web represents democratization of news and views. The sheer freedom it provides as an independent platform above and beyond geographic boundaries sometimes makes its users forget that they still need to operate within the limits imposed by the laws of the land they are otherwise governed by.

I came across this interesting site http://www.facebooklaw.in published by some Asian School of Cyber Laws. It is an interesting portal which lists out a few dos and donts based on Indian laws. The gist is as follows: "Before posting on Facebook, ask yourself one question - If this comment were about my family, or me, would I be offended? If your answer is yes, DO NOT post." Read this short document they have put up to get a broad sense of what this is all about: https://www.dropbox.com/s/hehaj7lrfkx8s8e/facebook_law_in_india.pdf

There are of course exemptions where the defendant could prove that his words were factual or for greater public good. But it also points out that if the words incite undue tensions in a particular group of people, it could be considered defamatory. While on one hand this law may be used by the powerful to quiet voices of legitimate criticism, on the other hand it empowers people to protect their dignity if they feel offended.

I learnt that it is good to be aware of the following sections under the Indian Penal Code (I am no lawyer and do not understand much beyond the plain English extracts here. Also read the Cyber Crimes link at the very last):

Section 469. Forgery for purpose of harming reputation

(Some people may forge an identity to post something defamatory. This apparently is in itself wrong.)

Whoever commits forgery, 1[intending that the document or Electronic Record forged] shall harm the reputation of any party, or knowing that it is likely to used for that purpose, shall be punished with imprisonment of either description for a term which may extend to three years, and shall also be liable to fine....

Section 499. Defamation

(Can't offend. There are exceptions of course. Read the indiankanoon link above)

Whoever, by words either spoken or intended to be read, or by signs or by visible representations, makes or publishes any imputation concerning any person intending to harm, or knowing or having reason to believe that such imputation will harm, the reputation of such person, is said, except in the cases hereinafter expected, to defame that person....

Section 504. Intentional insult with intent to provoke breach of the peace

(Can't intentionally provoke)

Whoever intentionally insults, and thereby gives provoca­tion to any person, intending or knowing it to be likely that such provocation will cause him to break the public peace, or to commit any other offence, shall be punished with imprisonment of either description for a term which may extend to two years, or with fine, or with both.

Section 505. Statements conducing to public mischief

(No rumor mongering)

1[505. Statements conducing to public mischief.—2[(1)] Whoever makes, publishes or circulates any statement, rumour or report,—

 (a) with intent to cause, or which is likely to cause, any offi­cer, soldier, 3[sailor or airman] in the Army, 4[Navy or Air Force] 5[of India] to mutiny or otherwise disregard or fail in his duty as such; or

 (b) with intent to cause, or which is likely to cause, fear or alarm to the public, or to any section of the public whereby any person may be induced to commit an offence against the State or against the public tranquility; or

 (c) with intent to incite, or which is likely to incite, any class or community of persons to commit any offence against any other class or community,

shall be punished with imprisonment which may extend to 6[three years], or with fine, or with both.

Section 507. Criminal intimidation by an anonymous communication

(No anonymous threatening)

Whoever commits the offence of criminal intimidation by an anonymous communication, or having taken precaution to conceal the name or abode of the person from whom the threat comes, shall be punished with imprisonment of either description for a term which may extend to two years, in addition to the punishment provided for the offence by the last preceding section.

Related:
1. WSJ article: http://blogs.wsj.com/indiarealtime/2012/11/15/inside-law-how-defamation-works-in-india/
2. Shantanu Basu http://www.slideshare.net/shantanu_leo/defamation-law-in-india
3. Cyber crimes http://www.alertindian.com/node/5