57 #ifndef OPENSSL_HEADER_CIPHER_H 58 #define OPENSSL_HEADER_CIPHER_H 62 #if defined(__cplusplus) 170 int *out_len,
const uint8_t *in,
187 int *out_len,
const uint8_t *in,
215 const uint8_t *in,
size_t in_len);
220 int *out_len,
const uint8_t *in,
330 #define EVP_CIPH_STREAM_CIPHER 0x0 331 #define EVP_CIPH_ECB_MODE 0x1 332 #define EVP_CIPH_CBC_MODE 0x2 333 #define EVP_CIPH_CFB_MODE 0x3 334 #define EVP_CIPH_OFB_MODE 0x4 335 #define EVP_CIPH_CTR_MODE 0x5 336 #define EVP_CIPH_GCM_MODE 0x6 337 #define EVP_CIPH_XTS_MODE 0x7 344 #define EVP_CIPH_VARIABLE_LENGTH 0x40 349 #define EVP_CIPH_ALWAYS_CALL_INIT 0x80 353 #define EVP_CIPH_CUSTOM_IV 0x100 357 #define EVP_CIPH_CTRL_INIT 0x200 361 #define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x400 366 #define EVP_CIPH_FLAG_AEAD_CIPHER 0x800 371 #define EVP_CIPH_CUSTOM_COPY 0x1000 415 #define EVP_CIPH_NO_PADDING 0x800 418 #define EVP_CTRL_INIT 0x0 419 #define EVP_CTRL_SET_KEY_LENGTH 0x1 420 #define EVP_CTRL_GET_RC2_KEY_BITS 0x2 421 #define EVP_CTRL_SET_RC2_KEY_BITS 0x3 422 #define EVP_CTRL_GET_RC5_ROUNDS 0x4 423 #define EVP_CTRL_SET_RC5_ROUNDS 0x5 424 #define EVP_CTRL_RAND_KEY 0x6 425 #define EVP_CTRL_PBE_PRF_NID 0x7 426 #define EVP_CTRL_COPY 0x8 427 #define EVP_CTRL_GCM_SET_IVLEN 0x9 428 #define EVP_CTRL_GCM_GET_TAG 0x10 429 #define EVP_CTRL_GCM_SET_TAG 0x11 430 #define EVP_CTRL_GCM_SET_IV_FIXED 0x12 431 #define EVP_CTRL_GCM_IV_GEN 0x13 432 #define EVP_CTRL_AEAD_SET_MAC_KEY 0x17 434 #define EVP_CTRL_GCM_SET_IV_INV 0x18 438 #define EVP_GCM_TLS_FIXED_IV_LEN 4 440 #define EVP_GCM_TLS_EXPLICIT_IV_LEN 8 442 #define EVP_GCM_TLS_TAG_LEN 16 444 #define EVP_MAX_KEY_LENGTH 64 445 #define EVP_MAX_IV_LENGTH 16 446 #define EVP_MAX_BLOCK_LENGTH 32 541 #if defined(__cplusplus) 544 #if !defined(BORINGSSL_NO_CXX) 551 using ScopedEVP_CIPHER_CTX =
562 #define CIPHER_R_AES_KEY_SETUP_FAILED 100 563 #define CIPHER_R_BAD_DECRYPT 101 564 #define CIPHER_R_BAD_KEY_LENGTH 102 565 #define CIPHER_R_BUFFER_TOO_SMALL 103 566 #define CIPHER_R_CTRL_NOT_IMPLEMENTED 104 567 #define CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED 105 568 #define CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 106 569 #define CIPHER_R_INITIALIZATION_ERROR 107 570 #define CIPHER_R_INPUT_NOT_INITIALIZED 108 571 #define CIPHER_R_INVALID_AD_SIZE 109 572 #define CIPHER_R_INVALID_KEY_LENGTH 110 573 #define CIPHER_R_INVALID_NONCE_SIZE 111 574 #define CIPHER_R_INVALID_OPERATION 112 575 #define CIPHER_R_IV_TOO_LARGE 113 576 #define CIPHER_R_NO_CIPHER_SET 114 577 #define CIPHER_R_OUTPUT_ALIASES_INPUT 115 578 #define CIPHER_R_TAG_TOO_LARGE 116 579 #define CIPHER_R_TOO_LARGE 117 580 #define CIPHER_R_UNSUPPORTED_AD_SIZE 118 581 #define CIPHER_R_UNSUPPORTED_INPUT_SIZE 119 582 #define CIPHER_R_UNSUPPORTED_KEY_SIZE 120 583 #define CIPHER_R_UNSUPPORTED_NONCE_SIZE 121 584 #define CIPHER_R_UNSUPPORTED_TAG_SIZE 122 585 #define CIPHER_R_WRONG_FINAL_BLOCK_LENGTH 123 586 #define CIPHER_R_NO_DIRECTION_SET 124 OPENSSL_EXPORT const EVP_CIPHER * EVP_des_ede3_cbc(void)
Definition: e_des.c:159
GLint GLsizei count
Definition: gl2.h:421
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_128_ofb(void)
OPENSSL_EXPORT int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len)
Definition: cipher.c:424
OPENSSL_EXPORT const EVP_CIPHER * EVP_get_cipherbyname(const char *name)
Definition: cipher.c:629
OPENSSL_EXPORT int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, uint8_t *out, int *out_len, const uint8_t *in, int in_len)
Definition: cipher.c:488
OPENSSL_EXPORT unsigned EVP_CIPHER_key_length(const EVP_CIPHER *cipher)
Definition: cipher.c:591
OPENSSL_EXPORT int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, uint8_t *out, int *out_len, const uint8_t *in, int in_len)
Definition: cipher.c:254
void * cipher_data
Definition: cipher.h:456
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_192_ecb(void)
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_128_gcm(void)
OPENSSL_EXPORT void * EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx)
Definition: cipher.c:525
unsigned key_len
Definition: cipher.h:511
unsigned iv_len
Definition: cipher.h:514
unsigned int uint32_t
Definition: ptypes.h:105
OPENSSL_EXPORT EVP_CIPHER_CTX * EVP_CIPHER_CTX_new(void)
Definition: cipher.c:94
OPENSSL_EXPORT int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
Definition: cipher.c:122
int buf_len
Definition: cipher.h:480
OPENSSL_EXPORT const EVP_CIPHER * EVP_des_ecb(void)
Definition: e_des.c:120
OPENSSL_EXPORT unsigned EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx)
Definition: cipher.c:517
Definition: internal.h:67
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: gl2ext.h:134
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_256_ofb(void)
OPENSSL_EXPORT int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const uint8_t *key, const uint8_t *iv)
Definition: cipher.c:244
OPENSSL_EXPORT void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data)
Definition: cipher.c:529
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_256_gcm(void)
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_128_ecb(void)
OPENSSL_EXPORT int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, uint8_t *out, int *out_len)
Definition: cipher.c:497
unsigned block_size
Definition: cipher.h:507
const EVP_CIPHER * EVP_rc2_40_cbc(void)
Definition: e_rc2.c:428
OPENSSL_EXPORT int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad)
Definition: cipher.c:562
OPENSSL_EXPORT void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
Definition: cipher.c:115
OPENSSL_EXPORT const EVP_CIPHER * EVP_enc_null(void)
Definition: e_null.c:85
const EVP_CIPHER * cipher
Definition: cipher.h:450
OPENSSL_EXPORT const EVP_CIPHER * EVP_rc2_cbc(void)
Definition: e_rc2.c:446
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_192_gcm(void)
int pad
Definition: statusor_test.cc:47
OPENSSL_EXPORT int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, uint8_t *out, int *out_len, const uint8_t *in, int in_len)
Definition: cipher.c:367
OPENSSL_EXPORT void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx)
Definition: cipher.c:90
OPENSSL_EXPORT int EVP_CIPHER_nid(const EVP_CIPHER *cipher)
Definition: cipher.c:585
const EVP_CIPHER * cipher
Definition: cipher.h:497
OPENSSL_EXPORT int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *ctx)
Definition: cipher.c:102
void
Definition: AVFoundationCFSoftLinking.h:81
int
Definition: runtests.py:53
OPENSSL_EXPORT int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv)
Definition: cipher.c:620
OPENSSL_EXPORT int nid
Definition: x509.h:1056
OPENSSL_EXPORT const EVP_CIPHER * EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx)
Definition: cipher.c:505
OPENSSL_EXPORT int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, const uint8_t *key, const uint8_t *iv, int enc)
Definition: cipher.c:147
int int * out
Definition: gcc-loops.cpp:206
#define OPENSSL_EXPORT
Definition: base.h:160
struct evp_cipher_ctx_st EVP_CIPHER_CTX
Definition: base.h:269
OPENSSL_EXPORT int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, const uint8_t *salt, const uint8_t *data, size_t data_len, unsigned count, uint8_t *key, uint8_t *iv)
Definition: derive_key.c:69
OPENSSL_EXPORT const EVP_CIPHER * EVP_rc4(void)
Definition: e_rc4.c:87
OPENSSL_EXPORT int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, uint8_t *out, int *out_len)
Definition: cipher.c:323
EGLContext ctx
Definition: eglext.h:192
uint8_t iv[EVP_MAX_IV_LENGTH]
Definition: cipher.h:472
unsigned char uint8_t
Definition: ptypes.h:89
OPENSSL_EXPORT const EVP_CIPHER * EVP_des_cbc(void)
Definition: e_des.c:96
OPENSSL_EXPORT const EVP_CIPHER * EVP_des_ede(void)
Definition: e_des.c:205
uint8_t oiv[EVP_MAX_IV_LENGTH]
Definition: cipher.h:469
OPENSSL_EXPORT int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv)
Definition: cipher.c:615
uint32_t flags
Definition: cipher.h:521
EGLImageKHR EGLint * name
Definition: eglext.h:851
OPENSSL_EXPORT const EVP_CIPHER * EVP_get_cipherbynid(int nid)
Definition: cipher.c:69
void * app_data
Definition: cipher.h:453
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_128_cbc(void)
OPENSSL_EXPORT unsigned EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx)
Definition: cipher.c:513
#define EVP_MAX_IV_LENGTH
Definition: cipher.h:445
struct evp_cipher_info_st EVP_CIPHER_INFO
EGLenum type
Definition: eglext.h:63
OPENSSL_EXPORT uint32_t EVP_CIPHER_CTX_mode(const EVP_CIPHER_CTX *ctx)
Definition: cipher.c:537
EGLStreamKHR EGLint EGLint EGLint const void * data
Definition: eglext.h:984
unsigned num
Definition: cipher.h:484
int final_used
Definition: cipher.h:487
unsigned key_len
Definition: cipher.h:460
void init()
Definition: HTMLNames.cpp:1637
OPENSSL_EXPORT int EVP_Cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, size_t in_len)
Definition: cipher.c:483
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_128_ctr(void)
uint32_t flags
Definition: cipher.h:466
OPENSSL_EXPORT uint32_t EVP_CIPHER_mode(const EVP_CIPHER *cipher)
Definition: cipher.c:603
OPENSSL_EXPORT uint32_t EVP_CIPHER_flags(const EVP_CIPHER *cipher)
Definition: cipher.c:599
OPENSSL_EXPORT const EVP_CIPHER * EVP_des_ede_cbc(void)
Definition: e_des.c:180
OPENSSL_EXPORT unsigned EVP_CIPHER_iv_length(const EVP_CIPHER *cipher)
Definition: cipher.c:595
Definition: bytestring_test.cc:31
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_256_ctr(void)
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_256_ecb(void)
void * app_data
Definition: cipher.h:524
int block_mask
Definition: cipher.h:491
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_192_cbc(void)
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_192_ctr(void)
OPENSSL_EXPORT unsigned EVP_CIPHER_block_size(const EVP_CIPHER *cipher)
Definition: cipher.c:587
OPENSSL_EXPORT int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
Definition: cipher.c:509
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_256_cbc(void)
OPENSSL_EXPORT uint32_t EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx)
Definition: cipher.c:533
CFArrayRef CFTypeRef key
Definition: AVFoundationCFSoftLinking.h:129
OPENSSL_EXPORT int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int command, int arg, void *ptr)
Definition: cipher.c:541
int nid
Definition: cipher.h:503
OPENSSL_EXPORT int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const uint8_t *key, const uint8_t *iv, int enc)
Definition: cipher.c:607
% % Enter the path to YOUR executable and remember to define the perprocessor % variable PRINT_MIPS te get the instructions printed to the screen % command
Definition: complexityMeasures.m:7
OPENSSL_EXPORT int EVP_add_cipher_alias(const char *a, const char *b)
Definition: cipher.c:625
unsigned ctx_size
Definition: cipher.h:518
OPENSSL_EXPORT int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const uint8_t *key, const uint8_t *iv)
Definition: cipher.c:249
int encrypt
Definition: cipher.h:463
OPENSSL_EXPORT const EVP_CIPHER * EVP_aes_256_xts(void)
Definition: xts.c:258
OPENSSL_EXPORT int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *ctx, unsigned key_len)
Definition: cipher.c:571
#define EVP_MAX_BLOCK_LENGTH
Definition: cipher.h:446
OPENSSL_EXPORT unsigned EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx)
Definition: cipher.c:521