where is AES implemented?

Y

yawnmoth

According to <http://java.sun.com/developer/technicalArticles/Security/
AES/AES_v1.html>, you can encrypt stuff with AES using
javax.crypto.Cipher (among other objects). I downloaded the Java
sources at <http://download.java.net/jdk6/> and did not find any
crypto.* classes in the directory I would have expected to - the j2se
\src\share\classes\javax . Every other class I can think of is
implemented in j2se\src\share\classes\*, so why not crypto?

Never-the-less, I did find a copy of it at <http://
developer.classpath.org/doc/javax/crypto/Cipher-source.html>.
Unfortunately, it still leaves me guessing as to where Java's
implementation of AES actually is. Any ideas?
 
R

rossum

According to <http://java.sun.com/developer/technicalArticles/Security/
AES/AES_v1.html>, you can encrypt stuff with AES using
javax.crypto.Cipher (among other objects). I downloaded the Java
sources at <http://download.java.net/jdk6/> and did not find any
crypto.* classes in the directory I would have expected to - the j2se
\src\share\classes\javax . Every other class I can think of is
implemented in j2se\src\share\classes\*, so why not crypto?

Never-the-less, I did find a copy of it at <http://
developer.classpath.org/doc/javax/crypto/Cipher-source.html>.
Unfortunately, it still leaves me guessing as to where Java's
implementation of AES actually is. Any ideas?

It is in javax.crypto.Cipher as you suspected. There is no explicit
AES class, it is one of the possible cyphers that Cipher can use. You
specify it in the transformation string: cypher/mode/padding.

Cipher myAESCypher = Cipher.getInstance("AES/CBC/PKCS5Padding");

Your implementation will throw an error if it does not have AES
available.

rossum
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top