[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: [iaik-jce] How to load a PrivateKey as byte[]



Hello,

for converting keys from there encodings KeyFactories may be used.
PrivateKeys, however, should not be stored without protection. You may, for
instance, use a KeyStore. How to handle KeyFactories and KeyStores is
described in
http://java.sun.com/products/jdk/1.2/docs/guide/security/CryptoSpec.html.

Provider-dependent you may use IAIK PKCS#8 or PKCS#12.

Regards,
Dieter Bratko

-----Ursprüngliche Nachricht-----
Von: iaik-jce-owner@iaik.tu-graz.ac.at
[mailto:iaik-jce-owner@iaik.tu-graz.ac.at]Im Auftrag von
Thomas.Kuhlmann2@Bertelsmann.de
Gesendet: Mittwoch, 26. Juli 2000 14:32
An: iaik-jce@iaik.tu-graz.ac.at
Betreff: [iaik-jce] How to load a PrivateKey as byte[]


Hi,

I have save a PrivateKey by using the method Key.getEncoded().
I try to load it using the PKCS8EncodedKeySpec, but an
InvalidKeySpecificationException is thrown.

What is the regular way to write a PrivateKey to an file (as byte[]) and
load it back. (It should be algorithm-independent and provider-independent).

Thanks for your help!

Best regards,
Thomas Kuhlmann

----
Bertelsmann mediaSystems
An der Autobahn
D-33311 Guetersloh
Germany
--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content:
UNSUBSCRIBE iaik-jce




smime.p7s