1
vote
1answer
90 views

What can I improve in this Java based crypto code?

I use some basic cryptography in a project of mine. Because I want my application to run cross-platform and because it seems pretty sophisticated I decided to go with the Java Cryptography ...
1
vote
2answers
284 views

Modular exponentiation optimisation in Java

As part of an assignment in Cryptography I've been asked to write code that involves calculating modular exponentiation. The BigInteger modPow is not allowed in this case, we have to implement it ...
3
votes
1answer
2k views

DES, Triple DES and AES-128 code in Java

I wrote below code to crypt and decrypt some bytes in three algorithm with Java but I do not know if I wrote them in correct mode or not. Please tell me about truth of code. First class: public ...
3
votes
1answer
358 views

Cryptographic key exchange

I initially posted this on StackOverflow, and was redirected here. I have been playing around with Bouncy Castle (Java) for the last few days, and I've reached the point where I believe I can securely ...