A Java application will encrypt all information using a public (SSL) server certificate (at least as far as you are concerned). For all practical purposes, the only way to decrypt it later is to know the secret key of the server, which you apparently lack, and therefore you cannot decrypt it.
To answer your comment about whether to use the computerโs private key:
If this is a โnormalโ SSL connection, the client (java application) will contact the server and get its public key, confirm it is correct (signed by a trusted CA), and then use it to negotiate a symmetric key, which is used for encryption.
Public / private keys work in such a way that everything encrypted with one key can only be decrypted with another, that is, everything that a Java application encrypts using the serverโs public key can only be decrypted using the private key โ which never leaves the server.
SSL / TLS supports client certificates in which a Java application can have its own key pair and use its private key to sign the content in order to authenticate itself. However, even if the Java application does this (doubtfully), it does not help, because the data will still be encrypted, so only the server can decrypt it.
Background reading: http://en.wikipedia.org/wiki/Transport_Layer_Security and http://en.wikipedia.org/wiki/Public-key_cryptography
source share