Wednesday, September 21, 2005

Encryption Algorithm

Hi Reader,
Here is the encryption algorithm which i developed at HP (Hewlett-Packard,Bangalore) and used in system "Hermes" which i developed as a part of my final semester project.

Steps:

Encryption:

1.
Decide 3-digit key. All 3 digits of key should be different.
Ex. 236


2.
Generate a random number between 0-255. Fill zeros before if required, but number should be of digits.
Ex.178


3.
Place digits of this random number at places indicated by key digits in encrypted string.
Ex. Place 1 at 2nd place, 7 at 3rd place and 8 at 6th place.

4.Now X-OR password characters’ ASCII values and random number. Place them sequentially from left to right at remaining places of encrypted string.

Ex. Password string is “abc” then put 97 X-OR 178 at first place.
Where 97 is ASCII of ‘a’. Put 98 X-OR 178 at forth place, since second and third place is for storing random no. Put 99 X-OR 178 at fifth place.

Decryption:

1.
Extract random no from encrypted string using key.
Ex. Generate number back from picking digits at 2nd, 3rd and 6th places.


2.
Take a character at a time from encrypted except the key value places and X-OR them with random number just generated.

Complexity:
Encryption and decryption complexity is theta(n) ,where n is password length

Friday, September 16, 2005

C Program
Here is the C Program i have gifted to my sister/friend. I have modified the output. Copy,compile and run it. (I have compiled with gcc and runs fine)

#include<stdio.h>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define P(i) printf("%c",i)
#define S strtok(NULL," ")
#define a P((atoi(strtok(p," ")))+14);while(i){P((atoi(S))+14),i--;}
char p[1000]="-4 54 87 83 100 18 88 100 91 87 96 86 101 30 -4 63 83 91 94 18 95 87 18 91 88 18 107 97 103 18 90 83 104 87 18 103 96 86 87 100 101 102 97 97 86 18 102 90 87 18 94 97 89 91 85 32 65 102 90 87 100 105 91 101 87 18 98 103 102 18 107 97 103 100 18 85 97 95 95 87 96 102 101 18 97 96 18 105 87 84 18 98 83 89 87 32 -4 31 54 90 83 104 83 94 -4";int i=104;void main(){a;}

Monday, September 12, 2005

Who says Mr.India doesnt exist?

Hellooo...
Place your mouse cursor exactly below the START word , click it and drag upto STOP word.

START:
mat kar yakin sirf haath ki lakiro pe,
takdir to unki bhi hoti hain jinhe haath nahi h
ote.
STOP.

Friday, September 09, 2005

Here is my friend Telling some facts about Microsoft..... Below that i have justified my views....Mail me if my concept is wrong anywhere.

My Friend writes:
Hi,
DO u know about this?
Will Windows work continuously for more than 49.7
days?

Here is a bit of information, which may surprise you
all. Windows crashes automatically if you don't switch
off the machine for 49.7 Days. Microsoft accepts this. Do you know
why? If not read this.

In Windows the Virtual Machine Manager (here after
referred as VMM) is responsible for creation,
execution, monitoring and termination
of virtual machines. This VMM, which is a 32 bit,
protected mode operating system entity, provides a
number of system services at chip level. One of these services is
"Get_System_Time". This particular service loads the
EAX register with the time in milliseconds since
Windows started on that machine. This service is
accurate to 1 ms. EAX is a 32 bit register in Intel
386 Processor onwards.

So the maximum number of milliseconds it can hold is
(232)-1 = 4294967295 milliseconds = 4294967.295
seconds = 71582.79 minutes = 1193 hours = 49.7 days

So after 49.7 days the EAX resets to zero. Most of the
Drivers use this Time Service to keep track of the
timeout of various services they provide. So after 49.7 days the drivers
cannot use the get_System_Time function of VMM and
they crash taking the OS along with.

bye


My Views:

Hi friends,
I am disagree with the fact that Microsoft Windows crashes due to size of EAX register (32-bits). I have some justifications below. If i am wrong somewhere then plz inform me.
First of all Intel's 286 architecture was also 32 bits only and EAX register was 32 bits register there.
Second, Windows doesnt store system time in any resister instead it maintains data structure in which it stores sec, min, hours , day ,month....etc
All these fields are int,so there is no question of register to be overflown.
Third, as mentioned time is updated every 1ms. Now EAX is accumulator and used for other purposes (like arithmatic operations, storing return values, etc).. so in order to retain value of current time ,value of this register should be saved when other process is running. Since time changes at every 1ms ,windows has to switch its context every 1ms which it never does(not operationally feasible).
Fourth, nattive of VMS operating system can on Pentium machines. It is called charon-VAX.
So it should also be using one of the register to store time.(I am not sure)... but for last 26 years VMS has never hanged.
So i dont think Windows hangs due to that reason.Anyway Intel and AMD have come up with 64 bit processors, hence Windows should never hang on that.

Regards,
Dhaval Makawana

Tuesday, September 06, 2005


Dhaval Makawana Posted by Picasa