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

Secure serial connection between ESP8266 and onboard RPI #2

Open
KaspervanM opened this issue Jun 29, 2020 · 2 comments
Open

Secure serial connection between ESP8266 and onboard RPI #2

KaspervanM opened this issue Jun 29, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@KaspervanM
Copy link
Owner

What

The RPI needs to get the WiFi SSID and password from the ESP8266 in order to connect. This will be done using a serial. However, unlike within the ESP's EEPROM, everything is encrypted and the source code cannot be retrieved to decrypt. All files and source code can easily be acquired from the micro-sd chip. This means decrypting cannot be done on the RPI, but how does the ESP know if it really is the RPI that is asking for the password? Or, if the decrypting is one on the RPI, how can the method be concealed?

How

  • For one, the decrypting could be done on the RPI within a dll written in machine language.
    • The password would still be vulnerable to exposure as the key and the encrypted password still needs to be given to the RPI. And as the program to decrypt is there as well, this is all that is needed to get the password.
  • Another possibility would be for the password to be decrypted by the ESP before being sent to the RPI.
    • This would be most vulnerable because without a verification method, you can easily read out the password if you connect the serial to a pc. And any verification method could be found in the source code of the RPI.
@KaspervanM KaspervanM added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Jun 29, 2020
@KaspervanM KaspervanM self-assigned this Jun 29, 2020
@KaspervanM KaspervanM linked a pull request Jun 30, 2020 that will close this issue
@KaspervanM KaspervanM removed a link to a pull request Jun 30, 2020
@evanpacini
Copy link
Collaborator

I know how to fix this problem. We need to use cpp all the way. The arduino should send a ciphered ssid and pass along with a randomly generated key with which both were encrypted. After the python code receives this, it should directly send it to a (compiled) c++ program which would decipher it and (using the few commands we had made) put it in the wpa_supplicant file (using the wpa_passphrase thing). This way the pass is never exposed, only in a compiled program.

@KaspervanM
Copy link
Owner Author

Yes, that is a good idea. However, this would mean the key, the password and the decryption program would still be available to everyone.

Though, I do believe this would make cracking it hard enough to make it work. I will be trying this out right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants