Tag Archive for 'iit'

I Don’t Wanna Go Anymore :: Monish Salhotra

Oh God!!
what this place has done to me ?
I don’t resemble me anymore.
lemme stay here a bit more,
I don’t wanna go anymore.

Looking through window 4 years back,
I was no-where in this huge human map,

what……………………..
……………

This is the place, where I lived on my own,
principles, rules, decisions all were my own.

what…………………………………..

I had the best and worst days of my life,
challenged the strongest and still I survive,

what…………………………………..

I’ll definitely forget the formulas and derivations,

but never my first sutta and daru party with friends.

what…………………………………..

untill unless I would have destroyed myslef,
I could have never explored myslef.

Oh God!!
what this place has done to me ?
I don’t resemble me anymore.
lemme stay here a bit more,
I don’t wanna go anymore.


Regards,
Monish Salhotra

Popularity: 2% [?]

Anuvrat vs Anuvrat

Warning: This is an extremely boring narration on Anuvrat. It is only me, me and me. So you might want to skip right over it. :)

The story of my life! I need not look into more than 4 years into my past to compare the boy I was and the guy I have come to be. I remember vaguely declaring to anybody who would care to listen, before going to IIT Kharagpur, that I shall come out as a man unchanged in habit and manners. Times Change, People Change – I know. Yet, there was this belief in me that I shall remain the same person that I had always been at school. I was happy then. I had just realized the then biggest dream of getting into an IIT. What else did I need? No reason to alter myself I thought.

And my first year friends will acknowledge the fact that I remained the same shy, introverted person throughout the first year. Slept at 10. Would keep my room clean. Cared a lot for my possessions. Avoid anything unfamiliar. Rather stay in the background than try to get noticed. This was Anuvrat Singh, JEE404, in the year 2005.

I was fortunate enough to make an amazing group of friends – Ketan, Naresh, Ritej, Akhilesh, Akshit, Rohit, Ved, DC, Srinath, Gyanendra. Each of them unique in a special way. They started influencing me. But did I know back then that they would completely overhaul my personality? No is the simple answer. I still missed my school friends a lot.

Then came the dreaded second year – The Orientation Period, as it is called. I was boarded at the Radha Krishnan Hall of Residence. This was the year I started becoming more confident of myself. I was learning to say No. There was this painting on the walls of my room. The caption said – What are you waiting for, Reveal Yourself. I made new friends this year in Ratno, Siddhartha, Raunaq, Shadab, Nitin and Arpan.

But I remained the honest introvert. In fact, also confused.

The third year came along. A few more people became important to me. Birinder Tiwana and his brother Birjodh. The two were the complete opposites of me. This was the year when all the people would be trying to land a foreign internship. And I did! I remember the date – 7th December (only because it coincides with the birthday of a friend) – when I received the mail. I was selected at EPFL!

And this was the point from which I never looked back again - or so I feel. It all happened so suddenly and magically. Time seems to have sped by swiftly since then. So many eventful days. I think this is when I started changing. I no longer missed my school friends. I completely got over them.

Arpit, Vinu and Varun became friends – we were all headed to EPFL. The 6th semester was spent planning the great vacation at Switzerland. Rohit too was accepted at a university in the same country. We got ourselves schengen visas. We were going to tour Europe!

And the three months at Switzerland was like some surreal dream. It was the first time I went shopping alone. I wasn’t afraid to be myself anymore. I could openly express my opinions. I was way more confident of myself than I had ever been. I was happy – a happy which was different from the happy after clearing the JEE. And I liked it. I wanted more of it. I wanted to be happy. I did not want to be bothered with future anymore. I wanted to live the present. This was the time I actually started dreaming. I wanted to live up my dreams.

Back at Kharagpur for the final year, I could feel my Swiss enthusiasm to have been carried over here as well. I was smiling like all the time. I had become overly energetic. Half the time I was jumping around in my room. I was happier than I had ever been in my lifetime. I was chatting with people more than I ever did – just so that you know, I hate socializing. I was spending a lot of time with my friends. Akshit’s careless attitude I liked, Naresh’s dedication to work I appreciated. We had lots of parties – like almost every other weekend.

I got back in touch with more than a couple of school friends – thanks orkut. I had a facebook account! I was starting to interact with people in public chats. I made a few online friends – people I have never met but have chatted to.

Come January and I had a job. Life couldn’t have been merrier. We bunked classes and went to a trip of Dehradun. We were white river rafting while our classmates were busy solving homework assignments. March and April was literally like the month of parties all around. This was Anuvrat Singh, o5CS1023, graduating in the year 2009.

Those two semesters completely changed the person I was. It’s like a feeling of being rejuvenated. I probably still am an introvert, but I make a sincere effort to interact with people. I try to influence people all around myself with my enthusiasm and excess energy. I don’t like to sit at home anymore. I want to hang out. Any place will do. Bike trips – bring it on. I am game for any adventurous activity you can come up with. It’s like I have discovered someone within me, someone totally different, and he wants to reveal himself.

This is why, of late, I have been feeling more at home with my friends at Bangalore than in Hyderabad. At home my activities are curbed. Also, at Hyderabad, I go back to being the old Anuvrat which I do not want to any more. Its like alter ego taking over me.

When at Bangalore, it is I who decides what to do with my time. I sometimes go to office at midnight. I sometimes go for coffee at 1 am. Sometimes, we are just making noise the whole night, watching movies or playing cards. Security guard calls on us to cut down the volume, but we don’t care. On more than a couple of occasions we have spent over 1K on just dinner! We are quite spontaneous in what we do – never planning ahead, just doing whatever pleases us.

And then I come to Hyderabad, I am with my parents – civilized and mannered. Then I go back to being a prick at Bangalore. Then once again I am at Hyderabad, where there are so few friends – all of them working, none of them has time to meet me during the weekdays. Then I am back at Bangalore, having a jolly good time with my flatmates on a Wednesday evening. Another weekend, I am in Hyderabad and spend my night surfing the net and doing nothing productive. I am now in Bangalore, working late night on a piece of code. I am at Hyderabad, bored and nothing to do. I am at Bangalore, all the friends just 10 minutes away, never alone, never bored and always happy.

I do not know what gets into me when I come back home. It’s like two people entwined into one, controlled by an automatic toggle switch which controls the dominant personality. But I want to get rid of the old me completely. People often stare into infinity and with a smile assert that school days had been the best time of their life. I am at loss at how to explain people that perhaps those years were the most boring ones that I have ever had. I love the friends I made back then, but I detest the person I was in school.

It’s become too long now. I just want to declare now that I have indeed changed a lot. I just know one thing now – I want to make all my dreams come true. No matter how unreasonable they are, I don’t care what I have to do for that, I don’t mind being a rebel, the society does not bother me any more. I am selfish now, and it is this passion of being happier than the happiest person I have ever met which drives me. And as always, I want to remind myself -

What good is money if I have no family and friends to spend the fortune on.

Popularity: 2% [?]

Lull After The Storm

Yabba Dabba doo !!! My Grand Viva is finally over. And I cannot express my happiness over it in any definite words. This is the one time professors get to mock at their students, though I must add a few are very helpful, and try their best to point the students to the right answers. Although I did not do as well as I was hoping to, but no regrets over there. As it is, I have never cared for my CG. Marks are for the lesser mortals :D .

So now with the grand viva out of the way, it is time to resume working on my BTP. But not without a well deserved break for the weekend. Yeah, a well deserved one, really. Only the BTP presentation is between me and my graduation :D .

The last 40 days at Kharagpur ! I am glad to be leaving this place. Not because I got bored of it, but because I want to start a new chapter of my life – a different story, a different person, a different place. I am eager to move into Bangalore, and start afresh. There was a lot I could have done at Kharagpur itself, but my introversion prevented that. It shall not any more. I am determined to present a new picture of myself, a changed self. I am deviating from the topic.

Well, to sum up, now with the grand viva over, things have really calmed down. There is not much to do, except BTP and chilling out with friends. Its time to make the last few days at Kharagpur memorable. There shall come a day when I’ll feel nostalgic, and wish these days – the best of my life – never went away, but it is not that day yet. Today is the time for party.

Popularity: 1% [?]

A Day That Should Not Have Been

Today was indeed one of the worst days of my 4 years stay at the Indian Institute of Technology, Kharagpur. A Sunday marred by the shocking and tragic loss of a fellow KGPian, all because of the negligent behaviour of the in-campus hospital doctors and authorities.

Students once again showed their unity by staging a protest in front of the Director’s house as soon as the news broke out. It spread like a viral, and soon enough a mob gathered at the Directors house. The destruction of property was uncalled for, and irresponsible on part of the students. Yet, it was the Directors fault not improving the already degrading standards of the B.C. Roy Hospital. The unfortunate death was only the tipping point.

