24 February, 2013

Random Oracle Model ~~ Life

For those who are new to this term "Random Oracle Model" let me give a gist.

Given a query this model returns a result for the query. But how does it return ?
If it has already seen the query it just returns the result in O(1) else it does a lookup operation in evaluating and returning the result.

It can be interpreted as some way of permanent caching and is used in almost all cryptographic algorithms.For more info check this http://en.wikipedia.org/wiki/Random_oracle.

Then I thought about the way we live our life. It sounded similar to me. May be these models were invented by those who were able to model these data structures based on their personal life or i'm  a douche :)

Anyways, this is the thing. Everyone should be having a similar example in their life. We come across many persons in our life. We do maintain a cache for those people with whom we want to always move or respond or whatever. For others its just a random response or no response.

Consider you are attending an interview. The interviewer asks a question which you had already come across. Now what would you do? Would you behave like a random oracle model ? :)
i.e would you answer the question instantly as you know the solution already or  drag the time doing fake thinking, returning some false positives similar to bloom filter ......and finally give the solution.

I would suggest to notify the interviewer that you had already come across this question and use ROM in your head to spit out the answer. But many people don't do that. They act like they have seen it for the first time and what not..

To be frank, i was educated by my undergrad college seniors not to respond quickly though you know the answer..

 In another example, lets consider your friend introduces you to his friend. So are we considering the new guy as friend. I guess not. Most of us just remembers him and when you see him in another occasion we greet him and that's it. We do maintain a cache for this guy but we are responding to him with answers which may/may not satisfy him.
 
Recently one of my friend came across this guy. Lets use notations for privacy :).

Let A, B, C are three persons defined as follows.

A - My friend
B - A's friend
C - B's friend who is not A

The following events take place.

1) C had gone to his home country for vacation.
2) A had asked B to get some stuffs from persons who are returning from that country.
3) B informs C.
4) C brought those items as it was told by B.
5) Now C brings those items back.
6) A queries B reaches C's house.

Now whenever some person visits your house its common we greet them with drinks, sweets etc, learn about them, rejoice with them if there any common moments. In this case A was taken aback by C.

C : Oh . It was you. Good. Good.. Okay..Here is your item which was told by B. Have it.
A : Thanks for bringing. blah blah

// C and A stares at each other for some time. A expects C to welcome him and take a seat.

C : Make yourselves comfortable. "Take sweets pointing to some room".
     C leaves the scene.
A : Perplexed on what to do and leaves. 

Why did C behave like that?

1) Probably C had already known about A that he is an asshole through some other D.
2) He was so busy that he didn't have the courtesy to tell that to A.
3) He himself noticed A and determined A's character.
  or whatever.

May be you can justify that I'm an asshole, so is A and that's the reason C behaved like that.

If any of the above cases were true, C should not have brought those items for A when he/she was informed by B. Its better to avoid getting committed rather taking such tasks & making it awkward.

This could be compared with stories a programmer takes for implementation. i.e either take a requirement and implement it correctly or don't take.

Random Reader : I'm already having lots of friends. I don't want any one new into my group.
My answer  :  Yeah buddy. Sure. But one should have the courtesy to decently inform NO to the new guy.

Is that the reason Facebook also thought about coming with lists and groups(secret,closed etc) and blocking updates to persons who are still in your friend's list :).

Coming back to original theory "ROM", Are we violating random oracle model in our life?

Now may be you can ask why do we need to follow random oracle model. I'm not advising anyone to follow this model. I came across this and found our life design patterns are akin to this.

I guess all of us are selfish in one way or other.

We use the model only when it benefits us or we behave in a way which is similar to existing models :)

It can be business, personal or anything.

So one more question arises. Is life deterministic enough to be accommodated into some model?

What do you guys think on this ?


 [For readers who are reading this crap, thank you very much for visiting my profile. Please post comments on what you feel as well as suggestions so that i can improve my writing.]





23 February, 2013

Core Dump .. SEG FAULT


Is Life Deterministic or Non - Deterministic ?
                                           I feel life is deterministic-polynomial time solvable Turing machine :P in the way it has been to me till this time. Things happen which has a trigger in the past and the loop keeps on running. Oh yeah who pulled the trigger ?? Some unknown void pointer which happens to be the unseen God :)

Don't think i'm an atheist :)

My mind core dumped and i thought i would post the stack trace here :)

What is Sarcasm


Sarcasm is an encryption technique used by relatively smart people to keep idiots out of their conversations. It may also be used to belittle and mock them.

The encryption and decryption technique of sarcasm is inbuilt in many humans. 

