posted 17 years ago
Hi there�
I am totally new to security and encryption, I do not want to make this call for help too long, but I am in a deep trouble. I am developing a very simple SET Handler. Now there are two problems hunting me:
1.Dealing with Keys and Certificates:
I managed to create a pair of keys using keytool, in addition, I "self-certified" my self using the same tool and stored the certificate in the same store where the keys are. I wonder, what is the content of the store, does saving the certificate in the same store overwrites the keys? And how can I extract the private key from store dynamically? Can I enforce that the algorithm used all-over the activities depends on RSA?
2.After failing, of course, to answer all the questions above, I tried experimenting a little with the KeyPairGenerator, the result was awesome. I succeeded in encrypting and decrypting a simple phrase. Furthermore, I created two simple separate programs, a writer (encrypter) and a reader (decrypter). I connected the two programs via a socket connection, I also allocated the same and exact KeyPair to both programs. Now when I encrypt the data and tries to send the resultant byte array through a DataOutputStream, or as an object, the received array or data is never the same, as if the format of the data has changed during transmission. In other words, what is the ideal way for sending encrypted data through a socket connection without using a cipherInputStream nor a cipherOutputStream.
Thank you very much in advance
Hatim