$LIBFIPS=libfips.a
# Enough of our implementations include prov/ciphercommon.h (present in
-# providers/common/include), which includes crypto/ciphermode_platform.h
+# providers/implementations/include), which includes crypto/ciphermode_platform.h
# (present in include), which in turn may include very internal header
# files in crypto/, so let's have a common include list for them all.
-$COMMON_INCLUDES=../crypto ../include common/include
+$COMMON_INCLUDES=../crypto ../include implementations/include common/include
INCLUDE[$LIBCOMMON]=$COMMON_INCLUDES
-INCLUDE[$LIBIMPLEMENTATIONS]=.. $COMMON_INCLUDES implementations/include
-INCLUDE[$LIBLEGACY]=$COMMON_INCLUDES implementations/include
+INCLUDE[$LIBIMPLEMENTATIONS]=.. $COMMON_INCLUDES
+INCLUDE[$LIBLEGACY]=$COMMON_INCLUDES
INCLUDE[$LIBNONFIPS]=$COMMON_INCLUDES
INCLUDE[$LIBFIPS]=.. $COMMON_INCLUDES
DEFINE[$LIBFIPS]=FIPS_MODE
SOURCE[$DEFAULTGOAL]=$LIBIMPLEMENTATIONS $LIBNONFIPS
SOURCE[$DEFAULTGOAL]=defltprov.c
# Some legacy implementations depend on provider header files
-INCLUDE[../libcrypto]=implementations/include
+INCLUDE[$DEFAULTGOAL]=implementations/include
LIBS=$DEFAULTGOAL
-SUBDIRS=digests ciphers
-
SOURCE[../libcommon.a]=provider_err.c bio_prov.c
$FIPSCOMMON=provider_util.c
SOURCE[../libnonfips.a]=$FIPSCOMMON nid_to_name.c
+++ /dev/null
-# This source is common building blocks for all ciphers in all our providers.
-SOURCE[../../libcommon.a]=\
- cipher_common.c cipher_common_hw.c block.c \
- cipher_gcm.c cipher_gcm_hw.c \
- cipher_ccm.c cipher_ccm_hw.c
+++ /dev/null
-# This source is common for all digests in all our providers.
-SOURCE[../../libcommon.a]=digest_common.c
# The latter may become legacy sooner, so it's comfortable to have two
# variables already now, to switch the non-FIPSable TDES to legacy if needed.
+$COMMON_GOAL=../../libcommon.a
+
$AES_GOAL=../../libimplementations.a
$TDES_1_GOAL=../../libimplementations.a
$TDES_2_GOAL=../../libimplementations.a
$CHACHAPOLY_GOAL=../../libimplementations.a
$SIV_GOAL=../../libimplementations.a
+# This source is common building blocks for all ciphers in all our providers.
+SOURCE[$COMMON_GOAL]=\
+ ciphercommon.c ciphercommon_hw.c ciphercommon_block.c \
+ ciphercommon_gcm.c ciphercommon_gcm_hw.c \
+ ciphercommon_ccm.c ciphercommon_ccm_hw.c
+
IF[{- !$disabled{des} -}]
SOURCE[$TDES_1_GOAL]=cipher_tdes.c cipher_tdes_hw.c
ENDIF
/* Dispatch functions for AES CCM mode */
#include "prov/ciphercommon.h"
-#include "prov/cipher_ccm.h"
+#include "prov/ciphercommon_ccm.h"
#include "prov/implementations.h"
static void *aes_ccm_newctx(void *provctx, size_t keybits)
/* AES CCM mode */
#include "prov/ciphercommon.h"
-#include "prov/cipher_ccm.h"
+#include "prov/ciphercommon_ccm.h"
#define AES_HW_CCM_SET_KEY_FN(fn_set_enc_key, fn_blk, fn_ccm_enc, fn_ccm_dec) \
fn_set_enc_key(key, keylen * 8, &actx->ccm.ks.ks); \
/*-
* AES-NI support for AES CCM.
- * This file is included by cipher_ccm_hw.c
+ * This file is included by cipher_aes_ccm_hw.c
*/
static int ccm_aesni_initkey(PROV_CCM_CTX *ctx, const unsigned char *key,
/*-
* S390X support for AES CCM.
- * This file is included by cipher_ccm_hw.c
+ * This file is included by cipher_aes_ccm_hw.c
*/
#define S390X_CCM_AAD_FLAG 0x40
/*-
* Fujitsu SPARC64 X support for AES CCM.
- * This file is included by cipher_ccm_hw.c
+ * This file is included by cipher_aes_ccm_hw.c
*/
static int ccm_t4_aes_initkey(PROV_CCM_CTX *ctx, const unsigned char *key,
/* Dispatch functions for AES GCM mode */
#include "prov/ciphercommon.h"
-#include "prov/cipher_gcm.h"
+#include "prov/ciphercommon_gcm.h"
#include "prov/implementations.h"
static void *aes_gcm_newctx(void *provctx, size_t keybits)
/* Dispatch functions for AES GCM mode */
#include "prov/ciphercommon.h"
-#include "prov/cipher_gcm.h"
+#include "prov/ciphercommon_gcm.h"
static int generic_aes_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key,
size_t keylen)
/*-
* AES-NI support for AES GCM.
- * This file is included by cipher_gcm_hw.c
+ * This file is included by cipher_aes_gcm_hw.c
*/
static int aesni_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key,
/*-
* IBM S390X support for AES GCM.
- * This file is included by cipher_gcm_hw.c
+ * This file is included by cipher_aes_gcm_hw.c
*/
/* iv + padding length for iv lengths != 12 */
/*-
* Fujitsu SPARC64 X support for AES GCM.
- * This file is included by cipher_gcm_hw.c
+ * This file is included by cipher_aes_gcm_hw.c
*/
static int t4_aes_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key,
#include "cipher_aes_ocb.h"
#include "prov/providercommonerr.h"
-#include "prov/cipher_aead.h"
+#include "prov/ciphercommon_aead.h"
#include "prov/implementations.h"
#define AES_OCB_FLAGS AEAD_FLAGS
#include "cipher_aes_siv.h"
#include "prov/implementations.h"
#include "prov/providercommonerr.h"
-#include "prov/cipher_aead.h"
+#include "prov/ciphercommon_aead.h"
#define siv_stream_update siv_cipher
#define SIV_FLAGS AEAD_FLAGS
#include "crypto/aria.h"
#include "prov/ciphercommon.h"
-#include "prov/cipher_ccm.h"
+#include "prov/ciphercommon_ccm.h"
typedef struct prov_aria_ccm_ctx_st {
PROV_CCM_CTX base; /* Must be first */
#include "crypto/aria.h"
#include "prov/ciphercommon.h"
-#include "prov/cipher_gcm.h"
+#include "prov/ciphercommon_gcm.h"
typedef struct prov_aria_gcm_ctx_st {
PROV_GCM_CTX base; /* must be first entry in struct */
* Generic dispatch table functions for ciphers.
*/
-#include "cipher_local.h"
+#include "ciphercommon_local.h"
#include "prov/provider_ctx.h"
#include "prov/providercommonerr.h"
*/
#include <assert.h>
-#include "cipher_local.h"
+#include "ciphercommon_local.h"
#include "prov/providercommonerr.h"
/*
/* Dispatch functions for ccm mode */
#include "prov/ciphercommon.h"
-#include "prov/cipher_ccm.h"
+#include "prov/ciphercommon_ccm.h"
#include "prov/providercommonerr.h"
static int ccm_cipher_internal(PROV_CCM_CTX *ctx, unsigned char *out,
*/
#include "prov/ciphercommon.h"
-#include "prov/cipher_ccm.h"
+#include "prov/ciphercommon_ccm.h"
int ccm_generic_setiv(PROV_CCM_CTX *ctx, const unsigned char *nonce,
size_t nlen, size_t mlen)
/* Dispatch functions for gcm mode */
#include "prov/ciphercommon.h"
-#include "prov/cipher_gcm.h"
+#include "prov/ciphercommon_gcm.h"
#include "prov/providercommonerr.h"
#include "crypto/rand.h"
#include "prov/provider_ctx.h"
*/
#include "prov/ciphercommon.h"
-#include "prov/cipher_gcm.h"
+#include "prov/ciphercommon_gcm.h"
int gcm_setiv(PROV_GCM_CTX *ctx, const unsigned char *iv, size_t ivlen)
# We make separate GOAL variables for each algorithm, to make it easy to
# switch each to the Legacy provider when needed.
+$COMMON_GOAL=../../libcommon.a
+
$SHA1_GOAL=../../libimplementations.a
$SHA2_GOAL=../../libimplementations.a
$SHA3_GOAL=../../libimplementations.a
$WHIRLPOOL_GOAL=../../liblegacy.a
$RIPEMD_GOAL=../../liblegacy.a
+# This source is common for all digests in all our providers.
+SOURCE[$COMMON_GOAL]=digestcommon.c
+
SOURCE[$SHA2_GOAL]=sha2_prov.c
SOURCE[$SHA3_GOAL]=sha3_prov.c
-$GOAL=../../libimplementations.a
-
IF[{- !$disabled{blake2} -}]
SOURCE[$BLAKE2_GOAL]=blake2_prov.c blake2b_prov.c blake2s_prov.c
ENDIF
* https://www.openssl.org/source/license.html
*/
-#include "cipher_aead.h"
+#include "ciphercommon_aead.h"
typedef struct prov_ccm_hw_st PROV_CCM_HW;
*/
#include <openssl/aes.h>
-#include "cipher_aead.h"
+#include "ciphercommon_aead.h"
typedef struct prov_gcm_hw_st PROV_GCM_HW;