mbedtls
mbedtls copied to clipboard
Make bignum non-public
Remove bignum.h from the public interface.
This probably requires defining a simple replacement interface for importing/exporting bignums to replace APIs that currently expose mbedtls_mpi. Structs with private fields of type mbedtls_mpi will need to reference an internal bignum header to get this type.
- [ ] remove
bignum.hfrom the public include folder - [ ] define simple public interface for importing/exporting bignums. Probably just an array of bytes with a guarantee about byte order.
- [ ]
asn1.h,asn1write.h:mbedtls_asn1_get_mpi,mbedtls_asn1_write_mpi- move to replacement interface - [x] dhm.h: this will be internal
- [ ] ecp.h: this will be internal
- [ ] pk.h: investigate
MBEDTLS_PK_DEBUG_MPI - [x] rsa.h: will be internal
- [x] ssl.h: some private
mbedtls_mpistruct fields, only for DHM in TLS 1.2 which is being removed - [ ]
x509_crt.h:removembedtls_x509write_crt_set_serial()(functionality covered bymbedtls_x509write_crt_set_serial_raw)
Other consequences:
- https://github.com/Mbed-TLS/mbedtls/issues/9070
- ecp.h: this should probably be internal?
Note: we can't make ecp.h internal without a regression unless we've done #7292, #7293 and #7294 first. (To clarify, since those are investigation tasks: I'm not talking about just doing the investigations, but about actually executing the tasks that will result from those investigations.)