Wednesday, December 9, 2015

Various steps in RSA(Crypto-system)

The whole mystery lies , you cant efficiently factor a large integer.

Steps for encryption:

Step-1: Choose two large distinct prime numbers p,q

Step-2: Compute n=p*q,product of two prime numbers.

Step-3: Compute Phi(n)=Phi(p)*Phi(q) here Phi(x) is euler toitent function . Phi(x) =number of coprimes less than x .

Step-4: Choose as integer 1<e<Phi(n) such that e and Phi(n) are co-primes

Step-5: Compute d that such that d*e = 1(mod Phi(n)) . That is d is modular multiplicative inverse of e mod (phi(n)) .

Step-6 . Public key is (n,e)

Step-7: Private key is d . Note- with knowledge of n ,one cant calculate Phi(n) or in turn d.

Step-8: Encryption function for text T is C=pow(T,e) mod (n) .

Steps for decryption :

Decrypt the message by applying
T=Pow(C,d) mod n .

Proof of every things :

Proof-1 : Efficient computation of d is possible .
Computation of ax=1 (mod m) is possible by extended euclidean algorithm in O(m^2 ) time .

1..We have to find x such that ax=1 mod (m)

2. Since ax=1(mod m) so ax-1=qm for some integer q. Rearranging ax-qm=1.

3.ax-qm=1 can be solved by euler's algorithm to find x and q. Discard the q and x is  modular multiplicative inverse.

 Proof -2 : Computation of euler toitent function phi(n)  is possible only if u know prime factor of n and finding prime factor of n is NP-hard .

Phi(n) = n*Pi((1-1/p))) for all p here p|n .





Monday, September 14, 2015

Break-up(s)

One of the worst human emotion is emotion aroused after break-up phase. When suddenly one realises that his other half is no-longer to him, that feeling of being alone is really stupid. In this post I try to pen down some of events happening to me  these days.

How come every bollywood song starts making sense ? Tum the ya tha koi ujali kiran ..tum the kya kali koi muskayee thee . and suddenly I see her face smiling and she turns literally into a 'kali' and suddenly disappears. Woha ! Is this too much 'old-monk rum ' ? or I  have literally being mad.

That stupid little hope in some corner of mind. Lot of day-dreaming , its not over yet . She is meant for me . We had seen so many dreams that stupid heart to heart connection . Crazy !!

