Note that the generated key length is in some cases longer than requested key length. For example, when a 56-bit key is requested for DES (or 168-bit for DESede) the default provider for the Sun JRE produces an 8-byte (24-byte) key, which embeds the generated key in an array with one parity bit per byte. The requested key length is what is recorded in this object and in the published key entry; hence, users of the actual key data must be sure to operate on the full key byte array, and not truncate it to the key length.
|
|