(En)Crypter 1.2

If you want to write me a private email message, you can do that here by entering some text in the upper window (or alternatively copying it into). Then press the "Encrypt" button and it will be enciphered securely (using the Cramer Shoup Cryptosystem, see below) and translated to base64 format, which you can include as ordinary text in an email.

Thus...

...everybody can encrypt, but nobody but me can decrypt. That's what a public key algorithm is all about. The 'decrypt' button will not produce anything reasonable, for I removed my secret key from the sources. The key has a 2014 bit prime modulus, which is pretty good. For I computed the prime moduli and implemented both key-generation and crypto algorithm myself, this is as trustworthy as it can get.

The Cramer Shoup Cryptosystem

... is a quite recent, practicable and provably secure (in some sense and under some reasonable assumptions). Please read more about it on this web page.

The Sources

are only three small files: You are welcome to copy and customize them.

How 'secure' is this...?

Be not deceived. Absolute security is not feasible in public key encryption. But even if the problem was not the "inherent guessability" of the secret key, there are a lot of questions beyond that:
Though the answer to most of the above would with all likelyhood be "Yes" , this is no reason to be paranoid. After all - how much pain would someone undergo just to read your email or your files? But I believe it is important to remember that just some nice and advanced math does not get rid of these problems.
The only thing, this small Applet can do, is offering a partial remedy to the first concern. You still have to trust Java and your favorite browser not to do something unintended with your data. But you can check the code, for it is small (and this is not the case for open source software like PGP). And you can read the paper and convince yourself of the correctness. It is hard to offer anything better here.


The keys

They were computed on a separate hardware with a allegro common lisp program. Trusting the bignum routines there and also some advanced prime number algorithms, I believe they are 'correct' ,i.e. the generators are really suchlike (which is asserted by falsifying all other possilbe orders) and the prime moduli are really prime (which is corroborated by a Millner-Rabin pseudo-primality test).
If you belive, anybody could comfortably compute the discrete logarithm from a 2014 bit number, you can also use a 5020 bit key, but be warned that this can last some hours.

Why is it so slooooooow?

The cryptographic algorithm has to deal with long integers (some 2000 bits). And after all, Java is an interpreted language. It might take up to some minutes to encrypt (or decrypt) a text. The best (and only) thing to to is to start an encryption and then just do something else.
Please note that the computation time is not a linear increasing function of the input length, due to the fixed prime modulus. Everything below 250 Characters will take about the same time, then everything below 500 characters twice this time and so on.

Things to do

You might have noticed some obvious extentions to this applet. I cannot promise to do any of the above soon, for I am really busy with other objectives.

Known Bugs

So far none. But please email me, if you detect some (even if they do not compromise the security).


webmaster - Last modified: Wed Nov 17 14:39:50 1999