Loading crypto/evp/c_allc.c +6 −0 Original line number Diff line number Diff line Loading @@ -172,7 +172,9 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_128_ofb()); EVP_add_cipher(EVP_aes_128_ctr()); EVP_add_cipher(EVP_aes_128_gcm()); #ifndef OPENSSL_NO_OCB EVP_add_cipher(EVP_aes_128_ocb()); #endif EVP_add_cipher(EVP_aes_128_xts()); EVP_add_cipher(EVP_aes_128_ccm()); EVP_add_cipher(EVP_aes_128_wrap()); Loading @@ -187,7 +189,9 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_192_ofb()); EVP_add_cipher(EVP_aes_192_ctr()); EVP_add_cipher(EVP_aes_192_gcm()); #ifndef OPENSSL_NO_OCB EVP_add_cipher(EVP_aes_192_ocb()); #endif EVP_add_cipher(EVP_aes_192_ccm()); EVP_add_cipher(EVP_aes_192_wrap()); EVP_add_cipher(EVP_aes_192_wrap_pad()); Loading @@ -201,7 +205,9 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_256_ofb()); EVP_add_cipher(EVP_aes_256_ctr()); EVP_add_cipher(EVP_aes_256_gcm()); #ifndef OPENSSL_NO_OCB EVP_add_cipher(EVP_aes_256_ocb()); #endif EVP_add_cipher(EVP_aes_256_xts()); EVP_add_cipher(EVP_aes_256_ccm()); EVP_add_cipher(EVP_aes_256_wrap()); Loading crypto/evp/e_aes.c +8 −4 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ typedef struct ccm128_f str; } EVP_AES_CCM_CTX; #ifndef OPENSSL_NO_OCB typedef struct { AES_KEY ksenc; /* AES key schedule to use for encryption */ Loading @@ -124,6 +124,7 @@ typedef struct int ivlen; /* IV length */ int taglen; } EVP_AES_OCB_CTX; #endif #define MAXBITCHUNK ((size_t)1<<(sizeof(size_t)*8-4)) Loading Loading @@ -469,6 +470,7 @@ static int aesni_ccm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, static int aesni_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len); #ifndef OPENSSL_NO_OCB static int aesni_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { Loading Loading @@ -519,7 +521,7 @@ static int aesni_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, #define aesni_ocb_cipher aes_ocb_cipher static int aesni_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len); #endif /* OPENSSL_NO_OCB */ #define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \ static const EVP_CIPHER aesni_##keylen##_##mode = { \ Loading Loading @@ -907,7 +909,7 @@ static int aes_t4_ccm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, static int aes_t4_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len); #ifndef OPENSSL_NO_OCB static int aes_t4_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { Loading Loading @@ -958,7 +960,7 @@ static int aes_t4_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, #define aes_t4_ocb_cipher aes_ocb_cipher static int aes_t4_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len); #endif /* OPENSSL_NO_OCB */ #define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \ static const EVP_CIPHER aes_t4_##keylen##_##mode = { \ Loading Loading @@ -2361,6 +2363,7 @@ const EVP_CIPHER *EVP_aes_256_wrap_pad(void) return &aes_256_wrap_pad; } #ifndef OPENSSL_NO_OCB static int aes_ocb_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) { EVP_AES_OCB_CTX *octx = c->cipher_data; Loading Loading @@ -2645,5 +2648,6 @@ static int aes_ocb_cleanup(EVP_CIPHER_CTX *c) BLOCK_CIPHER_custom(NID_aes,128,16,12,ocb,OCB,CUSTOM_FLAGS) BLOCK_CIPHER_custom(NID_aes,192,16,12,ocb,OCB,CUSTOM_FLAGS) BLOCK_CIPHER_custom(NID_aes,256,16,12,ocb,OCB,CUSTOM_FLAGS) #endif /* OPENSSL_NO_OCB */ #endif crypto/evp/evp.h +6 −0 Original line number Diff line number Diff line Loading @@ -857,7 +857,9 @@ const EVP_CIPHER *EVP_aes_128_gcm(void); const EVP_CIPHER *EVP_aes_128_xts(void); const EVP_CIPHER *EVP_aes_128_wrap(void); const EVP_CIPHER *EVP_aes_128_wrap_pad(void); #ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_128_ocb(void); #endif const EVP_CIPHER *EVP_aes_192_ecb(void); const EVP_CIPHER *EVP_aes_192_cbc(void); const EVP_CIPHER *EVP_aes_192_cfb1(void); Loading @@ -870,7 +872,9 @@ const EVP_CIPHER *EVP_aes_192_ccm(void); const EVP_CIPHER *EVP_aes_192_gcm(void); const EVP_CIPHER *EVP_aes_192_wrap(void); const EVP_CIPHER *EVP_aes_192_wrap_pad(void); #ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_192_ocb(void); #endif const EVP_CIPHER *EVP_aes_256_ecb(void); const EVP_CIPHER *EVP_aes_256_cbc(void); const EVP_CIPHER *EVP_aes_256_cfb1(void); Loading @@ -884,7 +888,9 @@ const EVP_CIPHER *EVP_aes_256_gcm(void); const EVP_CIPHER *EVP_aes_256_xts(void); const EVP_CIPHER *EVP_aes_256_wrap(void); const EVP_CIPHER *EVP_aes_256_wrap_pad(void); #ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_256_ocb(void); #endif # if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void); const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void); Loading crypto/evp/evp_test.c +4 −0 Original line number Diff line number Diff line Loading @@ -462,6 +462,10 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn, { const EVP_CIPHER *c; #ifdef OPENSSL_NO_OCB if(strstr(cipher, "ocb") != NULL) return 1; #endif c=EVP_get_cipherbyname(cipher); if(!c) return 0; Loading crypto/modes/modes.h +2 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,7 @@ size_t CRYPTO_128_unwrap_pad(void *key, const unsigned char *icv, unsigned char *out, const unsigned char *in, size_t inlen, block128_f block); #ifndef OPENSSL_NO_OCB typedef struct ocb128_context OCB128_CONTEXT; OCB128_CONTEXT *CRYPTO_ocb128_new(void *keyenc, void *keydec, block128_f encrypt, block128_f decrypt); Loading @@ -172,6 +173,7 @@ int CRYPTO_ocb128_finish(OCB128_CONTEXT *ctx,const unsigned char *tag, size_t len); int CRYPTO_ocb128_tag(OCB128_CONTEXT *ctx, unsigned char *tag, size_t len); void CRYPTO_ocb128_cleanup(OCB128_CONTEXT *ctx); #endif /* OPENSSL_NO_ECB */ #ifdef __cplusplus } Loading Loading
crypto/evp/c_allc.c +6 −0 Original line number Diff line number Diff line Loading @@ -172,7 +172,9 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_128_ofb()); EVP_add_cipher(EVP_aes_128_ctr()); EVP_add_cipher(EVP_aes_128_gcm()); #ifndef OPENSSL_NO_OCB EVP_add_cipher(EVP_aes_128_ocb()); #endif EVP_add_cipher(EVP_aes_128_xts()); EVP_add_cipher(EVP_aes_128_ccm()); EVP_add_cipher(EVP_aes_128_wrap()); Loading @@ -187,7 +189,9 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_192_ofb()); EVP_add_cipher(EVP_aes_192_ctr()); EVP_add_cipher(EVP_aes_192_gcm()); #ifndef OPENSSL_NO_OCB EVP_add_cipher(EVP_aes_192_ocb()); #endif EVP_add_cipher(EVP_aes_192_ccm()); EVP_add_cipher(EVP_aes_192_wrap()); EVP_add_cipher(EVP_aes_192_wrap_pad()); Loading @@ -201,7 +205,9 @@ void OpenSSL_add_all_ciphers(void) EVP_add_cipher(EVP_aes_256_ofb()); EVP_add_cipher(EVP_aes_256_ctr()); EVP_add_cipher(EVP_aes_256_gcm()); #ifndef OPENSSL_NO_OCB EVP_add_cipher(EVP_aes_256_ocb()); #endif EVP_add_cipher(EVP_aes_256_xts()); EVP_add_cipher(EVP_aes_256_ccm()); EVP_add_cipher(EVP_aes_256_wrap()); Loading
crypto/evp/e_aes.c +8 −4 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ typedef struct ccm128_f str; } EVP_AES_CCM_CTX; #ifndef OPENSSL_NO_OCB typedef struct { AES_KEY ksenc; /* AES key schedule to use for encryption */ Loading @@ -124,6 +124,7 @@ typedef struct int ivlen; /* IV length */ int taglen; } EVP_AES_OCB_CTX; #endif #define MAXBITCHUNK ((size_t)1<<(sizeof(size_t)*8-4)) Loading Loading @@ -469,6 +470,7 @@ static int aesni_ccm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, static int aesni_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len); #ifndef OPENSSL_NO_OCB static int aesni_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { Loading Loading @@ -519,7 +521,7 @@ static int aesni_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, #define aesni_ocb_cipher aes_ocb_cipher static int aesni_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len); #endif /* OPENSSL_NO_OCB */ #define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \ static const EVP_CIPHER aesni_##keylen##_##mode = { \ Loading Loading @@ -907,7 +909,7 @@ static int aes_t4_ccm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, static int aes_t4_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len); #ifndef OPENSSL_NO_OCB static int aes_t4_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { Loading Loading @@ -958,7 +960,7 @@ static int aes_t4_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, #define aes_t4_ocb_cipher aes_ocb_cipher static int aes_t4_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len); #endif /* OPENSSL_NO_OCB */ #define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \ static const EVP_CIPHER aes_t4_##keylen##_##mode = { \ Loading Loading @@ -2361,6 +2363,7 @@ const EVP_CIPHER *EVP_aes_256_wrap_pad(void) return &aes_256_wrap_pad; } #ifndef OPENSSL_NO_OCB static int aes_ocb_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) { EVP_AES_OCB_CTX *octx = c->cipher_data; Loading Loading @@ -2645,5 +2648,6 @@ static int aes_ocb_cleanup(EVP_CIPHER_CTX *c) BLOCK_CIPHER_custom(NID_aes,128,16,12,ocb,OCB,CUSTOM_FLAGS) BLOCK_CIPHER_custom(NID_aes,192,16,12,ocb,OCB,CUSTOM_FLAGS) BLOCK_CIPHER_custom(NID_aes,256,16,12,ocb,OCB,CUSTOM_FLAGS) #endif /* OPENSSL_NO_OCB */ #endif
crypto/evp/evp.h +6 −0 Original line number Diff line number Diff line Loading @@ -857,7 +857,9 @@ const EVP_CIPHER *EVP_aes_128_gcm(void); const EVP_CIPHER *EVP_aes_128_xts(void); const EVP_CIPHER *EVP_aes_128_wrap(void); const EVP_CIPHER *EVP_aes_128_wrap_pad(void); #ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_128_ocb(void); #endif const EVP_CIPHER *EVP_aes_192_ecb(void); const EVP_CIPHER *EVP_aes_192_cbc(void); const EVP_CIPHER *EVP_aes_192_cfb1(void); Loading @@ -870,7 +872,9 @@ const EVP_CIPHER *EVP_aes_192_ccm(void); const EVP_CIPHER *EVP_aes_192_gcm(void); const EVP_CIPHER *EVP_aes_192_wrap(void); const EVP_CIPHER *EVP_aes_192_wrap_pad(void); #ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_192_ocb(void); #endif const EVP_CIPHER *EVP_aes_256_ecb(void); const EVP_CIPHER *EVP_aes_256_cbc(void); const EVP_CIPHER *EVP_aes_256_cfb1(void); Loading @@ -884,7 +888,9 @@ const EVP_CIPHER *EVP_aes_256_gcm(void); const EVP_CIPHER *EVP_aes_256_xts(void); const EVP_CIPHER *EVP_aes_256_wrap(void); const EVP_CIPHER *EVP_aes_256_wrap_pad(void); #ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_256_ocb(void); #endif # if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void); const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void); Loading
crypto/evp/evp_test.c +4 −0 Original line number Diff line number Diff line Loading @@ -462,6 +462,10 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn, { const EVP_CIPHER *c; #ifdef OPENSSL_NO_OCB if(strstr(cipher, "ocb") != NULL) return 1; #endif c=EVP_get_cipherbyname(cipher); if(!c) return 0; Loading
crypto/modes/modes.h +2 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,7 @@ size_t CRYPTO_128_unwrap_pad(void *key, const unsigned char *icv, unsigned char *out, const unsigned char *in, size_t inlen, block128_f block); #ifndef OPENSSL_NO_OCB typedef struct ocb128_context OCB128_CONTEXT; OCB128_CONTEXT *CRYPTO_ocb128_new(void *keyenc, void *keydec, block128_f encrypt, block128_f decrypt); Loading @@ -172,6 +173,7 @@ int CRYPTO_ocb128_finish(OCB128_CONTEXT *ctx,const unsigned char *tag, size_t len); int CRYPTO_ocb128_tag(OCB128_CONTEXT *ctx, unsigned char *tag, size_t len); void CRYPTO_ocb128_cleanup(OCB128_CONTEXT *ctx); #endif /* OPENSSL_NO_ECB */ #ifdef __cplusplus } Loading