Home
last modified time | relevance | path

Searched refs:bits (Results 1 – 25 of 78) sorted by relevance

1234

/optee_os/core/lib/zlib/
H A Dinffast.c69 unsigned bits; /* local strm->bits */ local
96 bits = state->bits;
105 if (bits < 15) {
106 hold += (unsigned long)(*in++) << bits;
107 bits += 8;
108 hold += (unsigned long)(*in++) << bits;
109 bits += 8;
113 op = (unsigned)(here->bits);
115 bits -= op;
127 if (bits < op) {
[all …]
H A Dinflate.c138 state->bits = 0;
249 int ZEXPORT inflatePrime(strm, bits, value) in inflatePrime() argument
251 int bits;
258 if (bits < 0) {
260 state->bits = 0;
263 if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR;
264 value &= (1L << bits) - 1;
265 state->hold += (unsigned)value << state->bits;
266 state->bits += (uInt)bits;
290 unsigned sym, bits; local
[all …]
H A Dinftrees.c33 int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) in inflate_table() argument
38 unsigned FAR *bits;
114 root = *bits;
120 here.bits = (unsigned char)1;
124 *bits = 1;
217 here.bits = (unsigned char)(len - drop);
286 (*table)[low].bits = (unsigned char)root;
296 here.bits = (unsigned char)(len - drop);
303 *bits = root;
H A Dinftrees.h27 unsigned char bits; /* bits in this part of the code */ member
63 unsigned FAR *bits, unsigned short FAR *work));
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dpsa_util.c190 size_t *bits) in mbedtls_ecc_group_to_psa() argument
195 *bits = 192; in mbedtls_ecc_group_to_psa()
200 *bits = 224; in mbedtls_ecc_group_to_psa()
205 *bits = 256; in mbedtls_ecc_group_to_psa()
210 *bits = 384; in mbedtls_ecc_group_to_psa()
215 *bits = 521; in mbedtls_ecc_group_to_psa()
220 *bits = 256; in mbedtls_ecc_group_to_psa()
225 *bits = 384; in mbedtls_ecc_group_to_psa()
230 *bits = 512; in mbedtls_ecc_group_to_psa()
235 *bits = 255; in mbedtls_ecc_group_to_psa()
[all …]
H A Dpsa_crypto_ecp.c40 static int check_ecc_parameters(psa_ecc_family_t family, size_t *bits) in check_ecc_parameters() argument
44 switch (*bits) { in check_ecc_parameters()
52 *bits = 521; in check_ecc_parameters()
58 switch (*bits) { in check_ecc_parameters()
67 switch (*bits) { in check_ecc_parameters()
72 *bits = 255; in check_ecc_parameters()
78 switch (*bits) { in check_ecc_parameters()
213 size_t *key_buffer_length, size_t *bits) in mbedtls_psa_ecp_import_key() argument
220 attributes->bits, in mbedtls_psa_ecp_import_key()
230 *bits = ecp->grp.nbits + 1; in mbedtls_psa_ecp_import_key()
[all …]
H A Dasn1write.c271 size_t bits) in mbedtls_asn1_write_named_bitstring() argument
278 byte_len = (bits + 7) / 8; in mbedtls_asn1_write_named_bitstring()
279 unused_bits = (byte_len * 8) - bits; in mbedtls_asn1_write_named_bitstring()
286 if (bits != 0) { in mbedtls_asn1_write_named_bitstring()
298 bits--; in mbedtls_asn1_write_named_bitstring()
299 if (bits == 0) { in mbedtls_asn1_write_named_bitstring()
303 if (bits % 8 == 0) { in mbedtls_asn1_write_named_bitstring()
309 return mbedtls_asn1_write_bitstring(p, start, buf, bits); in mbedtls_asn1_write_named_bitstring()
313 const unsigned char *buf, size_t bits) in mbedtls_asn1_write_bitstring() argument
318 byte_len = (bits + 7) / 8; in mbedtls_asn1_write_bitstring()
[all …]
H A Dpsa_crypto_storage.c230 uint8_t bits[2]; member
249 MBEDTLS_PUT_UINT16_LE((uint16_t) attr->bits, storage_format->bits, 0); in psa_format_key_data_for_storage()
309 attr->bits = MBEDTLS_GET_UINT16_LE(storage_format->bits, 0); in psa_parse_key_data_from_storage()
H A Dpsa_crypto_ffdh.c170 size_t key_len = PSA_BITS_TO_BYTES(attributes->bits); in mbedtls_psa_ffdh_export_public_key()
241 size_t *key_buffer_length, size_t *bits) in mbedtls_psa_ffdh_import_key() argument
250 *bits = PSA_BYTES_TO_BITS(data_length); in mbedtls_psa_ffdh_import_key()
286 PSA_BITS_TO_BYTES(attributes->bits), &P, &G); in mbedtls_psa_ffdh_key_agreement()
H A Dpsa_crypto.c301 static int psa_is_dh_key_size_valid(size_t bits) in psa_is_dh_key_size_valid() argument
303 switch (bits) { in psa_is_dh_key_size_valid()
610 size_t bits) in psa_validate_unstructured_key_bit_size() argument
622 if (bits != 128 && bits != 192 && bits != 256) { in psa_validate_unstructured_key_bit_size()
629 if (bits != 128 && bits != 192 && bits != 256) { in psa_validate_unstructured_key_bit_size()
636 if (bits != 128 && bits != 192 && bits != 256) { in psa_validate_unstructured_key_bit_size()
643 if (bits != 64 && bits != 128 && bits != 192) { in psa_validate_unstructured_key_bit_size()
650 if (bits != 256) { in psa_validate_unstructured_key_bit_size()
658 if (bits % 8 != 0) { in psa_validate_unstructured_key_bit_size()
745 size_t *key_buffer_length, size_t *bits) in psa_import_key_into_slot() argument
[all …]
H A Dpsa_crypto_rsa.c64 size_t bits; in mbedtls_psa_rsa_load_representation() local
85 bits = PSA_BYTES_TO_BITS(mbedtls_rsa_get_len(*p_rsa)); in mbedtls_psa_rsa_load_representation()
86 if (bits > PSA_VENDOR_RSA_MAX_KEY_BITS) { in mbedtls_psa_rsa_load_representation()
113 size_t *key_buffer_length, size_t *bits) in mbedtls_psa_rsa_import_key() argument
127 *bits = (psa_key_bits_t) PSA_BYTES_TO_BITS(mbedtls_rsa_get_len(rsa)); in mbedtls_psa_rsa_import_key()
262 (unsigned int) attributes->bits, in mbedtls_psa_rsa_generate_key()
/optee_os/core/lib/libtomcrypt/src/math/
H A Drand_bn.c10 int rand_bn_bits(void *N, int bits, prng_state *prng, int wprng) in rand_bn_bits() argument
16 LTC_ARGCHK(bits > 1); in rand_bn_bits()
21 bytes = (bits+7) >> 3; in rand_bn_bits()
22 mask = 0xff >> (bits % 8 == 0 ? 0 : 8 - bits % 8); in rand_bn_bits()
52 int res, bits; in rand_bn_upto() local
57 bits = mp_count_bits(limit); in rand_bn_upto()
59 res = rand_bn_bits(N, bits, prng, wprng); in rand_bn_upto()
/optee_os/core/lib/libtomcrypt/src/prngs/
H A Drng_make_prng.c24 int rng_make_prng(int bits, int wprng, prng_state *prng, in rng_make_prng() argument
38 if (bits == -1) { in rng_make_prng()
40 } else if (bits < 64 || bits > 1024) { in rng_make_prng()
43 bytes = (unsigned long)((bits+7)/8) * 2; in rng_make_prng()
60 if (bits == -1) { in rng_make_prng()
H A Drng_get_bytes.c60 int l, acc, bits, a, b; in s_rng_ansic() local
63 bits = 8; in s_rng_ansic()
67 while (bits--) { in s_rng_ansic()
76 bits = 8; in s_rng_ansic()
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Dpsa_util.h88 size_t *bits);
103 size_t bits);
175 int mbedtls_ecdsa_raw_to_der(size_t bits, const unsigned char *raw, size_t raw_len,
200 int mbedtls_ecdsa_der_to_raw(size_t bits, const unsigned char *der, size_t der_len,
H A Decdsa.h44 #define MBEDTLS_ECDSA_MAX_SIG_LEN(bits) \ argument
45 (/*T,L of SEQUENCE*/ ((bits) >= 61 * 8 ? 3 : 2) + \
46 /*T,L of r,s*/ 2 * (((bits) >= 127 * 8 ? 3 : 2) + \
47 /*V of r,s*/ ((bits) + 8) / 8))
H A Dasn1write.h317 const unsigned char *buf, size_t bits);
339 size_t bits);
/optee_os/core/arch/arm/kernel/
H A Dtee_time_arm_cntpct.c50 static uint8_t first, bits; in plat_prng_add_jitter_entropy() local
61 bits += 2; in plat_prng_add_jitter_entropy()
62 if (bits >= 8) { in plat_prng_add_jitter_entropy()
63 bits = 0; in plat_prng_add_jitter_entropy()
/optee_os/core/lib/libtomcrypt/src/ciphers/
H A Drc2.c63 int rc2_setup_ex(const unsigned char *key, int keylen, int bits, int num_rounds, symmetric_key *ske… in rc2_setup_ex() argument
73 if (keylen == 0 || keylen > 128 || bits > 1024) { in rc2_setup_ex()
76 if (bits == 0) { in rc2_setup_ex()
77 bits = 1024; in rc2_setup_ex()
96 T8 = (unsigned)(bits+7)>>3; in rc2_setup_ex()
97 TM = (255 >> (unsigned)(7 & -bits)); in rc2_setup_ex()
298 int keylen, bits; in rc2_test()
351 if (tests[x].bits == (tests[x].keylen * 8)) { in rc2_test()
357 … if ((err = rc2_setup_ex(tests[x].key, tests[x].keylen, tests[x].bits, 0, &skey)) != CRYPT_OK) { in rc2_test()
/optee_os/lib/libmbedtls/mbedtls/include/psa/
H A Dcrypto_struct.h301 psa_key_bits_t MBEDTLS_PRIVATE(bits);
432 size_t bits) in psa_set_key_bits() argument
434 if (bits > PSA_MAX_KEY_BITS) { in psa_set_key_bits()
435 attributes->MBEDTLS_PRIVATE(bits) = PSA_KEY_BITS_TOO_LARGE; in psa_set_key_bits()
437 attributes->MBEDTLS_PRIVATE(bits) = (psa_key_bits_t) bits; in psa_set_key_bits()
444 return attributes->MBEDTLS_PRIVATE(bits); in psa_get_key_bits()
/optee_os/core/arch/arm/plat-rockchip/
H A Dcommon.h24 #define BITS_WITH_WMASK(bits, msk, shift) \ argument
25 (SHIFT_U32(bits, shift) | BITS_WMSK(msk, shift))
/optee_os/mk/
H A Dgcc.mk16 libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \
18 libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
20 libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
/optee_os/core/drivers/crypto/versal/
H A Decc.c84 static TEE_Result ecc_get_key_size(uint32_t curve, size_t *bytes, size_t *bits) in ecc_get_key_size() argument
88 *bits = 384; in ecc_get_key_size()
92 *bits = 521; in ecc_get_key_size()
116 size_t bits = 0; in crypto_bignum_bn2bin_eswap() local
118 if (ecc_get_key_size(curve, &bytes, &bits)) in crypto_bignum_bn2bin_eswap()
159 size_t bits = 0; in verify() local
164 ret = ecc_get_key_size(key->curve, &bytes, &bits); in verify()
241 size_t bits = 0; in sign() local
243 ret = ecc_get_key_size(key->curve, &bytes, &bits); in sign()
259 TEE_TYPE_ECDSA_KEYPAIR, bits); in sign()
[all …]
/optee_os/core/drivers/crypto/se050/core/
H A Decc.c27 static bool oefid_key_supported(size_t bits) in oefid_key_supported() argument
31 return bits >= 224; in oefid_key_supported()
135 size_t *bytes, size_t *bits) in ecc_get_key_size() argument
139 *bits = 192; in ecc_get_key_size()
143 *bits = 224; in ecc_get_key_size()
147 *bits = 256; in ecc_get_key_size()
151 *bits = 384; in ecc_get_key_size()
155 *bits = 521; in ecc_get_key_size()
162 if (!oefid_key_supported(*bits)) in ecc_get_key_size()
641 size_t bits = 0; in gen_keypair() local
[all …]
/optee_os/ldelf/
H A Dldelf.mk26 arch-bits-$(sm) := $(arch-bits-core)

1234