Some humans are capable of encrypting a message using sarcasm in O(1) time, while some take O(n^2), where n is the number of characters in the message. Some idiots are also capable of encrypting messages with sarcasm, but it is very rare, as they need O(2^n) time in most cases to encrypt a message of length n.

Decryption, on the other hand is a bit tedious. The most brilliant minds on this planet take about O(log n) time to decrypt any sarcastic message in worst case; although the average time needed by them is still O(1). The average intelligent being takes about O(n^3) time to decrypt a sarcastic message. Idiots on the other hand, are completely off chart when it comes to decryption. The smartest idiots are capable of decrypting sarcastic messages in O(5^n) time, because they're counting with fingers on one hand only; although the average idiot is not capable of deciphering a sarcastic message in his/her lifetime. 

It's a sick sad world with intelligent people keeping their information and techniques secret encrypted with sarcasm and idiots can't have access to it to become intelligent even if they want to. Ah, the irony of it! 

# No, this is not meant to demonstrate sarcasm.

Courtesy : Archit Sachdeva from Quora

System Level Protection ??

We are now hearing lots of news about attacks in top notch companies like FB, LinkedIn, Twitter etc. The main reason stated is vulnerability in Java plugin which makes the attackers to penetrate.
Though Oracle has released a patch, I'm not sure whether it's a temporary patch or a permanent fix for the problem. Last month I came across one colloquium by Dr.Michael Franz ( http://www.ics.uci.edu/~franz/ ) UC Irvine held at UT Dallas. The talk was about "Software Immunity via Large Scale Diversification".
The abstract is below for reference.

Abstract
-----------
We have been investigating compiler-generated software diversity as a defense mechanism against software attacks. Imagine an "App Store" containing a diversification engine (a "multicompiler") that automatically generates a unique version of every program for every user. All the different versions of the same program behave in exactly the same way from the perspective of the end-user, but they implement their functionality in subtly different ways. As a result, any specific attack will succeed only on a small fraction of targets. An attacker would require a large number of different attacks and would have no way of knowing a priori which specific attack will succeed on which specific target. Equally importantly, this approach makes it much more difficult for an attacker to generate attack vectors by way of reverse engineering of security patches.

We have built such a multicompiler which is now available as a prototype. We can diversify large software distributions such as the Chromium web browser or a complete Linux distribution. I will present some preliminary benchmarks and will also address some practical issues such as the problem of reporting errors when every binary is unique, and updating of diversified software. 

-------------
So prof and his team had built a multicompiler which would build unique version based on a seed value ( like how most cryptographic algorithms work) for each and every user in the world. All the different versions built behave in exactly the same way. So the end user wouldn't be able to distinguish it. From the attacker perspective, this would require a large number of attacks and he/she would have no way of knowing the seed value through which the executable is made. Even if they can guess the seed, the attack would be minimal restricted to a group of people or single user.

This process makes the life difficult when a patch is released as it needs to be catered to each and every user as the company issuing patch should keep track off the versions running in every user, retrieve the seed used in the executable and generate the new executable based on some new seed/existing seed. In the talk professor had mentioned this new technique is currently deployed at Mozilla.


 Having explained the idea, would this really work??
This means by doing some nifty things with the executable can we really increase the security? 
Prof and his team would have definitely thought on various aspects.
Lets observe as time progresses..

What do you guys think on this?

22 February, 2013

Some nice quotes.

Arise, awake and stop not till your goal is reached. - Swami Vivekananda.

Ellam nanmaike ( Tamil proverb ) - All is well.

Procrastinators unite Tomorrow. [ Try not to procrastinate :) as much as you can. ]

Passion alone is not sufficient. It should be backed by suitable knowledge.



Whats in this blog :)

It took soo...long to create my first blog mainly because of procrastination. at last here it is.
My first one "Hello World". I'm excited as this day happens to be my birthday. :-)


So whats in this blog..

I will be mostly sharing my ideas/views, experiences and learning's in the past,present with things that i came/come across..

About Me :

Name : Ganapathy Subramanian R.  [ Call Me Gan or Ganu :-) if you find it long ;-) ]

What I'm doing : I'm currently doing my Masters in Computer Science at UT Dallas. I had my B.Tech in Information Technology from P.S.G Tech, Coimbatore, India.

What I was doing previously:  I was working with Huawei Technologies, India as a Software Engineer developing Next Generation Intelligent Networks :)


What I'm interested on : I'm interested about Networks,  Telecommunications, Big Data, Secure Cloud Computing, Distributed Systems , implementing new ideas, learning new things etc etc...

What I'm currently looking for :  Full time position as a Software Engineer

Hope you can find something useful in this blog and can reach me through LinkedIn.
 My LinkedIn profile : http://www.linkedin.com/in/ganapathysubramanianr.