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) ?
570 const mbedtls_cipher_info_t *cipher_info;
585 cipher_info = mbedtls_cipher_info_from_type(cipher);
586 TEST_ASSERT(NULL != cipher_info);
588 if (cipher_info->type == MBEDTLS_CIPHER_CHACHA20 ||
589 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) {
596 TEST_ASSERT(sizeof(key) * 8 >= mbedtls_cipher_info_get_key_bitlen(cipher_info));
598 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_dec, cipher_info));
601 key, mbedtls_cipher_info_get_key_bitlen(cipher_info),
609 if (ctx_dec.cipher_info->mode == MBEDTLS_MODE_CBC) {
616 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
617 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
629 (cipher_info->mode == MBEDTLS_MODE_CBC ||
630 cipher_info->mode == MBEDTLS_MODE_ECB)) {
665 const mbedtls_cipher_info_t *cipher_info;
685 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
686 TEST_ASSERT(NULL != cipher_info);
688 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_dec, cipher_info));
689 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_enc, cipher_info));
703 if (NULL != strstr(cipher_info->name, "CCM*-NO-TAG")) {
706 } else if (cipher_info->type == MBEDTLS_CIPHER_CHACHA20 ||
707 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) {
720 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
721 cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
816 int expected = (ctx.cipher_info->mode == MBEDTLS_MODE_GCM ||
817 ctx.cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
831 int tag_expected = (ctx.cipher_info->mode == MBEDTLS_MODE_GCM ||
832 ctx.cipher_info->type == MBEDTLS_CIPHER_CHACHA20_POLY1305) ?
1110 if (MBEDTLS_MODE_CBC == ctx.cipher_info->mode) {
1134 const mbedtls_cipher_info_t *cipher_info;
1139 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
1140 TEST_ASSERT(NULL != cipher_info);
1141 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx, cipher_info));
1154 mbedtls_cipher_info_t cipher_info;
1160 cipher_info.mode = MBEDTLS_MODE_CBC;
1161 ctx.cipher_info = &cipher_info;
1183 const mbedtls_cipher_info_t *cipher_info;
1194 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
1195 TEST_ASSERT(NULL != cipher_info);
1196 TEST_ASSERT(mbedtls_cipher_info_from_string(cipher_string) == cipher_info);
1197 TEST_ASSERT(strcmp(mbedtls_cipher_info_get_name(cipher_info),
1201 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_dec, cipher_info));
1202 TEST_ASSERT(0 == mbedtls_cipher_setup(&ctx_enc, cipher_info));
1222 const mbedtls_cipher_info_t *cipher_info;
1227 cipher_info = mbedtls_cipher_info_from_type(cipher_id);
1229 if (cipher_info->mode != MBEDTLS_MODE_CBC) {
1233 keylen = mbedtls_cipher_info_get_key_bitlen(cipher_info);
1237 TEST_EQUAL(0, mbedtls_cipher_setup(&ctx, cipher_info));