Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
NAME
EVP_rc2_cbc, EVP_rc2_ecb, EVP_rc2_cfb64, EVP_rc2_cfb, EVP_rc2_ofb, EVP_rc2_40_cbc, EVP_rc2_64_cbc — Rivest Cipher 2 in the EVP frameworkSYNOPSIS
library “libcrypto”#include <openssl/evp.h>
EVP_rc2_cbc(void);
EVP_rc2_ecb(void);
EVP_rc2_cfb64(void);
EVP_rc2_cfb(void);
EVP_rc2_ofb(void);
EVP_rc2_40_cbc(void);
EVP_rc2_64_cbc(void);
#define RC2_KEY_LENGTH 16
DESCRIPTION
RC2 is a block cipher operating on blocks of RC2_BLOCK= 8 bytes, equivalent to 64 bits, using a variable key length with an additional parameter called “effective key bits” or “effective key length”.= 16 bytes, which is not a very useful value because it is quite short.- Create a new, empty EVP_CIPHER_CTX object with EVP_CIPHER_CTX_new(3).
- Select the operation mode by calling EVP_EncryptInit(3) with the desired type argument, passing NULL pointers for the key and iv arguments.
-
Select the key length by passing the desired number of bytes to EVP_CIPHER_CTX_set_key_length(3). Doing so overrides the default key length of RC2_KEY_LENGTH
= 16. Valid values for keylen are positive and less than or equal to 128. - Select the effective key length by calling EVP_CIPHER_CTX_ctrl(3) with a type argument of EVP_CTRL_SET_RC2_KEY_BITS, passing the desired number of bits in arg. Doing so overrides the default effective key length of 128 bits. Valid values for arg are positive and less than or equal to 1024. The ptr argument is ignored; passing NULL is recommended.
- Call EVP_EncryptInit(3) a second time, this time passing NULL for the type argument. The key argument points to an array containing the number of bytes that was passed to EVP_CIPHER_CTX_set_key_length(3), and the iv argument points to an array of eight bytes.
- Finally, EVP_EncryptUpdate(3) and EVP_EncryptFinal(3) can be used in the normal way.