Wednesday, March 23, 2011

Those that I fight I do not hate,
Those that I guard I do not love.

Full poem

Saturday, March 12, 2011

Crypto codes: GGH public key cryptosystem

Download code from here
I only did the decryption part, using Babai's algorithm (for homework :D)

Friday, March 11, 2011

Crypto codes: Elliptic ElGamal

Download code from here

Crypto codes:Miller Rabin Primality test

Download code from here

Output: (exercise 3.14 in the Introduction of Mathematical Cryptography)
1105 is composite with witness 2
294409 is composite with witness 2
118901509 is prime
118901521 is composite with witness 2
118901527 is prime
118915387 is composite with witness 2

Crypto codes: Elliptic curve cryptography

Download code from here
Code includes:
Elliptic curve addition,
Point in Elliptic curve over finite fields
double-and-add algorithm for Elliptic curves

Output:
Points in E(F13) are :
(-Infinity,-Infinity)
(1.0,5.0)
(1.0,8.0)
(2.0,3.0)
(2.0,10.0)
(9.0,6.0)
(9.0,7.0)
(12.0,2.0)
(12.0,11.0)
Addition test->
(9.0,7.0) + (1.0,8.0) =(2.0,10.0)
double-and-add algorithm for elliptic curve->
947*(6.0,730.0) mod 3623= (3492.0,60.0)