Lines Matching refs:cipher_info

318     const mbedtls_cipher_info_t *cipher_info;
334 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_CBC);
335 TEST_ASSERT(NULL != cipher_info);
337 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx, cipher_info));
350 cipher_info = mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_ECB);
351 TEST_ASSERT(NULL != cipher_info);
353 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx, cipher_info));
377 const mbedtls_cipher_info_t *cipher_info;
390 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
391 TEST_ASSERT(NULL != cipher_info);
392 TEST_ASSERT(mbedtls_cipher_info_from_string(cipher_string) == cipher_info);
393 TEST_ASSERT(strcmp(mbedtls_cipher_info_get_name(cipher_info),
397 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_dec, cipher_info));
398 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_enc, cipher_info));
424 if (NULL != strstr(cipher_info->name, "CCM*-NO-TAG")) {
427 } else if (cipher_info->type == MBEDTLS_CIPHER_CHACHA20 ||
428 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) {
441 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
442 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
511 const mbedtls_cipher_info_t *cipher_info;
528 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
529 TEST_ASSERT(NULL != cipher_info);
532 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx, cipher_info));
542 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
543 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
574 const mbedtls_cipher_info_t *cipher_info;
589 cipher_info = mbedtls_cipher_info_from_type(cipher);
590 TEST_ASSERT(NULL != cipher_info);
592 if (cipher_info->type == MBEDTLS_CIPHER_CHACHA20 ||
593 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) {
600 TEST_ASSERT(sizeof(key) * 8 >= mbedtls_cipher_info_get_key_bitlen(cipher_info));
602 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_dec, cipher_info));
605 key, mbedtls_cipher_info_get_key_bitlen(cipher_info),
613 if (ctx_dec.cipher_info->mode == MBEDTLS_MODE_CBC) {
620 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
621 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
633 (cipher_info->mode == MBEDTLS_MODE_CBC ||
634 cipher_info->mode == MBEDTLS_MODE_ECB)) {
669 const mbedtls_cipher_info_t *cipher_info;
689 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
690 TEST_ASSERT(NULL != cipher_info);
692 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_dec, cipher_info));
693 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_enc, cipher_info));
707 if (NULL != strstr(cipher_info->name, "CCM*-NO-TAG")) {
710 } else if (cipher_info->type == MBEDTLS_CIPHER_CHACHA20 ||
711 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) {
724 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
725 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
820 int expected = (ctx.cipher_info->mode == MBEDTLS_MODE_GCM ||
821 ctx.cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
839 int tag_expected = (ctx.cipher_info->mode == MBEDTLS_MODE_GCM ||
840 ctx.cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
1118 if (MBEDTLS_MODE_CBC == ctx.cipher_info->mode) {
1142 const mbedtls_cipher_info_t *cipher_info;
1147 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
1148 TEST_ASSERT(NULL != cipher_info);
1149 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx, cipher_info));
1162 mbedtls_cipher_info_t cipher_info;
1168 cipher_info.mode = MBEDTLS_MODE_CBC;
1169 ctx.cipher_info = &cipher_info;
1191 const mbedtls_cipher_info_t *cipher_info;
1202 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
1203 TEST_ASSERT(NULL != cipher_info);
1204 TEST_ASSERT(mbedtls_cipher_info_from_string(cipher_string) == cipher_info);
1205 TEST_ASSERT(strcmp(mbedtls_cipher_info_get_name(cipher_info),
1209 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_dec, cipher_info));
1210 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_enc, cipher_info));
1230 const mbedtls_cipher_info_t *cipher_info;
1235 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
1237 if (cipher_info->mode != MBEDTLS_MODE_CBC) {
1241 keylen = mbedtls_cipher_info_get_key_bitlen(cipher_info);
1245 TEST_EQUAL(0, mbedtls_cipher_setup(&ctx, cipher_info));