hcrypto_evp(3)
๐ NAME ๐
hcrypto_evp โ EVP generic crypto functions. This page comes straight outta the Heimdal crypto library, and it's your bestie for all things generic crypto. ๐
โจ
โจ SYNOPSIS โจ
Ok so here's the whole function list, no skips, no cuts, periodt. ๐
Functions
const EVP_CIPHER * EVP_wincrypt_des_ede3_cbc (void)
const EVP_CIPHER * EVP_hcrypto_aes_128_cbc (void)
const EVP_CIPHER * EVP_hcrypto_aes_192_cbc (void)
const EVP_CIPHER * EVP_hcrypto_aes_256_cbc (void)
const EVP_CIPHER * EVP_hcrypto_aes_128_cfb8 (void)
const EVP_CIPHER * EVP_hcrypto_aes_192_cfb8 (void)
const EVP_CIPHER * EVP_hcrypto_aes_256_cfb8 (void)
const EVP_MD * EVP_hcrypto_sha256 (void)
const EVP_MD * EVP_hcrypto_sha384 (void)
const EVP_MD * EVP_hcrypto_sha512 (void)
const EVP_MD * EVP_hcrypto_sha1 (void)
const EVP_MD * EVP_hcrypto_md5 (void)
const EVP_MD * EVP_hcrypto_md4 (void)
const EVP_CIPHER * EVP_hcrypto_des_cbc (void)
const EVP_CIPHER * EVP_hcrypto_des_ede3_cbc (void)
const EVP_CIPHER * EVP_hcrypto_rc2_cbc (void)
const EVP_CIPHER * EVP_hcrypto_rc2_40_cbc (void)
const EVP_CIPHER * EVP_hcrypto_rc2_64_cbc (void)
const EVP_CIPHER * EVP_hcrypto_camellia_128_cbc (void)
const EVP_CIPHER * EVP_hcrypto_camellia_192_cbc (void)
const EVP_CIPHER * EVP_hcrypto_camellia_256_cbc (void)
OSSL_CIPHER_ALGORITHM (rc2_cbc,
hc_EVP_CIPH_CBC_MODE|hc_EVP_CIPH_VARIABLE_LENGTH)
OSSL_CIPHER_ALGORITHM(rc2_40_cbc
hc_EVP_CIPH_CBC_MODE OSSL_CIPHER_ALGORITHM (rc2_64_cbc,
hc_EVP_CIPH_CBC_MODE|hc_EVP_CIPH_VARIABLE_LENGTH)
OSSL_CIPHER_ALGORITHM(rc4
WINCNG_CIPHER_ALGORITHM (des_ede3_cbc, BCRYPT_3DES_ALGORITHM, 8, 24, 8,
EVP_CIPH_CBC_MODE)
WINCNG_CIPHER_ALGORITHM (des_cbc, BCRYPT_DES_ALGORITHM, 8, 8, 8,
EVP_CIPH_CBC_MODE)
WINCNG_CIPHER_ALGORITHM (aes_128_cbc, BCRYPT_AES_ALGORITHM, 16, 16, 16,
EVP_CIPH_CBC_MODE)
WINCNG_CIPHER_ALGORITHM (aes_192_cbc, BCRYPT_AES_ALGORITHM, 16, 24, 16,
EVP_CIPH_CBC_MODE)
WINCNG_CIPHER_ALGORITHM (aes_256_cbc, BCRYPT_AES_ALGORITHM, 16, 32, 16,
EVP_CIPH_CBC_MODE)
WINCNG_CIPHER_ALGORITHM (aes_128_cfb8, BCRYPT_AES_ALGORITHM, 16, 16, 16,
EVP_CIPH_CFB8_MODE)
WINCNG_CIPHER_ALGORITHM (aes_192_cfb8, BCRYPT_AES_ALGORITHM, 16, 24, 16,
EVP_CIPH_CFB8_MODE)
WINCNG_CIPHER_ALGORITHM (aes_256_cfb8, BCRYPT_AES_ALGORITHM, 16, 32, 16,
EVP_CIPH_CFB8_MODE)
WINCNG_CIPHER_ALGORITHM (rc2_cbc, BCRYPT_RC2_ALGORITHM, 8, 16, 8,
EVP_CIPH_CBC_MODE)
WINCNG_CIPHER_ALGORITHM (rc2_40_cbc, BCRYPT_RC2_ALGORITHM, 8, 5, 8,
EVP_CIPH_CBC_MODE)
WINCNG_CIPHER_ALGORITHM (rc2_64_cbc, BCRYPT_RC2_ALGORITHM, 8, 8, 8,
EVP_CIPH_CBC_MODE)
WINCNG_CIPHER_ALGORITHM_UNAVAILABLE (camellia_128_cbc)
WINCNG_CIPHER_ALGORITHM_UNAVAILABLE (camellia_192_cbc)
WINCNG_CIPHER_ALGORITHM_UNAVAILABLE (camellia_256_cbc)
WINCNG_CIPHER_ALGORITHM (rc4, BCRYPT_RC4_ALGORITHM, 1, 16, 0,
EVP_CIPH_STREAM_CIPHER|EVP_CIPH_VARIABLE_LENGTH)
WINCNG_CIPHER_ALGORITHM (rc4_40, BCRYPT_RC4_ALGORITHM, 1, 5, 0,
EVP_CIPH_STREAM_CIPHER|EVP_CIPH_VARIABLE_LENGTH)
size_t EVP_MD_size (const EVP_MD *md)
size_t EVP_MD_block_size (const EVP_MD *md)
EVP_MD_CTX * EVP_MD_CTX_create (void)
void EVP_MD_CTX_init (EVP_MD_CTX *ctx) HC_DEPRECATED
void EVP_MD_CTX_destroy (EVP_MD_CTX *ctx)
int EVP_MD_CTX_cleanup (EVP_MD_CTX *ctx) HC_DEPRECATED
const EVP_MD * EVP_MD_CTX_md (EVP_MD_CTX *ctx)
size_t EVP_MD_CTX_size (EVP_MD_CTX *ctx)
size_t EVP_MD_CTX_block_size (EVP_MD_CTX *ctx)
int EVP_DigestInit_ex (EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE
*engine)
int EVP_DigestUpdate (EVP_MD_CTX *ctx, const void *data, size_t size)
int EVP_DigestFinal_ex (EVP_MD_CTX *ctx, void *hash, unsigned int *size)
int EVP_Digest (const void *data, size_t dsize, void *hash, unsigned int
*hsize, const EVP_MD *md, ENGINE *engine)
const EVP_MD * EVP_sha256 (void)
const EVP_MD * EVP_sha384 (void)
const EVP_MD * EVP_sha512 (void)
const EVP_MD * EVP_sha1 (void)
const EVP_MD * EVP_sha (void)
const EVP_MD * EVP_md5 (void)
const EVP_MD * EVP_md4 (void)
const EVP_MD * EVP_md_null (void)
size_t EVP_CIPHER_block_size (const EVP_CIPHER *c)
size_t EVP_CIPHER_key_length (const EVP_CIPHER *c)
size_t EVP_CIPHER_iv_length (const EVP_CIPHER *c)
void EVP_CIPHER_CTX_init (EVP_CIPHER_CTX *c)
int EVP_CIPHER_CTX_cleanup (EVP_CIPHER_CTX *c)
int EVP_CIPHER_CTX_set_key_length (EVP_CIPHER_CTX *c, int length)
const EVP_CIPHER * EVP_CIPHER_CTX_cipher (EVP_CIPHER_CTX *ctx)
size_t EVP_CIPHER_CTX_block_size (const EVP_CIPHER_CTX *ctx)
size_t EVP_CIPHER_CTX_key_length (const EVP_CIPHER_CTX *ctx)
size_t EVP_CIPHER_CTX_iv_length (const EVP_CIPHER_CTX *ctx)
unsigned long EVP_CIPHER_CTX_flags (const EVP_CIPHER_CTX *ctx)
int EVP_CIPHER_CTX_mode (const EVP_CIPHER_CTX *ctx)
void * EVP_CIPHER_CTX_get_app_data (EVP_CIPHER_CTX *ctx)
void EVP_CIPHER_CTX_set_app_data (EVP_CIPHER_CTX *ctx, void *data)
int EVP_CipherInit_ex (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *c, ENGINE
*engine, const void *key, const void *iv, int encp)
int EVP_CipherUpdate (EVP_CIPHER_CTX *ctx, void *out, int *outlen, void
*in, size_t inlen)
int EVP_CipherFinal_ex (EVP_CIPHER_CTX *ctx, void *out, int *outlen)
const EVP_CIPHER * EVP_enc_null (void)
const EVP_CIPHER * EVP_rc2_cbc (void)
const EVP_CIPHER * EVP_rc2_40_cbc (void)
const EVP_CIPHER * EVP_rc2_64_cbc (void)
const EVP_CIPHER * EVP_rc4 (void)
const EVP_CIPHER * EVP_rc4_40 (void)
const EVP_CIPHER * EVP_des_cbc (void)
const EVP_CIPHER * EVP_des_ede3_cbc (void)
const EVP_CIPHER * EVP_aes_128_cbc (void)
const EVP_CIPHER * EVP_aes_192_cbc (void)
const EVP_CIPHER * EVP_aes_256_cbc (void)
const EVP_CIPHER * EVP_aes_128_cfb8 (void)
const EVP_CIPHER * EVP_aes_192_cfb8 (void)
const EVP_CIPHER * EVP_aes_256_cfb8 (void)
const EVP_CIPHER * EVP_camellia_128_cbc (void)
const EVP_CIPHER * EVP_camellia_192_cbc (void)
const EVP_CIPHER * EVP_camellia_256_cbc (void)
const EVP_CIPHER * EVP_get_cipherbyname (const char *name)
int EVP_BytesToKey (const EVP_CIPHER *type, const EVP_MD *md, const void
*salt, const void *data, size_t datalen, unsigned int count, void
*keydata, void *ivdata)
๐ธ Detailed Description ๐ธ
See the EVP - generic crypto interface for description and examples. That's literally what it says, bestie. Go check it out. ๐
๐ Function Documentation ๐
const EVP_CIPHER* EVP_aes_128_cbc (void)
The AES-128 cipher type. ๐
Returns: the AES-128 EVP_CIPHER pointer.
Examples: example_evp_cipher.c.
const EVP_CIPHER* EVP_aes_128_cfb8 (void)
The AES-128 cipher type.
Returns: the AES-128 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_aes_192_cbc (void)
The AES-192 cipher type.
Returns: the AES-192 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_aes_192_cfb8 (void)
The AES-192 cipher type.
Returns: the AES-192 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_aes_256_cbc (void)
The AES-256 cipher type.
Returns: the AES-256 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_aes_256_cfb8 (void)
The AES-256 cipher type.
Returns: the AES-256 EVP_CIPHER pointer.
int EVP_BytesToKey (const EVP_CIPHER * type, const EVP_MD * md, const void * salt, const void * data, size_t datalen, unsigned int count, void * keydata, void * ivdata)
Provides a legancy string to key function, used in PEM files. (Yes, the page really says "legancy" โ we're keeping it, it's iconic. ๐)
New protocols should use new string to key functions like NIST SP56-800A or PKCS#5 v2.0 (see PKCS5_PBKDF2_HMAC_SHA1()).
Parameters:
typeโ type of cipher to usemdโ message digest to usesaltโ salt salt string, should be an binary 8 byte buffer.dataโ the password/input key string.datalenโ length of data parameter.countโ iteration counter.keydataโ output keydata, needs to of the sizeEVP_CIPHER_key_length().ivdataโ output ivdata, needs to of the sizeEVP_CIPHER_block_size().
Returns: the size of derived key.
const EVP_CIPHER* EVP_camellia_128_cbc (void)
The Camellia-128 cipher type.
Returns: the Camellia-128 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_camellia_192_cbc (void)
The Camellia-198 cipher type. (Yep, the page says 198, not 192. We don't make the rules. ๐ )
Returns: the Camellia-198 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_camellia_256_cbc (void)
The Camellia-256 cipher type.
Returns: the Camellia-256 EVP_CIPHER pointer.
size_t EVP_CIPHER_block_size (const EVP_CIPHER * c)
Return the block size of the cipher.
Parameters:
cโ cipher to get the block size from.
Returns: the block size of the cipher.
Examples: example_evp_cipher.c.
size_t EVP_CIPHER_CTX_block_size (const EVP_CIPHER_CTX * ctx)
Return the block size of the cipher context.
Parameters:
ctxโ cipher context to get the block size from.
Returns: the block size of the cipher context.
const EVP_CIPHER* EVP_CIPHER_CTX_cipher (EVP_CIPHER_CTX * ctx)
Return the EVP_CIPHER for a EVP_CIPHER_CTX context.
Parameters:
ctxโ the context to get the cipher type from.
Returns: the EVP_CIPHER pointer.
int EVP_CIPHER_CTX_cleanup (EVP_CIPHER_CTX * c)
Clean up the EVP_CIPHER_CTX context.
Parameters:
cโ the cipher to clean up.
Returns: 1 on success.
Examples: example_evp_cipher.c.
unsigned long EVP_CIPHER_CTX_flags (const EVP_CIPHER_CTX * ctx)
Get the flags for an EVP_CIPHER_CTX context.
Parameters:
ctxโ theEVP_CIPHER_CTXto get the flags from
Returns: the flags for an EVP_CIPHER_CTX.
void* EVP_CIPHER_CTX_get_app_data (EVP_CIPHER_CTX * ctx)
Get the app data for an EVP_CIPHER_CTX context.
Parameters:
ctxโ theEVP_CIPHER_CTXto get the app data from
Returns: the app data for an EVP_CIPHER_CTX.
void EVP_CIPHER_CTX_init (EVP_CIPHER_CTX * c)
Initiate a EVP_CIPHER_CTX context. Clean up with EVP_CIPHER_CTX_cleanup().
Parameters:
cโ the cipher initiate.
Examples: example_evp_cipher.c.
size_t EVP_CIPHER_CTX_iv_length (const EVP_CIPHER_CTX * ctx)
Return the IV size of the cipher context.
Parameters:
ctxโ cipher context to get the IV size from.
Returns: the IV size of the cipher context.
size_t EVP_CIPHER_CTX_key_length (const EVP_CIPHER_CTX * ctx)
Return the key size of the cipher context.
Parameters:
ctxโ cipher context to get the key size from.
Returns: the key size of the cipher context.
int EVP_CIPHER_CTX_mode (const EVP_CIPHER_CTX * ctx)
Get the mode for an EVP_CIPHER_CTX context.
Parameters:
ctxโ theEVP_CIPHER_CTXto get the mode from
Returns: the mode for an EVP_CIPHER_CTX.
void EVP_CIPHER_CTX_set_app_data (EVP_CIPHER_CTX * ctx, void * data)
Set the app data for an EVP_CIPHER_CTX context.
Parameters:
ctxโ theEVP_CIPHER_CTXto set the app data fordataโ the app data to set for anEVP_CIPHER_CTX.
int EVP_CIPHER_CTX_set_key_length (EVP_CIPHER_CTX * c, int length)
If the cipher type supports it, change the key length
cโ the cipher context you wanna change the key length on ๐lengthโ the new key length, bestie
Returns: 1 on success โจ
size_t EVP_CIPHER_iv_length(const EVP_CIPHER *c)
Spill the tea on how big the IV is for this cipher ๐
Parameters
cโ the cipher you're getting the IV size from.
Returns: the IV size of the cipher.
Examples: example_evp_cipher.c.
size_t EVP_CIPHER_key_length(const EVP_CIPHER *c)
Same vibe, but for the key size this time ๐
Parameters
cโ the cipher you're getting the key size from.
Returns: the key size of the cipher.
Examples: example_evp_cipher.c.
int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, void *out, int *outlen)
Encipher/decipher the final chunk of data โ the last lil sip before you close the tab ๐ฅคโจ
Parameters
ctxโ the cipher context.outโ output data from the operation.outlenโ output length.
ok important: the input length needs to be at least EVP_CIPHER_block_size() bytes long. no cap. ๐
See EVP Cipher for an example of how to use this function.
Returns: 1 on success.
Examples: example_evp_cipher.c.
int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *c, ENGINE *engine, const void *key, const void *iv, int encp)
Initiate the EVP_CIPHER_CTX context to encrypt or decrypt data. When you're done, clean up with EVP_CIPHER_CTX_cleanup() ๐งผ
Parameters
ctxโ context to initiate.cโ cipher to use.engineโ crypto engine to use,NULLto select default.keyโ the crypto key to use,NULLwill use the previous value.ivโ the IV to use,NULLwill use the previous value.encpโ non zero will encrypt,-1use the previous value.
Returns: 1 on success.
Examples: example_evp_cipher.c.
int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, void *out, int *outlen, void *in, size_t inlen)
Encipher/decipher the partial data, bit by bit, streamin' it in ๐ฆ
Parameters
ctxโ the cipher context.outโ output data from the operation.outlenโ output length.inโ input data to the operation.inlenโ length of data.
the output buffer length should at least be EVP_CIPHER_block_size() byte longer than the input length. do not skip this, it's giving "buffer overflow" energy and we don't do that ๐
See EVP Cipher for an example of how to use this function.
Returns: 1 on success.
If there in no spare bytes in the left from last Update and the input length is on the block boundery, the EVP_CipherUpdate() function can take a shortcut (and preformance gain) and directly encrypt the data, otherwise we hav to fix it up and store extra it the EVP_CIPHER_CTX. ๐ (yes, that's the actual wording, we keep the lore fr fr)
Examples: example_evp_cipher.c.
const EVP_CIPHER* EVP_des_cbc(void)
The DES cipher type, classic and vintage ๐
Returns: the DES-CBC EVP_CIPHER pointer.
const EVP_CIPHER* EVP_des_ede3_cbc(void)
The triple DES cipher type โ three times the DES, three times the drama โจ
Returns: the DES-EDE3-CBC EVP_CIPHER pointer.
int EVP_Digest(const void *data, size_t dsize, void *hash, unsigned int *hsize, const EVP_MD *md, ENGINE *engine)
Ok this one is iconic: it does the whole EVP_MD_CTX_create(), EVP_DigestInit_ex(), EVP_DigestUpdate(), EVP_DigestFinal_ex(), EVP_MD_CTX_destroy() dance in one single call ๐ main character energy, no notes.
Parameters
dataโ the data to update the context with.dsizeโ length of data.hashโ output data of at leastEVP_MD_size()length.hsizeโ output length of hash.mdโ message digest to use.engineโ engine to use,NULLfor default engine.
Returns: 1 on success.
int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, void *hash, unsigned int *size)
Complete the message digest โ wrap it up bestie, we're done here ๐ซถ
Parameters
ctxโ the context to complete.hashโ the output of the message digest function. At leastEVP_MD_size().sizeโ the output size of hash.
Returns: 1 on success.
int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE *engine)
Init a EVP_MD_CTX for use a specific message digest and engine ๐ธ
Parameters
ctxโ the message digest context to init.mdโ the message digest to use.engineโ the engine to use,NULLto use the default engine.
Returns: 1 on success.
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, size_t size)
Update the digest with some data โ feed it, feed it ๐
Parameters
ctxโ the context to update.dataโ the data to update the context with.sizeโ length of data.
Returns: 1 on success.
const EVP_CIPHER* EVP_enc_null(void)
The NULL cipher type โ literally does no encryption/decryption ๐ it's giving "nothing" and honestly? sometimes that's the vibe.
Returns: the null EVP_CIPHER pointer.
const EVP_CIPHER* EVP_get_cipherbyname(const char *name)
Get the cipher type using their name โ name drop and she appears ๐
Parameters
nameโ the name of the cipher.
Returns: the selected EVP_CIPHER pointer or NULL if not found.
const EVP_CIPHER* EVP_hcrypto_aes_128_cbc(void)
The AES-128 cipher type (hcrypto) ๐
Returns: the AES-128 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_aes_128_cfb8(void)
The AES-128 CFB8 cipher type (hcrypto) ๐
Returns: the AES-128 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_aes_192_cbc(void)
The AES-192 cipher type (hcrypto) ๐
Returns: the AES-192 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_aes_192_cfb8(void)
The AES-192 CFB8 cipher type (hcrypto) ๐ฆ
Returns: the AES-192 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_aes_256_cbc(void)
The AES-256 cipher type (hcrypto) โ big key energy โจ
Returns: the AES-256 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_aes_256_cfb8(void)
The AES-256 CFB8 cipher type (hcrypto) ๐
Returns: the AES-256 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_camellia_128_cbc(void)
The Camellia-128 cipher type โ hcrypto ๐ธ
Returns: the Camellia-128 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_camellia_192_cbc(void)
The Camellia-198 cipher type โ hcrypto (yes, 198, that's what it says, we don't ask questions bestie, we just copy the lore) ๐
Returns: the Camellia-198 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_camellia_256_cbc(void)
The Camellia-256 cipher type โ hcrypto ๐
Returns: the Camellia-256 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_des_cbc(void)
The DES cipher type ๐ฐ๏ธ
Returns: the DES-CBC EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_des_ede3_cbc(void)
The triple DES cipher type โ hcrypto ๐ซ
Returns: the DES-EDE3-CBC EVP_CIPHER pointer.
const EVP_MD* EVP_hcrypto_md4(void)
The message digest MD4 โ hcrypto ๐
Returns: the message digest type.
const EVP_MD* EVP_hcrypto_md5(void)
The message digest MD5 โ hcrypto ๐งพ
Returns: the message digest type.
const EVP_CIPHER* EVP_hcrypto_rc2_40_cbc(void)
The RC2-40 cipher type ๐
Returns: the RC2-40 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_rc2_64_cbc(void)
The RC2-64 cipher type ๐
Returns: the RC2-64 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_hcrypto_rc2_cbc(void)
The RC2 cipher type โ hcrypto ๐ฏ
Returns: the RC2 EVP_CIPHER pointer.
const EVP_MD* EVP_hcrypto_sha1(void)
The message digest SHA1 โ hcrypto โจ
Returns: the message digest type.
const EVP_MD* EVP_hcrypto_sha256(void)
The message digest SHA256 โ hcrypto ๐
Returns: the message digest type.
const EVP_MD* EVP_hcrypto_sha384(void)
The message digest SHA384 โ hcrypto ๐
Returns: the message digest type.
const EVP_MD* EVP_hcrypto_sha512(void)
The message digest SHA512 โ hcrypto ๐
Returns: the message digest type.
const EVP_MD* EVP_md4(void)
The message digest MD4 ๐
Returns: the message digest type.
const EVP_MD* EVP_md5(void)
The message digest MD5 ๐๏ธ
Returns: the message digest type.
size_t EVP_MD_block_size(const EVP_MD *md)
Return the blocksize of the message digest function ๐
Parameters
mdโ the evp message.
Returns: size size of the message digest block size.
size_t EVP_MD_CTX_block_size(EVP_MD_CTX *ctx)
Return the blocksize of the message digest function (but from the context this time, ok slay) ๐
Parameters
ctxโ the evp message digest context.
Returns: size size of the message digest block size.
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
Free the resources used by the EVP_MD context โ clean up your mess bestie ๐งน
Parameters
ctxโ the context to free the resources from.
Returns: 1 on success.
EVP_MD_CTX* EVP_MD_CTX_create(void)
Allocate a messsage digest context object. Free with EVP_MD_CTX_destroy() ๐
Returns: a newly allocated message digest context object.
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx)
Free a messsage digest context object โ release her, she's done ๐๏ธ
Parameters
ctxโ context to free.
void EVP_MD_CTX_init(EVP_MD_CTX *ctx)
Initiate a messsage digest context object. Deallocate with EVP_MD_CTX_cleanup(). Please use EVP_MD_CTX_create() instead ๐ (this one is the old way, lowkey deprecated, use the create one)
Parameters
ctxโ variable to initiate.
const EVP_MD* EVP_MD_CTX_md(EVP_MD_CTX *ctx)
Get the EVP_MD use for a specified context ๐
Parameters
ctxโ theEVP_MDcontext to get theEVP_MDfor.
Returns: the EVP_MD used for the context.
size_t EVP_MD_CTX_size(EVP_MD_CTX *ctx)
Return the output size of the message digest function ๐
Parameters
ctxโ the evp message digest context.
Returns: size output size of the message digest function.
const EVP_MD* EVP_md_null(void)
The null message digest โ digesting absolutely nothing, and doing it gorgeously ๐
Returns: the message digest type.
size_t EVP_MD_size(const EVP_MD *md)
Return the output size of the message digest function ๐งฎ
Parameters
mdโ the evp message.
Returns: size output size of the message digest function.
const EVP_CIPHER* EVP_rc2_40_cbc(void)
The RC2 cipher type ๐
Returns: the RC2 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_rc2_64_cbc(void)
The RC2 cipher type ๐
Returns: the RC2 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_rc2_cbc(void)
The RC2 cipher type ๐
Returns: the RC2 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_rc4(void)
The RC4 cipher type ๐
Returns: the RC4 EVP_CIPHER pointer.
const EVP_CIPHER* EVP_rc4_40(void)
The RC4-40 cipher type ๐ง
Returns: the RC4-40 EVP_CIPHER pointer.
const EVP_MD* EVP_sha(void)
The message digest SHA1 โจ
Returns: the message digest type.
const EVP_MD* EVP_sha1(void)
The message digest SHA1 ๐
Returns: the message digest type.
const EVP_MD* EVP_sha256(void)
The message digest SHA256 ๐
Returns: the message digest type.
const EVP_MD* EVP_sha384(void)
The message digest SHA384 ๐ฆ
Returns: the message digest type.
const EVP_MD* EVP_sha512(void)
The message digest SHA512 ๐
Returns: the message digest type.
const EVP_CIPHER* EVP_wincrypt_des_ede3_cbc(void)
The triple DES cipher type (Micrsoft crypt provider) โ yes, Micrsoft, that's the spelling in the source, we're just the messenger ๐ซก
Returns: the DES-EDE3-CBC EVP_CIPHER pointer.
okay bestie, we're deep in the macro zone now ๐
these are the cipher-type generators that wire up OpenSSL, Windows CNG, and CommonCrypto. Each one hands you back an EVP_CIPHER pointer, and we're gonna go through every single one. No skipping, no cap. โจ
hc_EVP_CIPH_CBC_MODE OSSL_CIPHER_ALGORITHM (rc2_64_cbc, hc_EVP_CIPH_CBC_MODE| hc_EVP_CIPH_VARIABLE_LENGTH)โ The RC2-64 cipher type - OpenSSL
Returns
- the RC2-64
EVP_CIPHERpointer. - The Camellia-128 cipher type - OpenSSL โ the Camellia-128
EVP_CIPHERpointer. - The Camellia-198 cipher type - OpenSSL โ the Camellia-198
EVP_CIPHERpointer. - The Camellia-256 cipher type - OpenSSL โ the Camellia-256
EVP_CIPHERpointer. - The RC4 cipher type (OpenSSL provider) โ the RC4
EVP_CIPHERpointer.
OSSL_CIPHER_ALGORITHM (rc2_cbc, hc_EVP_CIPH_CBC_MODE| hc_EVP_CIPH_VARIABLE_LENGTH)โ The triple DES cipher type (OpenSSL provider)
Returns
- the DES-EDE3-CBC
EVP_CIPHERpointer. - The DES cipher type (OpenSSL provider) โ the DES-CBC
EVP_CIPHERpointer. - The AES-128 cipher type (OpenSSL provider) โ the AES-128-CBC
EVP_CIPHERpointer. - The AES-192 cipher type (OpenSSL provider) โ the AES-192-CBC
EVP_CIPHERpointer. - The AES-256 cipher type (OpenSSL provider) โ the AES-256-CBC
EVP_CIPHERpointer. - The AES-128 CFB8 cipher type (OpenSSL provider) โ the AES-128-CFB8
EVP_CIPHERpointer. - The AES-192 CFB8 cipher type (OpenSSL provider) โ the AES-192-CFB8
EVP_CIPHERpointer. - The AES-256 CFB8 cipher type (OpenSSL provider) โ the AES-256-CFB8
EVP_CIPHERpointer. - The RC2 cipher type - OpenSSL โ the RC2
EVP_CIPHERpointer. - The RC2-40 cipher type - OpenSSL โ the RC2-40
EVP_CIPHERpointer.
WINCNG_CIPHER_ALGORITHM (aes_128_cbc, BCRYPT_AES_ALGORITHM, 16, 16, 16, EVP_CIPH_CBC_MODE)โ The AES-128 cipher type (Windows CNG provider)
Returns: the AES-128-CBC EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (aes_128_cfb8, BCRYPT_AES_ALGORITHM, 16, 16, 16, EVP_CIPH_CFB8_MODE)โ The AES-128 CFB8 cipher type (Windows CNG provider)
Returns: the AES-128-CFB8 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (aes_192_cbc, BCRYPT_AES_ALGORITHM, 16, 24, 16, EVP_CIPH_CBC_MODE)โ The AES-192 cipher type (Windows CNG provider)
Returns: the AES-192-CBC EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (aes_192_cfb8, BCRYPT_AES_ALGORITHM, 16, 24, 16, EVP_CIPH_CFB8_MODE)โ The AES-192 CFB8 cipher type (Windows CNG provider)
Returns: the AES-192-CFB8 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (aes_256_cbc, BCRYPT_AES_ALGORITHM, 16, 32, 16, EVP_CIPH_CBC_MODE)โ The AES-256 cipher type (Windows CNG provider)
Returns: the AES-256-CBC EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (aes_256_cfb8, BCRYPT_AES_ALGORITHM, 16, 32, 16, EVP_CIPH_CFB8_MODE)โ The AES-256 CFB8 cipher type (Windows CNG provider)
Returns: the AES-256-CFB8 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (des_cbc, BCRYPT_DES_ALGORITHM, 8, 8, 8, EVP_CIPH_CBC_MODE)โ The DES cipher type (Windows CNG provider)
Returns: the DES-CBC EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (des_ede3_cbc, BCRYPT_3DES_ALGORITHM, 8, 24, 8, EVP_CIPH_CBC_MODE)โ The triple DES cipher type (Windows CNG provider)
Returns: the DES-EDE3-CBC EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (rc2_40_cbc, BCRYPT_RC2_ALGORITHM, 8, 5, 8, EVP_CIPH_CBC_MODE)โ The RC2-40 cipher type - Windows CNG
Returns: the RC2-40 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (rc2_64_cbc, BCRYPT_RC2_ALGORITHM, 8, 8, 8, EVP_CIPH_CBC_MODE)โ The RC2-64 cipher type - Windows CNG
Returns: the RC2-64 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (rc2_cbc, BCRYPT_RC2_ALGORITHM, 8, 16, 8, EVP_CIPH_CBC_MODE)โ The RC2 cipher type - Windows CNG
Returns: the RC2 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (rc4, BCRYPT_RC4_ALGORITHM, 1, 16, 0, EVP_CIPH_STREAM_CIPHER| EVP_CIPH_VARIABLE_LENGTH)โ The RC4 cipher type (Windows CNG provider)
Returns: the RC4 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM (rc4_40, BCRYPT_RC4_ALGORITHM, 1, 5, 0, EVP_CIPH_STREAM_CIPHER| EVP_CIPH_VARIABLE_LENGTH)โ The RC4-40 cipher type (Windows CNG provider)
Returns: the RC4 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM_UNAVAILABLE (camellia_128_cbc)โ The Camellia-128 cipher type - CommonCrypto
Returns: the Camellia-128 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM_UNAVAILABLE (camellia_192_cbc)โ The Camellia-198 cipher type - CommonCrypto
Returns: the Camellia-198 EVP_CIPHER pointer.
WINCNG_CIPHER_ALGORITHM_UNAVAILABLE (camellia_256_cbc)โ The Camellia-256 cipher type - CommonCrypto
Returns: the Camellia-256 EVP_CIPHER pointer.
โจ Author โจ
Generated automatically by Doxygen for the Heimdal crypto library from the source code. So yeah, this whole page is a robot's homework. ๐คโจ
That's a wrap, bestie! This was hcrypto_evp(3), version 7.8.0, dated Tue Nov 15 2022. Stay encrypted, stay iconic. ๐๐
๐ฆ where this page comes from
- alpine 3.22: heimdal-doc 7.8.0-r4 ยท BSD-3-Clause
- alpine 3.23: heimdal-doc 7.8.0-r5 ยท BSD-3-Clause
- alpine 3.24: heimdal-doc 7.8.0-r5 ยท BSD-3-Clause
- epel 10: heimdal-devel 7.8.0-26.el10_2 ยท BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- epel 9: heimdal-devel 7.8.0-5.el9 ยท BSD and MIT
- fedora 43: heimdal-devel 7.8.0-26.fc43 ยท BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 43: heimdal-devel 7.8.0-26.fc43 ยท BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 ยท BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 ยท BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 ยท BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 ยท BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms