Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

128 bit key AES encrypting application in java

Tags:

java

aes

i need to create an application in java that would convert text strings into codes based on 128bit AES encryption.. ideally i would prefer that i only need to create a gui and the AES encryption part is already written. the application is need to be run in both linux and windows . kindly advice me on existing libraries and anything related. i am not an expert programmer so im asking this advice to gain confidence on the subject.

like image 549
silverkid Avatar asked Jul 29 '26 08:07

silverkid


2 Answers

This should get your started... http://java.sun.com/developer/technicalArticles/Security/AES/AES_v1.html

EDIT

Looks like http:// 192 . 9 . 162 . 55/developer/technicalArticles/Security/AES/AES_v1.html could be an working link...

How do you posts IP addresses?

like image 74
TofuBeer Avatar answered Jul 31 '26 20:07

TofuBeer


In case it's useful, I put some stuff on the web about AES encryption in Java, including example encryption/decryption code (actually, the code is essentially similar for other algorithms).

Things that typically trip people up:

  • if you're generating random keys (well, actually in any case, random or not), you need to do it appropriately (see the SecureRandom class, for example)
  • the basic encryption works on arrays of bytes; when converting strings to and from bytes (the String.getBytes() method and the String constructor that takes a byte array), you need to pick a character encoding that will preserve all the characters you will use (if you're not sure, probably start with "UTF-8")
  • by default, the AES Cipher actually runs in a mode that is insecure (though if this is a homework project it might not matter); read up on block modes for more informtation.
like image 40
Neil Coffey Avatar answered Jul 31 '26 22:07

Neil Coffey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!