Sunday, March 9, 2008
Saturday, March 8, 2008
Cows and bulls practical
The correct guess to try in the practical version of cows and bulls encrypted is 6598. the number of cows and bulls are displayed in the alert box. The logic is simple....the RSA public key cryptography is used with a preset key of 17 and 3233. The example is taken right out of wikipedia. The guesses that are entered are taken and there position is appended to it(i.e, 1,2,3 and 4). This value is then encrypted and compared with the values stored in arrays 'a' and 'b', a has the values that are bulls and b has all the cows. The values are given below:
bulls
64-1577
53-652
92-2762
81-1485
cows
63-2909
62-1162
61-178
54-1978
52-3094
51-2985
94-205
93-456
91-3157
84-1820
83-3185
82-2661
The game in practicallity would have to have more number of such encrypted arrays. One of them would have to be choosen randomly. However, the randomess doesnt need to be hidden.If a higher degree of encryption is needed, the keys can be changed and the arrays and the function that is used to encrypt can be changed at the server side when the javascript is generated.
bulls
64-1577
53-652
92-2762
81-1485
cows
63-2909
62-1162
61-178
54-1978
52-3094
51-2985
94-205
93-456
91-3157
84-1820
83-3185
82-2661
The game in practicallity would have to have more number of such encrypted arrays. One of them would have to be choosen randomly. However, the randomess doesnt need to be hidden.If a higher degree of encryption is needed, the keys can be changed and the arrays and the function that is used to encrypt can be changed at the server side when the javascript is generated.
Tuesday, March 4, 2008
Cow and bulls-javascript posible?
This post assumes you know what a trap door function is, and also about Gautham B Pai... and his cow and bulls game and the challenges he seems to be facing with javascript....
The challenge is to make the game completely using javascript and only upload the results back to the server. This seems to be one of the ways to "Make the game run completely using javascript"....
First all the numbers 0 to nine are encrypted using a trap door function such as RSA. The numbers have to written in words(filled with blanks to make all the numeric words equal) to prevent easily breaking the code by trial and error. If further higher levels of security are needed the number combinations should be used.
Ok so basically we have an array of encoded numbers in word form.We also have the public key to encrypt the guesses from the user. Based on the output from random number function, a variable set is choosen from the array. The values entered by the user are encrypted using the public key and compared with value stored in the choosen variable set. If both are equal, the results are sent to server...
This method can be effective if the public key seed value is defined by the server at the time the javascript is generated.This ensures the effective and secure game plan...!!!!!!! Since the player cant know the actual value of the number even if he knows the encrypted form of the number this should work..
The challenge is to make the game completely using javascript and only upload the results back to the server. This seems to be one of the ways to "Make the game run completely using javascript"....
First all the numbers 0 to nine are encrypted using a trap door function such as RSA. The numbers have to written in words(filled with blanks to make all the numeric words equal) to prevent easily breaking the code by trial and error. If further higher levels of security are needed the number combinations should be used.
Ok so basically we have an array of encoded numbers in word form.We also have the public key to encrypt the guesses from the user. Based on the output from random number function, a variable set is choosen from the array. The values entered by the user are encrypted using the public key and compared with value stored in the choosen variable set. If both are equal, the results are sent to server...
This method can be effective if the public key seed value is defined by the server at the time the javascript is generated.This ensures the effective and secure game plan...!!!!!!! Since the player cant know the actual value of the number even if he knows the encrypted form of the number this should work..
Sunday, February 24, 2008
Search for alternative planets to use after a few billion years
As can be seen from the wikipedia entry on the life cycle of sun, the earth will not be safe for humans to saty after a few billion years. So, we need to start searching for alternative planets to live on after a few billion years.
Although a few billion years is quiet a lot of time, the problem to be solved is also quiet complex. Finding an alternative planet is not going to be easy. Just moving from one city to another requires so much planning.... if we want to shift to a differnt planet... thats going to require much more planning. Some of the problems we are going to face are:
Although a few billion years is quiet a lot of time, the problem to be solved is also quiet complex. Finding an alternative planet is not going to be easy. Just moving from one city to another requires so much planning.... if we want to shift to a differnt planet... thats going to require much more planning. Some of the problems we are going to face are:
- Means of transport for such a large number of organisms and stuff.
- reconstruction of our planet on the new planet
- taking snapshots of earth...and stuff for the purpose of keeping track of our history
Tuesday, February 12, 2008
Microsoft Visio-Competition
For those of you who dont know what is microsoft visio check out the microsoft site. You can download a trail version for free. It has got a really neat SDK.
I did some really small stuff with it. These were the three entries for the Visio contest. Visio combines the best of powerpoint, word and Visual basic macro scripting.
The first entry is a file location tracking utility for real time tracking of files. It also provides the required information about the correct support groups to contact.
The second is a process flow analysis chart for various processes based on the number of incidents or issues.
The third is the flowgraph, which gives a graphical representation of flowcharts.
I did some really small stuff with it. These were the three entries for the Visio contest. Visio combines the best of powerpoint, word and Visual basic macro scripting.
The first entry is a file location tracking utility for real time tracking of files. It also provides the required information about the correct support groups to contact.
The second is a process flow analysis chart for various processes based on the number of incidents or issues.
The third is the flowgraph, which gives a graphical representation of flowcharts.
Sunday, January 27, 2008
green grass blue skies...
Yes grass is greeen due to the chlorophyll in it and sky is blue due to the refraction of light...
why do these behave like that anyway? may be thats a question very difficult to answer. We could say that its their property. Again the question remains, why is it their property? For example...when you are writting a program you give different colors for the graphical interface...you set some constant values here and there..
Similalrly somebody hould have set these values...yes..they are in the genes..thats the code...thats the programm...we can change it compile it and run it....
why do these behave like that anyway? may be thats a question very difficult to answer. We could say that its their property. Again the question remains, why is it their property? For example...when you are writting a program you give different colors for the graphical interface...you set some constant values here and there..
Similalrly somebody hould have set these values...yes..they are in the genes..thats the code...thats the programm...we can change it compile it and run it....
Friday, January 4, 2008
Subscribe to:
Posts (Atom)