greek, we need schedules because.. well, let's just look at RSA key generation
http://en.wikipedia.org/wiki/RSA_(cryptosystem)#A_working_examplepick two prime numbers, this can be easily scheduled off
pick a number, run the primality check (which is pretty stuffty as it stands) by scheduling the modulo operations
here's the code
function isPrime(%num) // this is the basic function, it needs to be implemented utilizing APA (Abritrary Precision Arithmetic).
{
if(%num % 2 == 0)
return false;
if(num + 1 % 6 == 0 || num - 1 % 6 == 0)
continue;
else
return false; // holy stuff this is so loving inefficient and probably broken. i totally screwed something up here.
%squareRoot = mSqrt(%num);
for(%i = 3; %i < %squareRoot; %i += 2) // this can be sped up if we generate a set of primes using the sieve of eratsones, or just flat out include a list of primes from like, one to a million.
{
if(%num % %i == 0)
{
return false;
}
}
return true;
}
note the for loop
that's bad
everything up to the for loop can be completed quickly, and everything inside the for loop can be processed quickly, but having the for loop means a bunch of menial operations back to back, leading to slow slow slow slow slow stuff
now realize that rsa encryption is raising the given message m to a power (the public key) e mod a public number n
so basically, 33^17 mod n
not big, but this is using the example i linked above - as soon as the numbers get big, it won't be quite as fast
on the other hand, i don't think ECC uses exponential operations too often, so maybe i'm wrong
what i know is we can't do this
echo(Math_Mod(Math_Subtract(Math_Pow("2","400"), "1"), Math_Subtract(Math_Pow("2","399"), "1"));
we have to do this on schedules
$a = Math_Subtract(Math_Pow("2", "400"), "1");
$b = Math_Subtract(Math_Pow("2", "399"), "1");
echo(Math_Mod($a, $b));
the client
cannot notice the operations happening in the background (given reasonable hardware) or else we've failed
[0]we need (included in the library) a function for getting the square root of an arbitrarily large number (primality check)
- we need symmetric encryption - either OTP using ports RNG (in the repo as of five minutes from now) and ECCDH to get the same seed on both ends, or AES (modified for use with binary strings, not actual binary) using ECCDH.
- we need the basics of ECC down. i'll be trying to work on that myself this weekend, but i dunno
[0]we need to implement 192 bit ECC first, then 384 bit, mainly just to get the algorithm working
- what would be cool is if we could make a fully functional add-on that utilized just the diffie-hellman exchange and otp (both extremely simple algorithms that i understand inside and out already) just as a proof of concept
edit: we won't be using ports RNG for number generation, we'll have to get user input like truecrypt does - wiggle mouse, type keys, or just record input data as they play the game... a fps perhaps? that should give a bunch of good clean data.