This is not a first-off incidence. The hospital has been in news earlier too. The Campus Newsletter, The Scholars’ Avenue, published an article which exposed the malpractices there. The report team was suspended for almost 6 months for this. The negligence continues to this day. The whole campus could testify against the hospital.

In news earlier were reports of A.P.J. Abdul Kalam inaugurating a B.C. Roy Multi speciality Research Facility (news at KGPian), but I do not know what happened to that project.

Needless to say, the student community is enraged at the incidence. The Director had to resign immediately. An Open House meeting with the students was scheduled for later in the night. Appropriate action is what we expect from the IIT authorities. Our demand for better basic amenities is not unjustified.

You can read more in this article in The Scholar’s Avenue -

Student Dies En Route From B C Roy Hospital To Kolkata

Popularity: 1% [?]

Output Feedback Mode

[ Sometime the LATEX does not render properly. Just refresh the page and it should do. ]

OFB Encryption

OFB Encryption

OFB Decryption

OFB Decryption

Output feedback mode is similar to CFB mode except that the quantity XORed with each plain text block is generated  independently of both the plain text and cipher text. An initialization vector $$s_0$$ is used as a seed for a sequence of data blocks $$s_i$$, and each data block $$s_i$$ is derived from the encryption of the previous data block $$s_{i-1}$$. The encryption of a plain text block is derived by taking the XOR of the plain text block with the relevant data block.

It is essential for security that the initial value is chosen randomly and independently from the previous ones. This prevents almost with certainty that the same initial value $$s_0$$ is used for more than one encryption.

A transmission bit error in block $$c_i$$ only affects the decryption of that block. The block recovered from $$c_i$$ has bit errors precisely where $$c_i$$ did. However, the output feedback mode will not recover from a lost cipher text block – all following cipher text blocks will be decrypted incorrectly.

The speed of encryption is identical to that of the block cipher. Even though the process cannot easily be parallelized, time can be saved by generating the key stream before the data is available for encryption.

The output feedback mode is implemented by the following algorithm

Algorithm:

bitStream ofbEncrypt(bitStream $$m$$, $$s_0$$)

divide $$m$$ into $$m_0m_1…m_l$$

for $$i \gets 1$$ to $$l$$ do

$$c_i \gets m_i \oplus {msb_r}{({E_K}({s_i}))}$$

$$x_i \gets {E_k}({s_i})$$

return $$c_1c_2…c_l$$

[ This is a part of a series of post on Modes Of Encryption. I had to scribe a lecture as a requirement of a course on the Foundations Of Cryptology at the Indian Institute Of Technology. The scribe has been broken into smaller chunks so that it is easily readable. ]

Popularity: 1% [?]

Cipher Block Chaining

[ Sometimes the LATEX does not render properly. Just refresh the page and it should do. ]

In the cipher block chaining mode, each block of plain text is XORed with the previous cipher text block before being  encrypted. This was, each cipher text block is dependent on all the plain text blocks that have been processed up to  that point. Also to make each message unique, an initialization vector must be used in the first block.

CBC Encryption

CBC Encryption

CBC Decryption

CBC Decryption

CBC mode is as secure as the underlying block cipher against standard attacks. In addition any patterns in the plain text are concealed by the XORing of the previous cipher text blocks with the plain text block. Note also that the plain text cannot be directly manipulated except by removal of blocks from the beginning or the end of the cipher text. The initialization vector should be different for any two messages encrypted with the same key and is preferably randomly chosen. It does not have to be encrypted and it can be transmitted with (or considered as the first part of)  the cipher text.

If the first block has index $$1$$, the mathematical formula for CBC encryption is $$!C_i = E_K(P_i \oplus C_{i-1}), C_0 = IV$$ while the mathematical formula for CBC decryption is $$!P_i = D_K(C_i) \oplus C_{i-1}, C_0 = IV$$

Choosing the initial value $$c_0$$ at random prevents almost with certainty that the  same initial value $$c_0$$ is used for more than one encryption. This is important for security. Suppose for a moment that the same $$c_0$$ is used for two messages $$m$$ and  $$m^`$$ . Then, an eavesdropper can immediately detect whether the first $$l$$ blocks of $$m$$ and $$m^`$$ coincide, because in this case the first $$l$$ ciphertext blocks are the same.