Suddenly she is the most beautiful girl in the world. Off course , she was beautiful but what happened to u dude when she was with u ? Where did that` beauty disappear ? Did u have time to appreciate that beauty .. and now suddenly nothing but her beauty only matters . So stupid !

Sleep .. Sleep .. Sleep .! Give me some sleep . This 'old-monk' is also not effective.

How can she forget me so soon ? :( That stupid feeling . I know I am not as great as her new fiance . I ddid nt care for small things. She didnt feel protected with me ... I left her in mid way and what not !! But still some part of me loved her .. that true love .

That stupid feeling , now she is no more concern about me :( Whether I am happy or sad. Oh come-on I need u .

Did I leave any impact on her ? Will she ever think about me .. that there was some crazy person , who was just sole crazy , nothing more nothing less .

And then this stupid song from Ayo  ringing again and again in my ears :(

Down on my knees, I'm begging you, Down on my knees, I'm begging you, Down on my knees, I'm begging you, Please, please don't leave me

Don't leave me, I'm begging, I love you, I need you, I'm dying, I'm crying, I'm begging,
Please love me
I love you, I love you, I'm begging, please love me, I'm begging, I'm begging, Please don't leave me, no, no, no, no, no

Down on my knees, I'm begging you...

Sunday, September 13, 2015

Commandant of Happy life

1. Be Kind. Whatever U are today , its sacrifice of others. You are just lucky enough ,nothing more. Miserable ones are not so fortunate. So be kind to everyone.

2. Give/donate/share . Its not simple arithmetic ,its very complex.  More u give more it comes.

3. Small things matter. Happiness is not in earning 100000 millions or being president of USA. Happiness lies in small things , in sunrise , natural fresh breeze, beautiful face, fragrant, smile :) .

4. Family is everything. In the end its parents and sibling who will be with u albeit all your nuisance.

5.Jealousy, Where the fuck is time ? The most creative persons are the ones who shine together.

6. Live , If not now then when? Follow your dreams. Work hard. Exercise. Drink Water. Travel. Smile. Laugh.

7. Fear , what is that ? The most successful people are the ones who have jumped into well of unknown without a second thought.

8. Keep promises , it hurts. If you cant do it , don't say it . Most stupid thing is to give others false hope.

9. Be Original , Be yourself . If you are not yourself then who the hell are you ? No need to pre-tense , no-one except few cares for you.

10. Empathy. Walk into shoes of others. Before judging others , understand why he is doing same. 

Saturday, January 7, 2012

....pls dont hav feelings for me ..

These days i m into facebook chat too much , while chatting to some one i came across this sentence ".... pls dont hav feelings for me ". instantly , my philosophical mind triggered to other way and this blog is outcome of philosophical analysis of sentence in form of some questions .

1) first of all , how grammaticaly correct this sentence " pls , dont have feeling for me " is ? 'To feel' is also a verb like other verb ie " eat , sleep , play , drink , weep , laugh blah blah " . But , do the verb " to feel" show same characterstics like other verb ?Suppose some one say to u " dont play , dont drink , dont eat , dont laugh .." Atleast upto some extent we can control whether " we will play , we will drink , we will eat , we will weep , we will laugh , we will sleep ".But do the same thing happen with verb " to feel ? " can we control if " we will feel or we will not feel ? "

2) what is why of " please dont hav feeling for me?" To clarify more abt question , there are many kind of feeling .Feeling cold , feeling warm , feeling happy , feeling sad , feeling angry , feeling good for some one ... We put our hand on stove , we feel warm . some one abuses us we feel angry . some thing bad happens to us we feel sad . Seems like every feeling is associated with some outcome of previous action .. ,, is it true for "dont hav feeling for me ? as well ?" is it necessary to do some action or to be part of some action to hav feeling ?? is it some quality /virtue , that intrigue feeling for u to him /her or they just come randomly ??

3) what is science of " please dont hav feeling for me ? " . In higher secondary physics i read newton's 3rd law. every action has a reaction . My mother taught me in childhood " tum kuchh b karo( achha ya bura ) , uska fal jaroor milega . and through intuition( though i hav no prove for it ) , i hav gut feeling for justice . i believe eevery ting is balanced . " i wil do good , definitely good will happen to me , i ll do bad definitely bad will happen to me " same is according newton's 3rd law , i push my hand over wall , wall ll apply force over my hand .Do Newton's law or my mother's teaching apply over "feelings" also . is there any telepathy system , if u hav feling for some one , she/he ll start feeling for u also through some kind of waves , some imaginary waves ??

.4) This one is more or less related to question 2 .suppose answer of question 2 is "yes" . ie there is some action ( like u r talking to some one ) and through that very talking u start having feeling for him /her . then what if we remove source of action ?? . I had read somewhere " to deny ur own impulses is to kill urself " .. . so is it justified to stop talking to some one in order to kill feelings ?? or first will feeling surely die if u remove action of course ( stop talking here ) or they will remain in backlash of ur brain ...........


>>> Answers+ add -on over questions are welcomed ...

Tuesday, December 13, 2011

night-shift

me masoom nirash dara hua ,
subh ke is pahar me thaka hua
apne ap se bheeter ladta hua
kuch soya to kuchh jaga hua
kabhi muh khula to kabhi band karta hua
kabhi programme likhta hua to
kabhi facebook per chatting karta hua
to kisi se dal-bati banna sikhta hua
adhi khuli ankho se swapn dekhta hua
apni halat pr adha hasta to adha rota hua
kursi per sota to dubra jagta hua
chamse ko pehnta to utarta hua
kabhi curve fitting karta hua
kabhi i2c comm sikhta hue ko
ek security guard ko dekhkar
ek vichar dimag me kondha
20 sal se bina shikayat ke
poori mustaidi or starkta se
kaise kar leta hai ye kam
mehnat me hi hai aram or
jimmedari me hi hai sukun

or lag gya me fir se programming ki duniya me :)

Monday, August 15, 2011

i was dying inside.......

i was dying inside
cldnt talk,
cldnt see
cldnt hear,
world looked more gloomy.
i was sick of me

i was dying inside.
no courage ,
no desire ,
no spirit ,
only melancholy and pain ,
i was searching mental peace.

i was dying inside .
love,
sorrow,
pain ,
never ending emotional slavery
i was looking independence

i was dying inside .
tears
memories
emotions
i wanted halt over feeling of guilt
i was dying inside ..........

Tuesday, March 29, 2011

If...........

Word 'If' is very important word in English language , we can use word in three tenses
1) Past tense :- if I had known , I could .................
2) Present tense :- If I know , I can ....
3) future tense :- If I will know , I will be able to ................

So , intelligent person and fool person decipher this "If" word according their attributes .

Fool persons :- Most of the time they talk about Past tense , in present they talk about past , in future they talk about present , every time same "If" happens to them , and every time they are found being said ," if I had known , I could ....... " there more action is dependent on sentence " If i had known ........ " and out come is always "I could .......... "

Intelligent persons :- They live in present , they talk about present . There both action and outcomes are based on I can ..........This is definitely better form than former one .Well , this form is better than former one , but definitely not ideal one . intelligent persons live in present , never taking corrective measure against past . They "know" the things only if they "do" the things, . so better modified sentence for those is "Since I want to do this , i should know that "


Proactive persons :- Here comes ideal one . They exactly know that , since they didn't know this thing they were not able to finish that . More or less they think for future ,act for present and learn from past . In present they take corrective measure against their mistakes done in past . In present they know/try to know the unfinished thing . being independent if they will be given chance to finish that thing again or not , and commit themselves to take appropriate action in future , when so ever they will be given a chance .


what might have been , is have been already , no one can change . what one can change is learn from past , and commit one self , he wont repeat that again .


*** No one can go into past and change the present , but every one can go in present and change the future ***



Happy living !