mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-16 04:20:49 +00:00
Merge pull request #9268 from tom-daubney-arm/remove_symmetric_crypto_alt_interface
Remove symmetric crypto alt interface
This commit is contained in:
commit
3f2d9b6a4d
@ -379,14 +379,11 @@
|
||||
//#define MBEDTLS_ARIA_ALT
|
||||
//#define MBEDTLS_CAMELLIA_ALT
|
||||
//#define MBEDTLS_CCM_ALT
|
||||
//#define MBEDTLS_CHACHA20_ALT
|
||||
//#define MBEDTLS_CHACHAPOLY_ALT
|
||||
//#define MBEDTLS_CMAC_ALT
|
||||
//#define MBEDTLS_DES_ALT
|
||||
//#define MBEDTLS_GCM_ALT
|
||||
//#define MBEDTLS_NIST_KW_ALT
|
||||
//#define MBEDTLS_MD5_ALT
|
||||
//#define MBEDTLS_POLY1305_ALT
|
||||
//#define MBEDTLS_RIPEMD160_ALT
|
||||
//#define MBEDTLS_SHA1_ALT
|
||||
//#define MBEDTLS_SHA256_ALT
|
||||
|
@ -1,16 +0,0 @@
|
||||
/* chacha20_alt.h with dummy types for MBEDTLS_CHACHA20_ALT */
|
||||
/*
|
||||
* Copyright The Mbed TLS Contributors
|
||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef CHACHA20_ALT_H
|
||||
#define CHACHA20_ALT_H
|
||||
|
||||
typedef struct mbedtls_chacha20_context {
|
||||
int dummy;
|
||||
}
|
||||
mbedtls_chacha20_context;
|
||||
|
||||
|
||||
#endif /* chacha20_alt.h */
|
@ -1,18 +0,0 @@
|
||||
/* chachapoly_alt.h with dummy types for MBEDTLS_CHACHAPOLY_ALT */
|
||||
/*
|
||||
* Copyright The Mbed TLS Contributors
|
||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef CHACHAPOLY_ALT_H
|
||||
#define CHACHAPOLY_ALT_H
|
||||
|
||||
#include "mbedtls/chacha20.h"
|
||||
|
||||
typedef struct mbedtls_chachapoly_context {
|
||||
int dummy;
|
||||
}
|
||||
mbedtls_chachapoly_context;
|
||||
|
||||
|
||||
#endif /* chachapoly_alt.h */
|
@ -1,16 +0,0 @@
|
||||
/* poly1305_alt.h with dummy types for MBEDTLS_POLY1305_ALT */
|
||||
/*
|
||||
* Copyright The Mbed TLS Contributors
|
||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef POLY1305_ALT_H
|
||||
#define POLY1305_ALT_H
|
||||
|
||||
typedef struct mbedtls_poly1305_context {
|
||||
int dummy;
|
||||
}
|
||||
mbedtls_poly1305_context;
|
||||
|
||||
|
||||
#endif /* poly1305_alt.h */
|
@ -33,8 +33,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_CHACHA20_ALT)
|
||||
|
||||
typedef struct mbedtls_chacha20_context {
|
||||
uint32_t MBEDTLS_PRIVATE(state)[16]; /*! The state (before round operations). */
|
||||
uint8_t MBEDTLS_PRIVATE(keystream8)[64]; /*! Leftover keystream bytes. */
|
||||
@ -42,10 +40,6 @@ typedef struct mbedtls_chacha20_context {
|
||||
}
|
||||
mbedtls_chacha20_context;
|
||||
|
||||
#else /* MBEDTLS_CHACHA20_ALT */
|
||||
#include "chacha20_alt.h"
|
||||
#endif /* MBEDTLS_CHACHA20_ALT */
|
||||
|
||||
/**
|
||||
* \brief This function initializes the specified ChaCha20 context.
|
||||
*
|
||||
|
@ -41,8 +41,6 @@ typedef enum {
|
||||
}
|
||||
mbedtls_chachapoly_mode_t;
|
||||
|
||||
#if !defined(MBEDTLS_CHACHAPOLY_ALT)
|
||||
|
||||
#include "mbedtls/chacha20.h"
|
||||
|
||||
typedef struct mbedtls_chachapoly_context {
|
||||
@ -55,10 +53,6 @@ typedef struct mbedtls_chachapoly_context {
|
||||
}
|
||||
mbedtls_chachapoly_context;
|
||||
|
||||
#else /* !MBEDTLS_CHACHAPOLY_ALT */
|
||||
#include "chachapoly_alt.h"
|
||||
#endif /* !MBEDTLS_CHACHAPOLY_ALT */
|
||||
|
||||
/**
|
||||
* \brief This function initializes the specified ChaCha20-Poly1305 context.
|
||||
*
|
||||
|
@ -33,8 +33,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_POLY1305_ALT)
|
||||
|
||||
typedef struct mbedtls_poly1305_context {
|
||||
uint32_t MBEDTLS_PRIVATE(r)[4]; /** The value for 'r' (low 128 bits of the key). */
|
||||
uint32_t MBEDTLS_PRIVATE(s)[4]; /** The value for 's' (high 128 bits of the key). */
|
||||
@ -44,10 +42,6 @@ typedef struct mbedtls_poly1305_context {
|
||||
}
|
||||
mbedtls_poly1305_context;
|
||||
|
||||
#else /* MBEDTLS_POLY1305_ALT */
|
||||
#include "poly1305_alt.h"
|
||||
#endif /* MBEDTLS_POLY1305_ALT */
|
||||
|
||||
/**
|
||||
* \brief This function initializes the specified Poly1305 context.
|
||||
*
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
#include "mbedtls/platform.h"
|
||||
|
||||
#if !defined(MBEDTLS_CHACHA20_ALT)
|
||||
|
||||
#define ROTL32(value, amount) \
|
||||
((uint32_t) ((value) << (amount)) | ((value) >> (32 - (amount))))
|
||||
|
||||
@ -271,8 +269,6 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* !MBEDTLS_CHACHA20_ALT */
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
|
||||
static const unsigned char test_keys[2][32] =
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
#include "mbedtls/platform.h"
|
||||
|
||||
#if !defined(MBEDTLS_CHACHAPOLY_ALT)
|
||||
|
||||
#define CHACHAPOLY_STATE_INIT (0)
|
||||
#define CHACHAPOLY_STATE_AAD (1)
|
||||
#define CHACHAPOLY_STATE_CIPHERTEXT (2) /* Encrypting or decrypting */
|
||||
@ -318,8 +316,6 @@ int mbedtls_chachapoly_auth_decrypt(mbedtls_chachapoly_context *ctx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_CHACHAPOLY_ALT */
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
|
||||
static const unsigned char test_key[1][32] =
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
#include "mbedtls/platform.h"
|
||||
|
||||
#if !defined(MBEDTLS_POLY1305_ALT)
|
||||
|
||||
#define POLY1305_BLOCK_SIZE_BYTES (16U)
|
||||
|
||||
/*
|
||||
@ -373,8 +371,6 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_POLY1305_ALT */
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
|
||||
static const unsigned char test_keys[2][32] =
|
||||
|
Loading…
x
Reference in New Issue
Block a user