The speed of encryption is identical to that of the block cipher, but the encryption process cannot be easily parallelized, although the decryption process can be.

In this mode, we have $$r = n$$. Encryption in the cipher-block chaining mode is implemented by the following algorithm

Algorithm:

bitStream cbcEncrypt(bitStream m)

select $$c_0 \in \{0, 1\}^n$$ at random

divide $$m$$ into $$m_1m_2…m_l$$

for $$i$$ $$\gets$$ $$1$$ to $$l$$ do

$$c_i \gets E_k(m_i \oplus c_{i-1})$$

return $$c_0c_1c_2..c_l$$

Decryption in cipher-block chaining mode is implemented by the following algorithm

Algorithm:

bitStream cbcDecrypt(bitStream c)

divide $$c$$ into $$c_0c_1c_2…c_l$$

for $$i$$ $$\gets$$ $$1$$ to $$l$$ do

$$m_i \gets {E_k}^{-1}(c_i) \oplus c_{i-1}$$

return $$m_1m_2…m_l$$

A transmission bit error in block $$c_i$$ affects the decryption of the blocks $$c_i$$ and $$c_{i+1}$$. The block recovered from $$c_i$$ will appear random (here we assume that even a small change in the input of a block cipher will produce a random looking output), while the plaintext recovered from $$c_{i+1}$$ has bit errors precisely where $$c_i$$ did. The block $$c_{i+2}$$ is decrypted correctly. The cipher block chaining mode is self synchronizing, even if one or more entire blocks are lost. A lost ciphertext block results in the loss of the corresponding plaintext block and errors in the next plaintext block.

In both the electronic codebook mode and cipher block chaining mode, $${E_k}^{-1}$$ is applied for decryption. Hence, both modes are also applicable with public key encryption methods, where the computation of $${E_k}^{-1}$$ requires the recipient’s secret, while $$E_k$$ can be easily computed by everyone.

[ This is a part of a series of post on Modes Of Encryption. I had to scribe a lecture as a requirement of a course on the Foundations Of Cryptology at the Indian Institute Of Technology. The scribe has been broken into smaller chunks so that it is easily readable. ]

Popularity: 2% [?]

Electronic Code Book

[ Sometimes the LATEX does not render properly. Just refresh the page and it should do. ]

The simplest of all the encryption modes is the electronic codebook mode. The message is divided into blocks and each block is encrypted separately.

ECB Encryption

ECB Encryption

ECB Decryption

ECB Decryption

ECB is as secure as the underlying block cipher. However, plaintext patterns are not concealed. Each identical block of plaintext gives an identical block of ciphertext. The plaintext can be easily manipulated by removing, repeating or interchanging blocks. As the encryption is deterministic, it is not CPA secure.

The speed of each encryption is identical to that of the block cipher. ECB allows easy parallelization to yield higher performance. Unfortunately, no processing is possible before a block is seen.

In this mode we have $$r = n$$. The ECB is implemented by the following algorithm

Algorithm:

bitStream ecbEncrypt(bitStream m)

divide $$m$$ into $$m_1m_2…m_l$$

for $$i$$ $$\gets$$ $$1$$ to $$l$$ do

$$c_i = E_k(m_i)$$

return $$c_1c_2…c_l$$

For decryption the same algorithm can be used with the decryption function $${E_k}^{-1}$$ instead of $$E_k$$.

If we encrypt many blocks, partial information about the plain text is revealed. Therefor other modes are preferable.

[ This is a part of a series of post on Modes Of Encryption. I had to scribe a lecture as a requirement of a course on the Foundations Of Cryptology at the Indian Institute Of Technology. The scribe has been broken into smaller chunks so that it is easily readable. ]

Popularity: 1% [?]

Modes Of Encryption

[ Sometimes the LATEX does not render properly. Just refresh the page and it should do. ]

Often the length of message exceeds the block length. So, the block ciphers need some extension. Consider a block cipher of length $$n$$. We fix a key $$k$$, and denote the encryption function with this key as $$!E_k\colon \{0, 1\}^n \to \{0, 1\}^n$$
To encrypt a message $$m$$ that is longer than $$n$$, the message is decomposed into blocks of fixed size $$ r, m = m_1m_2…m_l$$. The individual blocks are encrypted iteratively.

The message block size $$r$$ need not equal $$n$$. In few modes of encryption, $$r$$ is smaller than $$n$$.

