Repository navigation
Conversation
A build-time profile next to BEARSSL_SSL_BASIC: TLS 1.2 only, ECDHE key exchange with ChaCha20-Poly1305 or AES-GCM only. The default client and server setup no longer installs CBC, CCM, 3DES, RSA key exchange, the TLS 1.0/1.1 PRF or the MD5, SHA-1 and SHA-224 hashes, so none of them is offered in the ClientHello or accepted in a signature, and the linker drops their code. setSSLVersion() refuses a minimum below TLS 1.2 and setCiphersLessSecure() fails under the profile. The IDE gets it as a third "SSL Support" menu entry.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
BEARSSL_SSL_AEAD_ONLY, a build-time cipher profile next to the existingBEARSSL_SSL_BASIC, and a matching third entry in the IDE's SSL Support menu.Why
setCiphers()andsetSSLVersion()restrict what goes on the wire, butbr_ssl_client_base_init()/br_ssl_server_base_init()install every algorithm regardless:signature_algorithmskeeps advertising SHA-1 (and SHA-224), because it is built from the installed hashes, and the X.509 validator still accepts SHA-1 signed certificates;BEARSSL_SSL_BASICis the only existing knob, and it goes the other way (RSA key exchange + AES-CBC, no elliptic curves).What the profile does
BR_TLS12(BEARSSL_TLS_MIN_DEFAULT), andsetSSLVersion()rejects a lower minimum, since the TLS 1.0/1.1 PRF is not installed.rsapub), TLS 1.0 PRF, MD5, SHA-1, SHA-224.setCiphersLessSecure()returnsfalse(its RSA/CBC suites are not built).BEARSSL_SSL_BASICandBEARSSL_SSL_AEAD_ONLYis an#error.Without the flag nothing changes.
Effect
On a D1 mini sketch that keeps one TLS 1.2 connection to an ECDSA-certificate server, the image shrinks by about 18 KB (58 BearSSL symbols dropped: the 3DES, CCM, AES-CBC/CTR-CBC, MD5, SHA-224, TLS 1.0 PRF and RSA key-exchange code). IRAM and static DRAM are unchanged. With the hashes not installed,
signature_algorithmslists only the SHA-256/384/512 variants.Testing
BEARSSL_SSL_BASICalone still builds, and both flags together stop at the#error.signature_algorithmswithout any SHA-1 or SHA-224 entry; the connection then carries application data normally.boards.txtregenerated withtools/boards.txt.py --boardsgen.doc/esp8266wifi/bearssl-client-secure-class.rst.