# JCE: init vector and PKCS #5

Steve Burnett (burnettS@RSA.COM)
Wed, 7 May 1997 12:11:05 -0700

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: David Brownell: "Re: HMAC in the Security layer"
- Previous message: Steve Burnett: "HMAC in the Security layer"

    Message-Id: <c=US%a=_%p=RSA_Data_Securit%l=LOBESTER-970507191105Z-2998@LOBESTER.rsa.com>

    From: Steve Burnett <burnettS@RSA.COM>

    To: "'JavaSoft crypto questions'" <java-security@web2.javasoft.com>

    Subject: JCE: init vector and PKCS #5

    Date: Wed, 7 May 1997 12:11:05 -0700

You gave an example (I believe it was at JavaOne) where a user could
instantiate a Cipher class as follows.

Cipher des = Cipher.getInstance ("DES/CBC/PKCS#5");

This will produce an object that will encrypt using DES in CBC mode and
pad following the scheme outlined in PKCS #5.

First, with respect to the initialization vector. How do I set it?
There is a FeedbackCipher interface, but the Cipher class does not
implement it. Am I missing something here?

Secondly, I have a suggestion on PKCS #5. That standard describes
password-based encryption. It just so happens that part of the standard
outlines a good block cipher padding scheme. It might be better to say
"PKCS#5Pad" to indicate that it is only padding, not PBE in its
entirety. In fact, the SUN provider has a PKCS#5 class. That name might
imply a PBE class, rather than a padding class.

--Steve Burnett
burnetts@rsa.com

- Next message: David Brownell: "Re: HMAC in the Security layer"
- Previous message: Steve Burnett: "HMAC in the Security layer"