----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
> >
> > I'm thinking of writing a simple encryption scheme whereby the servlet
> > will make up a key pair on the fly, provide one key in a HIDDEN field
> > in a form, and then a JavaScript script will encrypt the user's input
> > using said key before submitting the form. Then the servlet will
> > decrypt it using the other key. It seems like a simple idea but I'm
> > sure it'll be trickier to implement than it sounds. Has anyone
> > already done this?
What key do you plan on adding to a hidden field? The
encryption key or the public key of a public/private pair? You
know viewing the source will display any hidden fields.
>
> You are just trying to reinvent the weel, as SSL does it better.
>
But it can be total over kill for certain applications.
> That's not a correct way to deal with autentication, but works for
> browser->server encryption.
> Anyway asymetric cryptography is not the way to go to encrypt contents,
> as asymetric is slower compared to symetric algos.
Not many people use asymmetric algorithms for encryption.
Use Diffie/Hellman for exponential key generation then a symmetric
alg for the confidentiality. The size of your primes and/or
exponent determine the level of security you have for the traffic
encryption key. Obviously a 20-bit prime is relatively useless,
whereas a 1024 bit prime is complete overkill. You
need to ask yourself how important is the data *and* how long
is the data valid? The lifetime of the data directly determines
how 'good' the algorithm needs to be.
Have you considered the Java Crypto API?
-Tom
--
+-------------------------------------------------------------------+
+ Thomas M. Sasala, Electrical Engineer [EMAIL PROTECTED] +
+ MRJ Technology Solutions http://www.mrj.com +
+ 10461 White Granite Drive, Suite 102 (W)(703)277-1714 +
+ Oakton, VA 22124 (F)(703)277-1702 +
+-------------------------------------------------------------------+
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]