Skip to content

mbedTLS: MBEDTLS_POLY1305_C option broken (IDFGH-17251) #18243

@abgandar

Description

@abgandar

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

master

Operating System used.

macOS

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

When enabling MBEDTLS_POLY1305_C in menuconfig, I should get poly1305 support in tf-psa and the option to use chacha20-poly1305.

What is the actual behavior?

When enabling MBEDTLS_POLY1305_C in menuconfig, the build fails with an #error directive in mbedtls.

Steps to reproduce.

  1. enable MBEDTLS_POLY1305_C in menuconfig
  2. build

Build or installation Logs.

In file included from [...]/esp-idf/components/mbedtls/mbedtls/tf-psa-crypto/include/tf-psa-crypto/build_info.h:125,
                 from [...]/esp-idf/components/mbedtls/mbedtls/tf-psa-crypto/core/tf_psa_crypto_config.c:50:
[...]/esp-idf/components/mbedtls/mbedtls/tf-psa-crypto/core/tf_psa_crypto_config_check_user.h:385:4: error: #error "MBEDTLS_POLY1305_C is not a valid configuration option."
  385 | #  error "MBEDTLS_POLY1305_C is not a valid configuration option."
      |    ^~~~~

Diagnostic report archive.

No response

More Information.

MbedTLS have renamed their options, this should probably be expanded to PSA_WANT_ALG_CHACHA20_POLY1305 according to their docs

Note that POLY1305 compiles and works fine when I force MBEDTLS_CHACHAPOLY_C=y without setting MBEDTLS_POLY1305_C (circumventing the Kconfig dependency of MBEDTLS_CHACHAPOLY_C on MBEDTLS_POLY1305_C).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions