des.pod (127129) | des.pod (269682) |
---|---|
1=pod 2 3=head1 NAME 4 5DES_random_key, DES_set_key, DES_key_sched, DES_set_key_checked, 6DES_set_key_unchecked, DES_set_odd_parity, DES_is_weak_key, 7DES_ecb_encrypt, DES_ecb2_encrypt, DES_ecb3_encrypt, DES_ncbc_encrypt, 8DES_cfb_encrypt, DES_ofb_encrypt, DES_pcbc_encrypt, DES_cfb64_encrypt, --- 121 unchanged lines hidden (view full) --- 130DES_set_key() works like 131DES_set_key_checked() if the I<DES_check_key> flag is non-zero, 132otherwise like DES_set_key_unchecked(). These functions are available 133for compatibility; it is recommended to use a function that does not 134depend on a global variable. 135 136DES_set_odd_parity() sets the parity of the passed I<key> to odd. 137 | 1=pod 2 3=head1 NAME 4 5DES_random_key, DES_set_key, DES_key_sched, DES_set_key_checked, 6DES_set_key_unchecked, DES_set_odd_parity, DES_is_weak_key, 7DES_ecb_encrypt, DES_ecb2_encrypt, DES_ecb3_encrypt, DES_ncbc_encrypt, 8DES_cfb_encrypt, DES_ofb_encrypt, DES_pcbc_encrypt, DES_cfb64_encrypt, --- 121 unchanged lines hidden (view full) --- 130DES_set_key() works like 131DES_set_key_checked() if the I<DES_check_key> flag is non-zero, 132otherwise like DES_set_key_unchecked(). These functions are available 133for compatibility; it is recommended to use a function that does not 134depend on a global variable. 135 136DES_set_odd_parity() sets the parity of the passed I<key> to odd. 137 |
138DES_is_weak_key() returns 1 is the passed key is a weak key, 0 if it 139is ok. The probability that a randomly generated key is weak is 1401/2^52, so it is not really worth checking for them. | 138DES_is_weak_key() returns 1 if the passed key is a weak key, 0 if it 139is ok. |
141 142The following routines mostly operate on an input and output stream of 143I<DES_cblock>s. 144 145DES_ecb_encrypt() is the basic DES encryption routine that encrypts or 146decrypts a single 8-byte I<DES_cblock> in I<electronic code book> 147(ECB) mode. It always transforms the input data, pointed to by 148I<input>, into the output data, pointed to by the I<output> argument. --- 27 unchanged lines hidden (view full) --- 176 177DES_xcbc_encrypt() is RSA's DESX mode of DES. It uses I<inw> and 178I<outw> to 'whiten' the encryption. I<inw> and I<outw> are secret 179(unlike the iv) and are as such, part of the key. So the key is sort 180of 24 bytes. This is much better than CBC DES. 181 182DES_ede3_cbc_encrypt() implements outer triple CBC DES encryption with 183three keys. This means that each DES operation inside the CBC mode is | 140 141The following routines mostly operate on an input and output stream of 142I<DES_cblock>s. 143 144DES_ecb_encrypt() is the basic DES encryption routine that encrypts or 145decrypts a single 8-byte I<DES_cblock> in I<electronic code book> 146(ECB) mode. It always transforms the input data, pointed to by 147I<input>, into the output data, pointed to by the I<output> argument. --- 27 unchanged lines hidden (view full) --- 175 176DES_xcbc_encrypt() is RSA's DESX mode of DES. It uses I<inw> and 177I<outw> to 'whiten' the encryption. I<inw> and I<outw> are secret 178(unlike the iv) and are as such, part of the key. So the key is sort 179of 24 bytes. This is much better than CBC DES. 180 181DES_ede3_cbc_encrypt() implements outer triple CBC DES encryption with 182three keys. This means that each DES operation inside the CBC mode is |
184really an C<C=E(ks3,D(ks2,E(ks1,M)))>. This mode is used by SSL. | 183an C |
185 186The DES_ede2_cbc_encrypt() macro implements two-key Triple-DES by 187reusing I<ks1> for the final encryption. C<C=E(ks1,D(ks2,E(ks1,M)))>. 188This form of Triple-DES is used by the RSAREF library. 189 190DES_pcbc_encrypt() encrypt/decrypts using the propagating cipher block 191chaining mode used by Kerberos v4. Its parameters are the same as 192DES_ncbc_encrypt(). --- 166 unchanged lines hidden --- | 184 185The DES_ede2_cbc_encrypt() macro implements two-key Triple-DES by 186reusing I<ks1> for the final encryption. C<C=E(ks1,D(ks2,E(ks1,M)))>. 187This form of Triple-DES is used by the RSAREF library. 188 189DES_pcbc_encrypt() encrypt/decrypts using the propagating cipher block 190chaining mode used by Kerberos v4. Its parameters are the same as 191DES_ncbc_encrypt(). --- 166 unchanged lines hidden --- |