I'm trying to create a DES cipher that will allow me to decipher text coming from a remote partner. They have given me the private key to use for decryption that is 16 bytes long. So I used the following code:
decryptCipher = Cipher.getInstance(CIPHER_NAME); //CIPHER_NAME="DES"
decryptCipher.init(Cipher.DECRYPT_MODE, key);
When I execute this I get:
Caused by: java.security.InvalidKeyException: Invalid key length: 16 bytes
at com.sun.crypto.provider.DESCipher.engineGetKeySize(DashoA13*..)
at javax.crypto.Cipher.b(DashoA13*..)
...
I'm a little mystified as to how to proceed. Can someone help?