Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove parts of md, cipher and pk #8133

Closed
4 tasks
daverodgman opened this issue Aug 30, 2023 · 3 comments
Closed
4 tasks

Remove parts of md, cipher and pk #8133

daverodgman opened this issue Aug 30, 2023 · 3 comments
Labels
api-break This issue/PR breaks the API and must wait for a new major version component-crypto Crypto primitives and low-level interfaces

Comments

@daverodgman
Copy link
Contributor

As per #6792 (comment)

The high-level legacy crypto modules are gradually being replaced by PSA, but we'll probably keep them in 4.0 and remove them in 5.0. (The rule of thumb for API migration is: one major release to introduce the new API and deprecate the old one, and another major release to remove the old one.)

We don't have to keep all the features of md, cipher and pk, especially those that don't match well with PSA and aren't very useful.

  • Remove ad hoc names of algorithms (mbedtls_md_info_from_string, etc.). They aren't used anywhere else in the library and don't follow any particular standards.
  • Remove ccm.h and gcm.h as public interfaces, keeping only the cipher.h abstraction.
  • Remove access to KW/KWP from cipher.h. It belongs differently from the others, and that has caused bugs in the past.
  • Remove padding other than PKCS7 from cipher.h.
@daverodgman daverodgman added component-crypto Crypto primitives and low-level interfaces api-break This issue/PR breaks the API and must wait for a new major version labels Aug 30, 2023
@mpg
Copy link
Contributor

mpg commented Nov 2, 2023

Remove access to KW/KWP from cipher.h. It belongs differently from the others, and that has caused bugs in the past.

In another discussion, @gilles-peskine-arm wrote:

There are features of cipher that are not provided through the PSA API, but that we want to keep in the library: XTS, NIST KW. If we remove cipher, we really need to provide them through PSA, and that's a nontrivial amount of work. We're still working on an API that would be suitable for NIST KW and I'm not convinced we'll ship that in 4.0.

IMO that's a rather strong argument for not removing NIST KW support from Cipher.

@gilles-peskine-arm
Copy link
Contributor

We can leave mbedtls/nist_kw.h as the only interface to KW. But that means leaving that as a public API, which is not ideal either.

@gilles-peskine-arm
Copy link
Contributor

Covered by #8450, #8451 and #8452.

@gilles-peskine-arm gilles-peskine-arm closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
@github-project-automation github-project-automation bot moved this to Mbed TLS 4.0 SHOULD in Backlog for Mbed TLS Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-break This issue/PR breaks the API and must wait for a new major version component-crypto Crypto primitives and low-level interfaces
Projects
Status: Mbed TLS 4.0 SHOULD
Development

No branches or pull requests

3 participants