Lines Matching defs:bits

49     size_t bits;
60 bits = psa_get_key_bits(&attributes);
94 TEST_ASSERT(bits != 0);
95 TEST_ASSERT(bits <= PSA_MAX_KEY_BITS);
97 TEST_ASSERT(bits % 8 == 0);
102 TEST_ASSERT(bits <= PSA_VENDOR_ECC_MAX_CURVE_BITS);
104 TEST_ASSERT(bits <= PSA_VENDOR_RSA_MAX_KEY_BITS);
796 to expected PRK size. In practice it means that key bits must match
844 psa_key_type_t type, size_t bits,
847 TEST_ASSERT(exported_length <= PSA_EXPORT_KEY_OUTPUT_SIZE(type, bits));
850 TEST_EQUAL(exported_length, PSA_BITS_TO_BYTES(bits));
877 if (!mbedtls_test_asn1_skip_integer(&p, end, bits, bits, 1)) {
880 if (!mbedtls_test_asn1_skip_integer(&p, end, 2, bits, 1)) {
884 if (!mbedtls_test_asn1_skip_integer(&p, end, bits / 2, bits, 1)) {
888 if (!mbedtls_test_asn1_skip_integer(&p, end, bits / 2, bits / 2 + 1, 1)) {
891 if (!mbedtls_test_asn1_skip_integer(&p, end, bits / 2, bits / 2 + 1, 1)) {
894 if (!mbedtls_test_asn1_skip_integer(&p, end, 1, bits / 2 + 1, 0)) {
897 if (!mbedtls_test_asn1_skip_integer(&p, end, 1, bits / 2 + 1, 0)) {
900 if (!mbedtls_test_asn1_skip_integer(&p, end, 1, bits / 2 + 1, 0)) {
911 TEST_EQUAL(exported_length, PSA_BITS_TO_BYTES(bits));
930 if (!mbedtls_test_asn1_skip_integer(&p, end, bits, bits, 1)) {
933 if (!mbedtls_test_asn1_skip_integer(&p, end, 2, bits, 1)) {
940 PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE(type, bits));
949 PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE(type, bits));
956 TEST_EQUAL(PSA_BITS_TO_BYTES(bits), exported_length);
960 TEST_EQUAL(PSA_BITS_TO_BYTES(bits + 1), exported_length);
968 TEST_EQUAL(1 + 2 * PSA_BITS_TO_BYTES(bits), exported_length);
974 PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE(type, bits));
984 /* Check the parity bits. */
986 for (i = 0; i < bits / 8; i++) {