File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes KeyStore Algorithm & Cipher Algorithm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "KeyStore Algorithm & Cipher Algorithm" Watch "KeyStore Algorithm & Cipher Algorithm" New topic
Author

KeyStore Algorithm & Cipher Algorithm

H.C. Satish
Greenhorn

Joined: Feb 08, 2004
Posts: 4
Hi,
Generated the KeyStore using the keytool using Default KeyStrore Type & KeyStore = User, Password=password
With keystore am able to retrieve the both Private & Public Keys by making use of KeyStore.getDefaultType())
When i tried 2 encrypt the message using the params Cipher, PublicKey, MESSAGE, Cipher.ENCRYPT_MODE
As above cipher is initialized with "RSA" & meantime the KeyStore is also created by "RSA"
But when program is executed, getting an error "java.security.InvalidKeyException: Could not initialize for signing with the given key"
Kindly inform me what must be the [-keyalg <keyalg>] used for both KeyStore & initialization of Cipher
NOTE: am using the JDK1.4
Cordially
 
 
subject: KeyStore Algorithm & Cipher Algorithm
 
Similar Threads
SSL
Error when signing applet
need help abt 64 encoder/decoder
Keystore and Encryption
What is the difference between Pubkey and Cipher?