crypto_builtin_composites.h
mbedtls/private_access.h
psa/crypto_driver_common.h
mbedtls/cmac.h
mbedtls/gcm.h
mbedtls/ccm.h
mbedtls/chachapoly.h
mbedtls/ecdsa.h
mbedtls/ecjpake.h
crypto_driver_contexts_composites.h
mbedtls/bignum.h
mbedtls/build_info.h
mbedtls/ccm.h
mbedtls/chacha20.h
mbedtls/chachapoly.h
mbedtls/check_config.h
mbedtls/cipher.h
mbedtls/cmac.h
mbedtls/config_adjust_legacy_crypto.h
mbedtls/config_adjust_psa_from_legacy.h
mbedtls/config_adjust_psa_superset_legacy.h
mbedtls/config_adjust_ssl.h
mbedtls/config_adjust_x509.h
mbedtls/config_psa.h
mbedtls/ecdsa.h
mbedtls/ecjpake.h
mbedtls/ecp.h
mbedtls/gcm.h
mbedtls/mbedtls_config.h
mbedtls/md.h
mbedtls/platform_time.h
mbedtls/platform_util.h
mbedtls/poly1305.h
mbedtls/private_access.h
psa/build_info.h
psa/crypto_adjust_auto_enabled.h
psa/crypto_adjust_config_dependencies.h
psa/crypto_adjust_config_key_pair_types.h
psa/crypto_adjust_config_synonyms.h
crypto_builtin_composites.h
psa/crypto_driver_common.h
psa/crypto_legacy.h
crypto_platform.h
psa/crypto_sizes.h
crypto_types.h
crypto_values.h
inttypes.h
limits.h
stddef.h
stdint.h
stdio.h
time.h
debug.h
net_sockets.h
oid.h
pk.h
pkcs7.h
psa_util.h
ssl.h
ssl_cache.h
ssl_ciphersuites.h
ssl_cookie.h
ssl_ticket.h
x509.h
x509_crl.h
x509_crt.h
x509_csr.h
crypto.h
crypto_builtin_composites.h
crypto_driver_contexts_composites.h
crypto_struct.h
mbedtls_psa_hmac_operation_t
mbedtls_psa_mac_operation_t
mbedtls_psa_aead_operation_t
mbedtls_psa_sign_hash_interruptible_operation_t
mbedtls_psa_verify_hash_interruptible_operation_t
mbedtls_psa_pake_operation_t
MBEDTLS_PSA_BUILTIN_MAC
MBEDTLS_PSA_HMAC_OPERATION_INIT
{ 0, PSA_HASH_OPERATION_INIT, { 0 } }
MBEDTLS_PSA_MAC_OPERATION_INIT
{ 0, { 0 } }
MBEDTLS_PSA_BUILTIN_AEAD
1
MBEDTLS_PSA_AEAD_OPERATION_INIT
{ 0, 0, 0, 0, { 0 } }
MBEDTLS_PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT
{ 0 }
MBEDTLS_VERIFY_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT
{ 0 }
MBEDTLS_PSA_BUILTIN_PAKE
1
MBEDTLS_PSA_JPAKE_BUFFER_SIZE
((3 + 1 + 65 + 1 + 65 + 1 + 32) * 2)
MBEDTLS_PSA_PAKE_OPERATION_INIT
{ { 0 } }

    /*
    *ContextstructuredeclarationoftheMbedTLSsoftware-basedPSAdrivers
    *calledthroughthePSACryptodriverdispatchlayer.
    *Thisfilecontainsthecontextstructuresofthosealgorithmswhichneedto
    *relyonotheralgorithms,i.e.are'composite'algorithms.
    *
    *\noteThisfilemaynotbeincludeddirectly.Applicationsmust
    *includepsa/crypto.h.
    *
    *\noteThisheaderanditscontentarenotpartoftheMbedTLSAPIand
    *applicationsmustnotdependonit.Itsmainpurposeistodefinethe
    *multi-partstateobjectsoftheMbedTLSsoftware-basedPSAdrivers.The
    *definitionsoftheseobjectsarethenusedbycrypto_struct.htodefinethe
    *implementation-definedtypesofPSAmulti-partstateobjects.
    */
    /*
    *CopyrightTheMbedTLSContributors
    *SPDX-License-Identifier:Apache-2.0ORGPL-2.0-or-later
    */

    #ifndefPSA_CRYPTO_BUILTIN_COMPOSITES_H
    #definePSA_CRYPTO_BUILTIN_COMPOSITES_H
    #include"mbedtls/private_access.h"

    #include<psa/crypto_driver_common.h>

    #include"mbedtls/cmac.h"
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_GCM)
    #include"mbedtls/gcm.h"
    #endif
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_CCM)
    #include"mbedtls/ccm.h"
    #endif
    #include"mbedtls/chachapoly.h"

    /*
    *MACmulti-partoperationdefinitions.
    */
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_CMAC)||\
    defined(MBEDTLS_PSA_BUILTIN_ALG_HMAC)
    #defineMBEDTLS_PSA_BUILTIN_MAC
    #endif

    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_HMAC)||defined(PSA_CRYPTO_DRIVER_TEST)
    typedefstruct{
    psa_algorithm_tMBEDTLS_PRIVATE(alg);
    structpsa_hash_operation_shash_ctx;
    uint8_tMBEDTLS_PRIVATE(opad)[PSA_HMAC_MAX_HASH_BLOCK_SIZE];
    }mbedtls_psa_hmac_operation_t;

    #defineMBEDTLS_PSA_HMAC_OPERATION_INIT{0,PSA_HASH_OPERATION_INIT,{0}}
    #endif/*MBEDTLS_PSA_BUILTIN_ALG_HMAC*/

    typedefstruct{
    psa_algorithm_tMBEDTLS_PRIVATE(alg);
    union{
    unsignedMBEDTLS_PRIVATE(dummy);/*Maketheunionnon-emptyevenwithnosupportedalgorithms.*/
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_HMAC)||defined(PSA_CRYPTO_DRIVER_TEST)
    mbedtls_psa_hmac_operation_tMBEDTLS_PRIVATE(hmac);
    #endif/*MBEDTLS_PSA_BUILTIN_ALG_HMAC*/
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_CMAC)||defined(PSA_CRYPTO_DRIVER_TEST)
    mbedtls_cipher_context_tMBEDTLS_PRIVATE(cmac);
    #endif/*MBEDTLS_PSA_BUILTIN_ALG_CMAC*/
    }MBEDTLS_PRIVATE(ctx);
    }mbedtls_psa_mac_operation_t;

    #defineMBEDTLS_PSA_MAC_OPERATION_INIT{0,{0}}

    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_GCM)||\
    defined(MBEDTLS_PSA_BUILTIN_ALG_CCM)||\
    defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305)
    #defineMBEDTLS_PSA_BUILTIN_AEAD1
    #endif

    /*ContextstructurefortheMbedTLSAEADimplementation.*/
    typedefstruct{
    psa_algorithm_tMBEDTLS_PRIVATE(alg);
    psa_key_type_tMBEDTLS_PRIVATE(key_type);

    unsignedintMBEDTLS_PRIVATE(is_encrypt):1;

    uint8_tMBEDTLS_PRIVATE(tag_length);

    union{
    unsigneddummy;/*Enableeasierinitializingoftheunion.*/
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_CCM)
    mbedtls_ccm_contextMBEDTLS_PRIVATE(ccm);
    #endif/*MBEDTLS_PSA_BUILTIN_ALG_CCM*/
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_GCM)
    mbedtls_gcm_contextMBEDTLS_PRIVATE(gcm);
    #endif/*MBEDTLS_PSA_BUILTIN_ALG_GCM*/
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305)
    mbedtls_chachapoly_contextMBEDTLS_PRIVATE(chachapoly);
    #endif/*MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305*/

    }ctx;

    }mbedtls_psa_aead_operation_t;

    #defineMBEDTLS_PSA_AEAD_OPERATION_INIT{0,0,0,0,{0}}

    #include"mbedtls/ecdsa.h"

    /*ContextstructurefortheMbedTLSinterruptiblesignhashimplementation.*/
    typedefstruct{
    #if(defined(MBEDTLS_PSA_BUILTIN_ALG_ECDSA)||\
    defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA))&&\
    defined(MBEDTLS_ECP_RESTARTABLE)
    mbedtls_ecdsa_context*MBEDTLS_PRIVATE(ctx);
    mbedtls_ecdsa_restart_ctxMBEDTLS_PRIVATE(restart_ctx);

    uint32_tMBEDTLS_PRIVATE(num_ops);

    size_tMBEDTLS_PRIVATE(coordinate_bytes);
    psa_algorithm_tMBEDTLS_PRIVATE(alg);
    mbedtls_md_type_tMBEDTLS_PRIVATE(md_alg);
    uint8_tMBEDTLS_PRIVATE(hash)[PSA_BITS_TO_BYTES(PSA_VENDOR_ECC_MAX_CURVE_BITS)];
    size_tMBEDTLS_PRIVATE(hash_length);

    #else
    /*Makethestructnon-emptyifalgsnotsupported.*/
    unsignedMBEDTLS_PRIVATE(dummy);

    #endif/*defined(MBEDTLS_PSA_BUILTIN_ALG_ECDSA)||
    *defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA)&&
    *defined(MBEDTLS_ECP_RESTARTABLE)*/
    }mbedtls_psa_sign_hash_interruptible_operation_t;

    #if(defined(MBEDTLS_PSA_BUILTIN_ALG_ECDSA)||\
    defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA))&&\
    defined(MBEDTLS_ECP_RESTARTABLE)
    #defineMBEDTLS_PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT{{0},{0},0,0,0,0,0,0}
    #else
    #defineMBEDTLS_PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT{0}
    #endif

    /*ContextstructurefortheMbedTLSinterruptibleverifyhash
    *implementation.*/
    typedefstruct{
    #if(defined(MBEDTLS_PSA_BUILTIN_ALG_ECDSA)||\
    defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA))&&\
    defined(MBEDTLS_ECP_RESTARTABLE)

    mbedtls_ecdsa_context*MBEDTLS_PRIVATE(ctx);
    mbedtls_ecdsa_restart_ctxMBEDTLS_PRIVATE(restart_ctx);

    uint32_tMBEDTLS_PRIVATE(num_ops);

    uint8_tMBEDTLS_PRIVATE(hash)[PSA_BITS_TO_BYTES(PSA_VENDOR_ECC_MAX_CURVE_BITS)];
    size_tMBEDTLS_PRIVATE(hash_length);

    mbedtls_mpiMBEDTLS_PRIVATE(r);
    mbedtls_mpiMBEDTLS_PRIVATE(s);

    #else
    /*Makethestructnon-emptyifalgsnotsupported.*/
    unsignedMBEDTLS_PRIVATE(dummy);

    #endif/*defined(MBEDTLS_PSA_BUILTIN_ALG_ECDSA)||
    *defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA)&&
    *defined(MBEDTLS_ECP_RESTARTABLE)*/

    }mbedtls_psa_verify_hash_interruptible_operation_t;

    #if(defined(MBEDTLS_PSA_BUILTIN_ALG_ECDSA)||\
    defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA))&&\
    defined(MBEDTLS_ECP_RESTARTABLE)
    #defineMBEDTLS_VERIFY_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT{{0},{0},0,0,0,0,{0},\
    {0}}
    #else
    #defineMBEDTLS_VERIFY_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT{0}
    #endif

    /*EC-JPAKEoperationdefinitions*/

    #include"mbedtls/ecjpake.h"

    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE)
    #defineMBEDTLS_PSA_BUILTIN_PAKE1
    #endif

    /*Note:theformatformbedtls_ecjpake_read/writefunctionhasanextra
    *lengthbyteforeachstep,plusanextra3bytesforECParametersinthe
    *server's2ndround.*/
    #defineMBEDTLS_PSA_JPAKE_BUFFER_SIZE((3+1+65+1+65+1+32)*2)

    typedefstruct{
    psa_algorithm_tMBEDTLS_PRIVATE(alg);

    uint8_t*MBEDTLS_PRIVATE(password);
    size_tMBEDTLS_PRIVATE(password_len);
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE)
    mbedtls_ecjpake_roleMBEDTLS_PRIVATE(role);
    uint8_tMBEDTLS_PRIVATE(buffer[MBEDTLS_PSA_JPAKE_BUFFER_SIZE]);
    size_tMBEDTLS_PRIVATE(buffer_length);
    size_tMBEDTLS_PRIVATE(buffer_offset);
    #endif
    /*ContextstructurefortheMbedTLSEC-JPAKEimplementation.*/
    union{
    unsignedintMBEDTLS_PRIVATE(dummy);
    #ifdefined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE)
    mbedtls_ecjpake_contextMBEDTLS_PRIVATE(jpake);
    #endif
    }MBEDTLS_PRIVATE(ctx);

    }mbedtls_psa_pake_operation_t;

    #defineMBEDTLS_PSA_PAKE_OPERATION_INIT{{0}}

    #endif/*PSA_CRYPTO_BUILTIN_COMPOSITES_H*/