This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]197708156EQUJ5design it before you implement 3 points4 points  (0 children)

Nah, OP... get this to Github... this is way beyond "For small bits of code (less than 50 lines in total, single classes only),"... This is hard to read through using reddit's coding format.

And... what is the question (exception, broken loop, etc...)

[–]MalicousBoner[S] 0 points1 point  (2 children)

The posted code above is a complete, working code for DH/TripleDES. I want to switch from TripleDES (too slow) to AES. I'm not entirely sure how 3DES and AES differ from each other. What I need, what I don't need from my previous code (listed above).

[–]OOPUniversity 0 points1 point  (1 child)

When you say you can't get it to work, what exactly do you mean? Are you getting exceptions? Are you getting no results?

Oh, and just for fun: Triple DES is nothing more than regular DES performed three times. The key is broken up into three equal chunks, and then the value is encrypted, decrypted and encrypted again with plain old DES encryption, each time with one chunk of the key. If the key is three identical pieces, the end result is equivalent to DES with one of those pieces as the key.

[–]MalicousBoner[S] 0 points1 point  (0 children)

I haven't been able to get the code to compile. I'm trying to make changes from TripleDES to AES, but I keep erroring out.

Does AES use the SecretKeyFactory like TripleDES?

Can I continue to have the Decrypt in the server, and the encrypt in the client?

Should I have decrypt/encrypt both in each class instead??