Serialization - how to protect a serialized JAVA object?

How can I protect a serialized object if I send a serialized object over the network? I doubt that hackers can interrupt / crack my data.

can anyone talk in detail about how to implement this?

+3
java serialization
source share
6 answers

These two presentations provide ideas on how effectively attackers can interfere with the Java serialized stream:

Expected Java Deserialization

+6
source share

java.crypto.SealedObject is what you are looking for.

+4
source share

You can encrypt or use it, but the java serial format is the choice to send over the network. The best solution would be JSON / XML (encrypted or signed with some cryptographic algorithm).

+2
source share

Look at encryption, as mentioned earlier, but more specifically look at the SSL / TLS library hte for network communication in java.

http://juliusdavies.ca/commons-ssl/ssl.html

No need to try to implement secure encryption when there is a very powerful library built into Java.

+1
source share

In my opinion, you can use either SSLSocket or SealedObject . However, this will make things a little heavy for you. However, one of the options is described in this article. http://www.ibm.com/developerworks/library/j-5things1/

+1
source share

You can use a signed object and a private object to protect the serialization object.

+1
source share

All Articles