Re: [math-fun] secret key cryptosystem?
Warren, Use a N-bit key to seed a Blum-Blum-Shub pseudorandom number generator, and XOR its output with the message. That's much quicker than RSA (multiplication is faster than modular exponentiation) and far more secure. Time to encrypt/decrypt = O(N log N log log N) * (length of message) Time to brute-force = O(2^N) In pseudocode, we have: -------- p,q,r = large (1024-bit should suffice) distinct primes of the form 4k+3, derived from the key by a deterministic process. M = pq Repeat the following code: { Take 32 bits of plaintext, and XOR with (r mod 2^32) to produce 32 bits of ciphertext. Let r := r^2 mod M Once the entire plaintext is processed, exit this loop. } -------- It's cryptographically secure, as even complete knowledge of the state of PRNG would not allow previous states to be computed, thanks to the difficulty of integer factorisation. It's also a very good PRNG, with no obvious patterns in its output. Hence, even if your nemesis has a crib and XORs it with the ciphertext to obtain some of the PRNG output, he/she will still have great difficulty extrapolating. Also, there's the convenience that the algorithm is symmetric for encryption and decryption. Sincerely, Adam P. Goucher
----- Original Message ----- From: Warren D Smith Sent: 08/18/13 02:26 AM To: math-fun Subject: [math-fun] secret key cryptosystem?
Any recommended secret-key cryptosystems?
My desiderata are simple+short algorithm and high security level. Speed is not very important.
-- Warren D. Smith http://RangeVoting.org <-- add your endorsement (by clicking "endorse" as 1st step)
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (1)
-
Adam P. Goucher