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

Adding more Cipher Suites to Espruino #1994

Closed
andreykotomin opened this issue Mar 30, 2021 · 3 comments
Closed

Adding more Cipher Suites to Espruino #1994

andreykotomin opened this issue Mar 30, 2021 · 3 comments

Comments

@andreykotomin
Copy link

Hello!
Can additional cipher suites be added to Espruino? I did a little research and figured out how to do it:
http://forum.espruino.com/conversations/361833/
It'd be useful if Espruino could access modern https web-sites and APIs.

@andreykotomin andreykotomin changed the title Add more Cipher Suites to Espruino Adding more Cipher Suites to Espruino Mar 30, 2021
@gfwilliams
Copy link
Member

Thanks for this - yes, this looks like a good thing to add. The only gotcha is ensuring it's not going to cause compilation problems for other targets before enabling as it could use more flash - but when I get a moment I'll check on that.

It seems you are significantly better versed in this than me: So are there any cipher suites that Espruino supports that are currently deprecated/unused and could be removed from the build?

@andreykotomin
Copy link
Author

Unfortunately I'm not an expert in cyber security, however I've found this article with some statistics about most used cipher suites:
https://scotthelme.co.uk/top-1-million-analysis-march-2020. It seems that the TLS_RSA suites are hardly used anymore.

@gfwilliams
Copy link
Member

Just a note on this:

MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED, MBEDTLS_DHM_C, MBEDTLS_GCM_C, and also added two lines:
libs/crypto/mbedtls/library/dhm.c
libs/crypto/mbedtls/library/gcm.c

I've checked here and for Espruino WiFi:

  • before (just RSA) 341616
  • as you suggested 347120
  • as you suggested with RSA removed 346208

So it'd save about 1k taking the old one out. I'm just checking whether everything still builds ok, but if it does I think it makes sense to leave both in for now to avoid breaking stuff that might have worked previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants