| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | psa_crypto_ecp.h | 17 * \param[in] type The type of key contained in \p data. 18 * \param[in] curve_bits The nominal bit-size of the curve. 20 * passed in \p data. 21 * This can be 0, in which case the bit-size 25 * be in the foreseeable future). 26 * \param[in] data The buffer from which to load the representation. 27 * \param[in] data_length The size in bytes of \p data. 48 /** Import an ECP key in binary format. 52 * entry point as defined in the PSA driver interface specification for 55 * \param[in] attributes The attributes for the key to import. [all …]
|
| H A D | psa_crypto_core.h | 31 * not the algorithm. Might do more in the future. 50 /* This field is accessed in a lot of places. Putting it first 55 * The current state of the key slot, as described in 68 * slots that are in a suitable state for the function. 81 * In most cases, the slice index can be deduced from the key identifer. 82 * We keep it in a separate field for robustness (it reduces the chance 83 * that a coding mistake in the key store will result in accessing the 86 * filled in. 93 /* The index of the next slot in the free list for this 106 * consists of all the slots in order. [all …]
|
| H A D | psa_crypto_rsa.h | 17 * \param[in] type The type of key contained in \p data. 18 * \param[in] data The buffer from which to load the representation. 19 * \param[in] data_length The size in bytes of \p data. 30 /** Import an RSA key in binary format. 34 * entry point as defined in the PSA driver interface specification for 37 * \param[in] attributes The attributes for the key to import. 38 * \param[in] data The buffer containing the key data in import 40 * \param[in] data_length Size of the \p data buffer in bytes. 41 * \param[out] key_buffer The buffer containing the key data in output 43 * \param[in] key_buffer_size Size of the \p key_buffer buffer in bytes. This [all …]
|
| H A D | psa_crypto_ffdh.h | 16 * \param[in] attributes The attributes of the key to use for the 18 * \param[in] peer_key The buffer containing the key context 20 * \param[in] peer_key_length Size of the \p peer_key buffer in 22 * \param[in] key_buffer The buffer containing the private key 24 * \param[in] key_buffer_size Size of the \p key_buffer buffer in 28 * \param[in] shared_secret_size Size of the \p shared_secret buffer in 50 /** Export a public key or the public part of a DH key pair in binary format. 52 * \param[in] attributes The attributes for the key to export. 53 * \param[in] key_buffer Material or context of the key to export. 54 * \param[in] key_buffer_size Size of the \p key_buffer buffer in bytes. [all …]
|
| H A D | psa_crypto_cipher.h | 19 * \param[in] alg PSA cipher algorithm identifier 20 * \param[in] key_type PSA key type 21 * \param[in,out] key_bits Size of the key in bits. The value provided in input 43 * \param key_bits Size of the key in bits 59 * cipher_encrypt_setup entry point as defined in the PSA driver 62 * \param[in,out] operation The operation object to set up. It has been 64 * #psa_cipher_operation_t and not yet in use. 65 * \param[in] attributes The attributes of the key to use for the 67 * \param[in] key_buffer The buffer containing the key context. 68 * \param[in] key_buffer_size Size of the \p key_buffer buffer in bytes. [all …]
|
| H A D | psa_crypto_aead.h | 19 * entry point as defined in the PSA driver interface specification for 22 * \param[in] attributes The attributes of the key to use for the 24 * \param[in] key_buffer The buffer containing the key context. 25 * \param key_buffer_size Size of the \p key_buffer buffer in bytes. 27 * \param[in] nonce Nonce or IV to use. 28 * \param nonce_length Size of the nonce buffer in bytes. This must 33 * \param[in] additional_data Additional data that will be authenticated 35 * \param additional_data_length Size of additional_data in bytes. 36 * \param[in] plaintext Data that will be authenticated and encrypted. 37 * \param plaintext_length Size of plaintext in bytes. [all …]
|
| H A D | bignum_core.h | 11 * These can be thought of integers written in base 2^#biL with a fixed 12 * number of digits. Digits in this base are called *limbs*. 16 * The functions in this module obey the following conventions unless 36 * - **Bignum sizes**: bignum sizes are always expressed in limbs. 44 * - **Aliasing**: in general, output bignums may be aliased to one or more 50 * in undefined behavior. 57 * all modular inputs to be in the range [0, \p N - 1] and guarantee outputs 58 * in the range [0, \p N - 1]. If an input is out of range, outputs are 77 #define ciL (sizeof(mbedtls_mpi_uint)) /** chars in limb */ 78 #define biL (ciL << 3) /** bits in limb */ [all …]
|
| H A D | ecp_invasive.h | 6 * The interfaces in this file are intended for testing purposes only. 7 * They SHOULD NOT be made available in library integrations except when 50 * specified in [Curve25519] p. 5 and in [Curve448]. The resulting value 61 * masked as specified in [Curve25519] and in [RFC7748] §5. 82 * \param[in,out] Np The address of the MPI to be converted. 87 * \param[in] Nn The length of \p Np in limbs. 98 * \param[in,out] X The address of the MPI to be converted. 102 * in range `0 <= X < 2 * N` (where N is the modulus). 105 * \param[in] X_limbs The length of \p X in limbs. 120 * \param[in,out] X The address of the MPI to be converted. [all …]
|
| H A D | psa_crypto_mac.h | 18 * defined in the PSA driver interface specification for transparent 21 * \param[in] attributes The attributes of the key to use for the 23 * \param[in] key_buffer The buffer containing the key to use for 25 * in export representation as defined by 27 * \param key_buffer_size Size of the \p key_buffer buffer in bytes. 30 * \param[in] input Buffer containing the input message. 31 * \param input_length Size of the \p input buffer in bytes. 33 * \param mac_size Size of the \p mac buffer in bytes. 61 * defined in the PSA driver interface specification for transparent 64 * \param[in,out] operation The operation object to set up. It must have [all …]
|
| /optee_os/core/include/ |
| H A D | optee_rpc_cmd.h | 22 * Since the size of the TA isn't known in advance the size of the TA is 25 * [in] value[0].a-b UUID 33 * [in] memref[0] Frames to device 58 * does a notification wait request instead of spinning in secure world. 66 * [in] value[0].a OPTEE_RPC_NOTIFICATION_WAIT 67 * [in] value[0].b notification value 68 * [in] value[0].c timeout in millisecond or 0 if no timeout 71 * [in] value[0].a OPTEE_RPC_NOTIFICATION_SEND 72 * [in] value[0].b notification value 73 * [in] value[0].c shall be 0, reserved for future evolution [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/include/psa/ |
| H A D | crypto_se_driver.h | 8 * space in which the PSA Crypto implementation runs, typically secure 13 * to be called in a standardized way by a PSA Cryptography API 50 * in mind the restrictions on when the persistent data is saved 60 * The size of this buffer is in the \c persistent_data_size field of 85 * psa_drv_se_key_management_t::p_destroy in case an error occurs. 91 /** The size of \c persistent_data in bytes. 101 * afterwards. The driver may store whatever it wants in this field. 108 * \param[in,out] drv_context The driver context structure. 109 * \param[in,out] persistent_data A pointer to the persistent data 113 * for all keys whose lifetime is in this [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/ |
| H A D | der_sequence_free.c | 14 @param in The list to free 16 void der_sequence_free(ltc_asn1_list *in) in der_sequence_free() argument 20 if (!in) return; in der_sequence_free() 23 while (in->prev != NULL || in->parent != NULL) { in der_sequence_free() 24 if (in->parent != NULL) { in der_sequence_free() 25 in = in->parent; in der_sequence_free() 27 in = in->prev; in der_sequence_free() 32 while (in != NULL) { in der_sequence_free() 34 if (in->child) { in der_sequence_free() 36 in->child->parent = NULL; in der_sequence_free() [all …]
|
| H A D | der_sequence_shrink.c | 15 @param in The list to shrink 17 void der_sequence_shrink(ltc_asn1_list *in) in der_sequence_shrink() argument 19 if (!in) return; in der_sequence_shrink() 22 while (in != NULL) { in der_sequence_shrink() 24 if (in->child) { in der_sequence_shrink() 25 der_sequence_shrink(in->child); in der_sequence_shrink() 28 switch (in->type) { in der_sequence_shrink() 31 case LTC_ASN1_SEQUENCE : if (in->data != NULL) { XFREE(in->data); in->data = NULL; } break; in der_sequence_shrink() 36 in = in->next; in der_sequence_shrink()
|
| /optee_os/lib/libutee/include/ |
| H A D | pta_system.h | 25 /* Same value as max in huk_subkey_derive */ 36 * [in] memref[0]: entropy input data 46 * [in] params[0].memref.buffer Buffer for extra data 47 * [in] params[0].memref.size Size of extra data (max 1024 bytes) 63 * [in] value[0].a: Number of bytes 64 * [in] value[0].b: Flags, 0 or PTA_SYSTEM_MAP_FLAG_SHAREABLE 67 * [in] value[2].a: Extra pad before memory range 68 * [in] value[2].b: Extra pad after memory range 75 * [in] value[0].a: Number of bytes 76 * [in] value[0].b: Must be 0 [all …]
|
| H A D | remoteproc_pta.h | 54 * [in] params[0].value.a: Unique 32bit remote processor identifier 63 * Optional service to implement only in case of proprietary format. 65 * [in] params[0].value.a: Unique 32bit remote processor identifier 66 * [in] params[1].memref: Loadable firmware image 77 * [in] params[0].value.a: Unique 32bit remote processor identifier 78 * [in] params[1].memref: Section data to load 79 * [in] params[2].value.a: 32bit LSB load device segment address 80 * [in] params[2].value.b: 32bit MSB load device segment address 81 * [in] params[3].memref: Expected hash (SHA256) of the payload 91 * [in] params[0].value.a: Unique 32bit remote processor identifier [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/ |
| H A D | ChangeLog | 8 session, according to the TLS-Exporter specification in RFC 8446 and 5705. 9 This requires MBEDTLS_SSL_KEYING_MATERIAL_EXPORT to be defined in 13 * Fix a buffer overread in mbedtls_lms_import_public_key() when the input is 16 * Fix a vulnerability in LMS verification through which an adversary could 22 available in hardware, an adversary with fine control over which 23 threads make progress in a multithreaded program could force software 26 key. In particular, this attacker model may be possible against an SGX 31 * Fix possible use-after-free or double-free in code calling 36 they were free()d, resulting in high risk of use-after-free or double-free, 38 In particular, the two sample programs x509/cert_write and x509/cert_req [all …]
|
| /optee_os/core/arch/arm/include/sm/ |
| H A D | watchdog_smc.h | 11 * We're following ARM SMC Calling Convention as specified in 18 * a0 [in] SMC Function ID, CFG_WDT_SM_HANDLER_ID 20 * a1 [in] Watchdog command (one of SMCWD_*) 22 * a2 [in/out] Depends on watchdog command (input a1) 23 * a3-6 [in/out] Not used 24 * a7 [in/out] Hypervisor Client ID register 37 * [in] a1 Set to SMCWD_INIT 38 * [out] a1 The minimal timeout value in seconds supported 39 * a2 The maximum timeout value in seconds supported 45 * [in] a1 Set to SMCWD_SET_TIMEOUT [all …]
|
| /optee_os/core/lib/qcbor/inc/qcbor/ |
| H A D | qcbor_decode.h | 8 * Redistribution and use in source and binary forms, with or without 13 * * Redistributions in binary form must reproduce the above 15 * disclaimer in the documentation and/or other materials provided 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 31 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 60 * general description of this encoder-decoder in section @ref 84 * representation in @ref QCBORItem. 92 * array members are taken in order. Maps can be decoded this way too, 104 * and any or all of the functions in qcbor_spiffy_decode.h. Don't use [all …]
|
| H A D | UsefulBuf.h | 8 * Redistribution and use in source and binary forms, with or without 13 * * Redistributions in binary form must reproduce the above 15 * disclaimer in the documentation and/or other materials provided 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 31 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 43 Notice that changes are listed in reverse chronological order. 65 02/02/18 llundbla Full support for integers in and out; fix pointer 67 in/out are now in network byte order. 117 * implemented efficiently. In some cases, this will be a dedicated [all …]
|
| /optee_os/core/arch/arm/crypto/ |
| H A D | sm4_armv8a_neon.c | 35 void crypto_accel_sm4_ecb_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_ecb_enc() argument 40 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_ecb_enc() 43 neon_sm4_ecb_encrypt(out, in, key, len); in crypto_accel_sm4_ecb_enc() 47 void crypto_accel_sm4_cbc_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_cbc_enc() argument 52 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_cbc_enc() 55 neon_sm4_cbc_encrypt(out, in, key, len, iv); in crypto_accel_sm4_cbc_enc() 59 void crypto_accel_sm4_cbc_dec(void *out, const void *in, const void *key, in crypto_accel_sm4_cbc_dec() argument 64 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_cbc_dec() 67 neon_sm4_cbc_decrypt(out, in, key, len, iv); in crypto_accel_sm4_cbc_dec() 71 void crypto_accel_sm4_ctr_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_ctr_enc() argument [all …]
|
| H A D | sm4_armv8a_ce.c | 35 void crypto_accel_sm4_ecb_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_ecb_enc() argument 40 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_ecb_enc() 43 ce_sm4_ecb_encrypt(out, in, key, len); in crypto_accel_sm4_ecb_enc() 47 void crypto_accel_sm4_cbc_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_cbc_enc() argument 52 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_cbc_enc() 55 ce_sm4_cbc_encrypt(out, in, key, len, iv); in crypto_accel_sm4_cbc_enc() 59 void crypto_accel_sm4_cbc_dec(void *out, const void *in, const void *key, in crypto_accel_sm4_cbc_dec() argument 64 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_cbc_dec() 67 ce_sm4_cbc_decrypt(out, in, key, len, iv); in crypto_accel_sm4_cbc_dec() 71 void crypto_accel_sm4_ctr_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_ctr_enc() argument [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/pkcs12/ |
| H A D | pkcs12_utf8_to_utf16.c | 8 int pkcs12_utf8_to_utf16(const unsigned char *in, unsigned long inlen, in pkcs12_utf8_to_utf16() argument 11 const unsigned char* in_end = in + inlen; in pkcs12_utf8_to_utf16() 18 LTC_ARGCHK(in != NULL); in pkcs12_utf8_to_utf16() 22 while (in < in_end) { in pkcs12_utf8_to_utf16() 25 if (*in >= 192) extra++; /* 1 */ in pkcs12_utf8_to_utf16() 26 if (*in >= 224) extra++; /* 2 */ in pkcs12_utf8_to_utf16() 27 if (*in >= 240) extra++; /* 3 */ in pkcs12_utf8_to_utf16() 28 if (*in >= 248) extra++; /* 4 */ in pkcs12_utf8_to_utf16() 29 if (*in >= 252) extra++; /* 5 */ in pkcs12_utf8_to_utf16() 30 if (in + extra >= in_end) goto ERROR; in pkcs12_utf8_to_utf16() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/base64/ |
| H A D | base64_encode.c | 33 static int s_base64_encode_internal(const unsigned char *in, unsigned long inlen, in s_base64_encode_internal() argument 56 LTC_ARGCHK(in != NULL); in s_base64_encode_internal() 59 if ((void*)in == out) { in s_base64_encode_internal() 66 *p++ = codes[(in[0] >> 2) & 0x3F]; in s_base64_encode_internal() 67 *p++ = codes[(((in[0] & 3) << 4) + (in[1] >> 4)) & 0x3F]; in s_base64_encode_internal() 68 *p++ = codes[(((in[1] & 0xf) << 2) + (in[2] >> 6)) & 0x3F]; in s_base64_encode_internal() 69 *p++ = codes[in[2] & 0x3F]; in s_base64_encode_internal() 70 in += 3; in s_base64_encode_internal() 78 unsigned a = in[0]; in s_base64_encode_internal() 79 unsigned b = (i+1 < inlen) ? in[1] : 0; in s_base64_encode_internal() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/ed25519/ |
| H A D | ed25519_verify.c | 57 @param msg [in] The data to be verified 58 @param msglen [in] The size of the data to be verified 59 @param sig [in] The signature to be verified 60 @param siglen [in] The size of the signature to be verified 61 @param ctx [in] The context 62 @param ctxlen [in] The size of the context 64 @param public_key [in] The public Ed25519 key in the pair 86 @param msg [in] The data to be verified 87 @param msglen [in] The size of the data to be verified 88 @param sig [in] The signature to be verified [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/base32/ |
| H A D | base32_encode.c | 10 @param in The input buffer to encode 13 @param outlen [in/out] The max size and resulting size of the encoded data 17 int base32_encode(const unsigned char *in, unsigned long inlen, in base32_encode() argument 30 LTC_ARGCHK(in != NULL); in base32_encode() 53 *out++ = codes[(in[0] >> 3) & 0x1F]; in base32_encode() 54 *out++ = codes[(((in[0] & 0x7) << 2) + (in[1] >> 6)) & 0x1F]; in base32_encode() 55 *out++ = codes[(in[1] >> 1) & 0x1F]; in base32_encode() 56 *out++ = codes[(((in[1] & 0x1) << 4) + (in[2] >> 4)) & 0x1F]; in base32_encode() 57 *out++ = codes[(((in[2] & 0xF) << 1) + (in[3] >> 7)) & 0x1F]; in base32_encode() 58 *out++ = codes[(in[3] >> 2) & 0x1F]; in base32_encode() [all …]
|