Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Security > Serialising JCE...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1705 of 1792
Post > Topic >>

Serialising JCE secret keys ****tably

by Jason Proctor <jason@[EMAIL PROTECTED] > Jun 18, 2007 at 07:34 PM

dear community,

i've been trying to figure out how people are serialising secret keys
using the JCE. seems to me that there are an awful lot of KeySpec
cl***** missing for symmetric keys. so how does it work?

originally my application used object serialisation, which works great
on any algorithm of course - but good luck serialising between VM types
and versions. 

so my application is now restriected to DES for session keys, because
it's the only algorithm sup****ted by a KeySpec class. here's the code -

serialise ()
{
      SecretKeyFactory  keyFactory = SecretKeyFactory.getInstance
         (sessionKeyAlgorithm, sessionKeyProvider);

      DESKeySpec  keySpec = (DESKeySpec) keyFactory.getKeySpec
         (inSecretKey, DESKeySpec.class);

      return keySpec.getKey ();
}

deserialise ()
{
      DESKeySpec  keySpec = new DESKeySpec (inEncodedKey);
      
      SecretKeyFactory  keyFactory = SecretKeyFactory.getInstance
         (sessionKeyAlgorithm, sessionKeyProvider);
      
      return keyFactory.generateSecret (keySpec);
}

i'd like to do the equivalent for Blowfish, but there simply isn't the
KeySpec cl***** around to do it. do i have to write my own security
provider, my own BlowFish algorithm, and my own KeySpec cl***** to do
this, or is there an easier way?

btw i evaluated RSA BSafe and they didn't have any KeySpec cl***** for
their algorithms either. they said "oh just use our API" but of course
the JCE has so many nice things going for it. just seems like this part
is a wrinkle in an otherwise solid library.

thanks for any help received,
j
 




 1 Posts in Topic:
Serialising JCE secret keys portably
Jason Proctor <jason@[  2007-06-18 19:34:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:33:41 CDT 2008.