0

I am playing with a minimal https server on an ESP01S, using BearSSL::ESP8266WebServerSecure.

  • With 2048bit RSA keys it takes ~5 seconds to serve a "hello" request.
  • Using 256bit EC keys it takes ~2 seconds.

I wonder whether it is possible to make key exchange faster without giving up on reasonable security level.

I am struggling with trying to set ec_all_m15 implementation (see Key Exchange) to make it faster without any luck - I have actually no idea how to do it properly .

I tried something like

...
BearSSL::X509List *cert = new BearSSL::X509List(serverCert.c_str());
BearSSL::PrivateKey *key = new BearSSL::PrivateKey(serverKey.c_str());
server.setECCert(cert, BR_KEYTYPE_EC, key);
server.begin();
br_ssl_server_context sc;
br_ssl_server_init_full_ec(&sc, cert->getX509Certs(), 1, BR_KEYTYPE_EC, key->getEC());
br_ssl_engine_set_ec(&sc.eng, &br_ec_all_m15);
br_ssl_server_reset(&sc);

Could someone help pls?

  • it always going to be slow. what have you tried? – dandavis Apr 19 at 18:39
  • @dandavis I have added to the post. – balee Apr 20 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.