File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "KeyStore Algorithm & Cipher Algorithm" Watch "KeyStore Algorithm & Cipher Algorithm" New topic

KeyStore Algorithm & Cipher Algorithm

H.C. Satish

Joined: Feb 08, 2004
Posts: 4
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 " 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
I agree. Here's the link:
subject: KeyStore Algorithm & Cipher Algorithm
It's not a secret anymore!