Allora ho trovato che per criptare la chiave è molto semplice, è sufficiente usare il metodo seguente

codice:
DESkeySpec = new DESkeySpec("blahblahblah");
SecretKeyFactory kf =
SecretKeyFactory.getInstance("DES");
SecretKey passwordKey = kf.generateSecret(keySpec);

Cipher c = Cipher.getInstance("DES");
c.init(Cipher.WRAP_MODE, passwordKey);
byte[] wrappedKey = c.wrap(sharedKey);
e successivamente eseguire l'unwrap così

codice:
c = Cipher.getInstance("DES");
c.init(Cipher.UNWRAP_MODE, passwordKey);
Key unwrappedKey = c.unwrap(wrappedKey, "DES",
Cipher.SECRET_KEY);
Molto semplice

Spero possa servire a qualcuno.
Ciauz