Cryptography Project.
- Project : ANSI X9.17 Pseudorandom Number Generator
- Programming Language used for implementation : Java
- User chooses lucky numbers and then compares with the random numbers generated by the ANSI X9.17 Psuedo Random Number Generator. If the user's numbers match, then a congratulatory winning message is displayed.
- The combination of the numbers generated in the lotto should be unique.
- Develope a GUI application, i.e. a Java applet that runs the application using the functionality of DES and random number generator.
- I-Ri, Ri, I-V_{i+1} and V_{i+1} are generated at different stages of the ANSI X9.17 PRNG and are displayed. Ri is to be used for lottery random numbers.
The figure shows the steps in ANSI X9.17 . It uses Triple DES encryption decryption.
First click Generate to get Ri and than click on Buttons CA Lottery and Mega Lottery. Every time you click on Generate you will get different values. To get back I-Ri and I-V_{i+1}, click Decrypt
When you click the link the applet starts and shows the following things:
- I-Ri (Input to EDE(2))
- Ri (Output of EDE(2))
- I-V_{i+1}(Input to EDE(3))
- V_{i+1} (Output of EDE(3))
Lottery Numbers: (Ticket number and Mega Number for each in decimal form using Ri)
CA Lottery: Ticket number of 5 unique digits between 1 to 50, one mega number between 1 to 26
Mega Lottery: Ticket number of 5 unique digits between 1 to 42, one mega number between 1 to 15
Input DTi is Date and time string which is obtained in the program itself by getting the current time and date which varies according to date and time.
Keys K1, K2 are same for each EDE:
K1= AABB09182736CCDD (hexadecimal form)
K2= A1B203182736CCDD Vi = initially all 64 bit are set to 0 and for next time, i.e. when you click Generate again, Vi = V_{i+1}.
Verification of results:
Written algorithm for decrypting - To decrypt the values of Ri and V_{i+1} and get back I-Ri and I-V_{i+1} respectively, by clicking button (Decrypt Ri and V_{i+1})
REFERENCES
Published papers online for DES in pdf format is found at the following website: site.uottawa.caPublished papers online for ANSI X9.52 in pdf format : csrc.nist.gov