Home
last modified time | relevance | path

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

1234

/mbedtls/library/
A Dpsa_util.c195 *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()
240 *bits = 192; in mbedtls_ecc_group_to_psa()
[all …]
A Dpsa_crypto_ecp.c44 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()
230 *bits = ecp->grp.nbits + 1; in mbedtls_psa_ecp_import_key()
232 *bits = ecp->grp.nbits; in mbedtls_psa_ecp_import_key()
536 attributes->bits, in mbedtls_psa_key_agreement_ecdh()
545 size_t bits = 0; in mbedtls_psa_key_agreement_ecdh() local
[all …]
A Dasn1write.c269 size_t bits) in mbedtls_asn1_write_named_bitstring() argument
276 byte_len = (bits + 7) / 8; in mbedtls_asn1_write_named_bitstring()
277 unused_bits = (byte_len * 8) - bits; in mbedtls_asn1_write_named_bitstring()
284 if (bits != 0) { in mbedtls_asn1_write_named_bitstring()
296 bits--; in mbedtls_asn1_write_named_bitstring()
297 if (bits == 0) { in mbedtls_asn1_write_named_bitstring()
301 if (bits % 8 == 0) { in mbedtls_asn1_write_named_bitstring()
307 return mbedtls_asn1_write_bitstring(p, start, buf, bits); in mbedtls_asn1_write_named_bitstring()
311 const unsigned char *buf, size_t bits) in mbedtls_asn1_write_bitstring() argument
316 byte_len = (bits + 7) / 8; in mbedtls_asn1_write_bitstring()
[all …]
A Dpsa_crypto.c622 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()
2031 if (attributes->bits != slot->attr.bits) { in psa_validate_optional_attributes()
2091 bits = slot->attr.bits; in psa_import_key()
2102 slot->attr.bits = (psa_key_bits_t) bits; in psa_import_key()
2103 } else if (bits != slot->attr.bits) { in psa_import_key()
2199 actual_attributes.bits = source_slot->attr.bits; in psa_copy_key()
6382 slot->attr.bits = (psa_key_bits_t) bits; in psa_generate_derived_key_internal()
[all …]
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()
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()
/mbedtls/tests/suites/
A Dtest_suite_asn1write.data121 ASN.1 Write mpi, 127*8-1 bits
124 ASN.1 Write mpi, 127*8 bits
127 ASN.1 Write mpi, 127*8+1 bits
130 ASN.1 Write mpi, 255*8-1 bits
133 ASN.1 Write mpi, 255*8 bits
136 ASN.1 Write mpi, 256*8-1 bits
313 ASN.1 Write Bitstring / Unused bits #0
316 ASN.1 Write Bitstring / Unused bits #1
319 ASN.1 Write Bitstring / Unused bits #2
340 ASN.1 Write Bitstring / 0 bits
[all …]
A Dtest_suite_pkwrite.data17 Public key write check EC 192 bits
21 Public key write check EC 192 bits (DER)
25 Public key write check EC 521 bits
29 Public key write check EC 521 bits (DER)
73 Private key write check EC 192 bits
77 Private key write check EC 192 bits (DER)
89 Private key write check EC 521 bits
93 Private key write check EC 521 bits (DER)
137 Derive public key EC 192 bits
141 Derive public key EC 521 bits
[all …]
A Dtest_suite_debug.data41 mbedtls_debug_print_mpi:"":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (0 bits) is\:\nMyF…
44 …"00000000000000":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (0 bits) is\:\nMyFile(0999)…
46 Debug print mbedtls_mpi #2: 3 bits
47 …"00000000000007":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (3 bits) is\:\nMyFile(0999)…
49 Debug print mbedtls_mpi: 49 bits
50 …01020304050607":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (49 bits) is\:\nMyFile(0999)…
52 Debug print mbedtls_mpi: 759 bits
55 Debug print mbedtls_mpi: 764 bits #1
58 Debug print mbedtls_mpi: 764 bits #2
63bits\nMyFile(0999)\: basic constraints \: CA=false\nMyFile(0999)\: value of 'crt->rsa.N' (2048 bit…
[all …]
A Dtest_suite_psa_crypto_generate_key.function23 size_t bits = bits_arg;
28 psa_set_key_bits(&attributes, bits);
40 TEST_EQUAL(psa_get_key_bits(&attributes), bits);
A Dtest_suite_psa_crypto_hash.data193 PSA hash finish: SHA3-224 Test Vector NIST 448 bits: "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnl…
197 PSA hash finish: SHA3-256 Test Vector NIST 448 bits: "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnl…
201 PSA hash finish: SHA3-384 Test Vector NIST 448 bits: "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnl…
205 PSA hash finish: SHA3-512 Test Vector NIST 448 bits: "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnl…
209 PSA hash finish: SHA3-224 Test Vector NIST 896 bits: "abcdefghbcdefghicdefghijdefghijkefghijklfghij…
213 PSA hash finish: SHA3-256 Test Vector NIST 896 bits: "abcdefghbcdefghicdefghijdefghijkefghijklfghij…
217 PSA hash finish: SHA3-384 Test Vector NIST 896 bits: "abcdefghbcdefghicdefghijdefghijkefghijklfghij…
581 PSA hash multi part: SHA3-224 Test Vector NIST 448 bits: "abcdbcdecdefdefgefghfghighijhijkijkljklmk…
585 PSA hash multi part: SHA3-256 Test Vector NIST 448 bits: "abcdbcdecdefdefgefghfghighijhijkijkljklmk…
589 PSA hash multi part: SHA3-384 Test Vector NIST 448 bits: "abcdbcdecdefdefgefghfghighijhijkijkljklmk…
[all …]
A Dtest_suite_rsa.data187 RSA PKCS1 Sign #1 (SHA512, 1536 bits RSA)
195 RSA PKCS1 Sign #2 (SHA256, 2048 bits RSA)
207 RSA PKCS1 Sign #3 (SHA224, 2048 bits RSA)
215 RSA PKCS1 Sign #4 (SHA384, 2048 bits RSA)
223 RSA PKCS1 Sign #7 (MD5, 2048 bits RSA)
231 RSA PKCS1 Sign #8 (RAW, 2048 bits RSA)
324 RSA Check Public key #4 (N exactly 128 bits)
337 RSA Check Public key #8 (E exactly 2 bits)
340 RSA Check Public key #8 (E exactly 1 bits)
343 RSA Check Public key #8 (E exactly 64 bits)
[all …]
A Dtest_suite_psa_crypto_se_driver_hal.function189 *bits = PSA_BYTES_TO_BITS(data_length);
238 size_t bits;
333 if (*bits == 0) {
341 ram_slots[slot_number].bits = *bits;
1165 size_t bits = bits_arg;
1190 psa_set_key_bits(&attributes, bits);
1205 psa_key_bits_t bits = bits_arg;
1239 psa_set_key_bits(&attributes, bits);
1286 size_t bits = bits_arg;
1287 /* Pass bits=0 to import, bits>0 to fake-generate */
[all …]
A Dtest_suite_bignum_core.generated.data21445 Core shift(L) #1 0 (0 bits in 1 limbs) << 0
21449 Core shift(L) #2 0 (0 bits in 1 limbs) << 0
21453 Core shift(L) #3 0 (0 bits in 1 limbs) << 1
21457 Core shift(L) #4 0 (0 bits in 1 limbs) << 1
21461 Core shift(L) #5 0 (0 bits in 1 limbs) << 2
21465 Core shift(L) #6 0 (0 bits in 1 limbs) << 2
21469 Core shift(L) #7 0 (0 bits in 1 limbs) << 3
21473 Core shift(L) #8 0 (0 bits in 1 limbs) << 3
21477 Core shift(L) #9 0 (0 bits in 1 limbs) << 4
21481 Core shift(L) #10 0 (0 bits in 1 limbs) << 4
[all …]
/mbedtls/tests/scripts/
A Dgenerate_psa_tests.py28 verb: str, key_type: str, bits: int,
91 for bits in kt.sizes_to_test():
109 str(bits),
144 key_type: str, bits: int,
197 for bits in kt.sizes_to_test():
204 kt.expression, bits,
206 str(bits),
598 bits: int,
617 type=kt.expression, bits=bits,
630 for bits in kt.sizes_to_test():
[all …]
/mbedtls/tests/src/
A Dpsa_exercise_key.c49 size_t bits; in check_key_attributes_sanity() local
60 bits = psa_get_key_bits(&attributes); in check_key_attributes_sanity()
94 TEST_ASSERT(bits != 0); in check_key_attributes_sanity()
95 TEST_ASSERT(bits <= PSA_MAX_KEY_BITS); in check_key_attributes_sanity()
97 TEST_ASSERT(bits % 8 == 0); in check_key_attributes_sanity()
844 psa_key_type_t type, size_t bits, in mbedtls_test_psa_exported_key_sanity_check() argument
877 if (!mbedtls_test_asn1_skip_integer(&p, end, bits, bits, 1)) { in mbedtls_test_psa_exported_key_sanity_check()
884 if (!mbedtls_test_asn1_skip_integer(&p, end, bits / 2, bits, 1)) { in mbedtls_test_psa_exported_key_sanity_check()
888 if (!mbedtls_test_asn1_skip_integer(&p, end, bits / 2, bits / 2 + 1, 1)) { in mbedtls_test_psa_exported_key_sanity_check()
891 if (!mbedtls_test_asn1_skip_integer(&p, end, bits / 2, bits / 2 + 1, 1)) { in mbedtls_test_psa_exported_key_sanity_check()
[all …]
/mbedtls/3rdparty/p256-m/
A Dp256-m_driver_entrypoints.c67 size_t *bits) in p256_transparent_import_key() argument
70 if (*bits != 0 && *bits != CURVE_BITS) { in p256_transparent_import_key()
78 return *bits == 0 ? PSA_ERROR_NOT_SUPPORTED : PSA_ERROR_INVALID_ARGUMENT; in p256_transparent_import_key()
86 return *bits == 0 ? PSA_ERROR_NOT_SUPPORTED : PSA_ERROR_INVALID_ARGUMENT; in p256_transparent_import_key()
94 *bits = CURVE_BITS; in p256_transparent_import_key()
114 size_t bits = psa_get_key_bits(attributes); in p256_transparent_export_public_key() local
116 if (bits != CURVE_BITS || type != PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)) { in p256_transparent_export_public_key()
/mbedtls/tests/src/drivers/
A Dtest_driver_key_management.c271 size_t *bits) in mbedtls_test_transparent_import_key() argument
290 key_buffer_length, bits); in mbedtls_test_transparent_import_key()
297 key_buffer_length, bits); in mbedtls_test_transparent_import_key()
307 key_buffer_length, bits); in mbedtls_test_transparent_import_key()
314 key_buffer_length, bits); in mbedtls_test_transparent_import_key()
324 key_buffer_length, bits); in mbedtls_test_transparent_import_key()
331 key_buffer_length, bits); in mbedtls_test_transparent_import_key()
339 (void) bits; in mbedtls_test_transparent_import_key()
353 size_t *bits) in mbedtls_test_opaque_import_key() argument
397 key_buffer_length, bits); in mbedtls_test_opaque_import_key()
[all …]
/mbedtls/include/mbedtls/
A Dpsa_util.h88 size_t *bits);
103 size_t bits);
165 int mbedtls_ecdsa_raw_to_der(size_t bits, const unsigned char *raw, size_t raw_len,
181 int mbedtls_ecdsa_der_to_raw(size_t bits, const unsigned char *der, size_t der_len,
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))
/mbedtls/scripts/mbedtls_dev/
A Dpsa_storage.py107 bits: int,
115 self.bits = bits #type: int
156 self.lifetime, self.type, self.bits,
182 type=0x2400, bits=128,
193 type='PSA_KEY_TYPE_RAW_DATA', bits=length*8,
201 key = Key(type=0x1001, bits=8,
A Dpsa_information.py52 def finish_family_dependency(dep: str, bits: int) -> str:
59 return re.sub(r'_FAMILY_(.*)', r'_\1_' + str(bits), dep)
61 def finish_family_dependencies(dependencies: List[str], bits: int) -> List[str]:
66 return [finish_family_dependency(dep, bits) for dep in dependencies]
A Dcrypto_knowledge.py177 def key_material(self, bits: int) -> bytes:
191 if bits not in ASYMMETRIC_KEY_DATA[self.expression]:
193 .format(bits, self.expression))
194 return ASYMMETRIC_KEY_DATA[self.expression][bits]
195 if bits % 8 != 0:
197 .format(bits, self.expression))
198 length = bits // 8
A Dbignum_data.py143 def __gen_safe_prime(bits, seed): argument
157 prime = 2*getPrime(bits-1, rng.randbytes)+1 #pylint: disable=no-member
/mbedtls/include/psa/
A Dcrypto_struct.h275 psa_key_bits_t MBEDTLS_PRIVATE(bits);
406 size_t bits) in psa_set_key_bits() argument
408 if (bits > PSA_MAX_KEY_BITS) { in psa_set_key_bits()
409 attributes->MBEDTLS_PRIVATE(bits) = PSA_KEY_BITS_TOO_LARGE; in psa_set_key_bits()
411 attributes->MBEDTLS_PRIVATE(bits) = (psa_key_bits_t) bits; in psa_set_key_bits()
418 return attributes->MBEDTLS_PRIVATE(bits); in psa_get_key_bits()

Completed in 199 milliseconds

1234