Also if the length of message $$m$$ is not an integral multiple of $$r$$, then we have to complete the last block. The last block of the message can be padded out with some bits and encrypted. After decryption, the receiver must remove the padding. Therefore he must know how many bits were padded. This can be achieved, for exmple, by storing the number of padded bits in the last byte of the last block.

[ This is a part of a series of post on Modes Of Encryption. I had to scribe a lecture as a requirement of a course on the Foundations Of Cryptology at the Indian Institute Of Technology. The scribe has been broken into smaller chunks so that it is easily readable. ]

Popularity: 1% [?]

Bitwise 2009 Engima Answers

BSOD

BSOD

I know its too late for this, but then my blog received a visitor who got here searching for answers. Also, the forum has become dead now, and its a pain to go back searching for all the answers. So here it is, all the answers are given below. Only the answers are here. You may play the enigma at Enigma-Bitwise09. A few of the answers have comments in []. They are not part of the answer.

  1. Enigma [A change from the traditional BITWISE answer]
  2. Server
  3. Java
  4. Super Computer
  5. Handshake [We spent lots of classes last year in networks course studying HANDSHAKE]
  6. Multimedia
  7. Deadlock
  8. Oracle
  9. BSOD [The easiest of them all, pretty obvious. Any windows user will know about the BSOD :D ]
  10. Gateway
  11. Segmentation Fault [Haven't ever managed to complete a program without getting stuck with this error :( . I have made a signal handler to catch seg fault ;) ]
  12. Garbage Collector [Loved this one. One of my favourites.]
  13. Terminal
  14. Facebook
  15. Memory Leak
  16. Multitasking
  17. Data Mining
  18. Overclock
  19. Infinite Loop
  20. Nibble
  21. Paging [The question with the weirdest logic.]
  22. Brainfuck [Try this language. Even the HELLO WORLD is a difficult program to code !!]
  23. Password
  24. LISP [One of Mallu's evil questions.]
  25. Sun [Another of Mallu's almost-impossible-to-guess question]
  26. Cipher
  27. HP [Hail the lord of Mortals - Mallu da. None in the department could figure this one out :P :P ]
  28. Rete Algorithm
  29. Opera

Hehe … I am not giving away the last answer. Look back at the 29 answers and try to think this one by yourself. Lets see if you can reason out like us :P   .

PS: Mallu is Vinu Rajshekhar

PS: Though a lot of people poured in the questions, the most notable were those of Tharki (Arpit Kumar). Each was a bigger PJ than the other !!

Reblog this post [with Zemanta]

Popularity: 3% [?]

And Then The Coding Begins

As I mentioned yesterday, I have finally managed to complete (read: almost complete) the analytical component of my BTP. Now I need to implement the algorithm and get the results.

It has been a great night out. I have already written ~450 lines of code in C. I have tried the modular approach, breaking things into functions. This way, I test each function individually and am sure that they will work when used together.

Also I have added a new feature in my code this time. Learning from my troubles the last time I coded such a complex algorithm, I realised that a log file proves to be handy. It clearly defines the flow of control, the manipulations and the decisions taken within a loop. Everytime I enter a function, I make a note of it in the log file. Whenever I leave the function, it is noted into the log. All that occurs within the function is properly indented. At the present though I have used a rather brute force method for indenting the log file. I print spaces in the log file using the for loop. I need to find a better way.

Below is the log file that I generated running the incomplete algorithm.

  Number of Processors : 1
  Number of Tasks : 4
  Frame Size : 10
  Number of Groups : 1

  Task   1: e =  18 p =  30 wt = 0.60
  Task   2: e =  18 p =  90 wt = 0.20
  Task   3: e =  18 p = 150 wt = 0.12
  Task   4: e =  18 p = 225 wt = 0.08

  Proc   1: cap =  10

      < <>>naf: 0

      < <>>shr: 6

    Task 1, Frame 0, Share 6

      Frame 0 inserted after -1
      Task 1 inserted into bucket 5 first

      < <>>naf: 0

      < <>>shr: 2

    Task 2, Frame 0, Share 2

      Task 2 inserted into bucket 1 first

      < <>>naf: 0

      < <>>shr: 1

    Task 3, Frame 0, Share 1

      Task 3 inserted into bucket 0 first

      < <>>naf: 1

      < <>>shr: 1

    Task 4, Frame 1, Share 1

      Frame 1 inserted after 0
      Task 4 inserted into bucket 0 first

    < <>>leastFrame: 1

Popularity: 1% [?]