tayfunulu / WiFiManager

WiFi manager for ESP8266 - ESP12 - ESP32 - micropython
MIT License
345 stars 104 forks source link

How to encrypt a file? #20

Open andrequeiroz2 opened 4 years ago

andrequeiroz2 commented 4 years ago

I would like to encrypt this information ssid and passw in 'wifi.dat'. how can I do this?

ThomasWaldmann commented 4 years ago

There isn't much point in encrypting this as you'ld need to decrypt it to use it.

Also, you'ld need to either have the decryption key on the device or manually enter it every time it needs to be decrypted.

andrequeiroz2 commented 4 years ago

I partially agree with you. Having the password displayed legibly, can bring discomfort depending on the security policy adopted. I understand that keeping the decryption key on the device only makes it difficult to read the password, but that's the intention

ThomasWaldmann commented 4 years ago

The point is that it is security by obscurity (which is known to not really work) if you have a ready-to-use decryption key on the device.

You can not read the password in the encrypted file, but you can use the key to decrypt it and then read it.

andrequeiroz2 commented 4 years ago

Ok, would you have any suggestions for solving this problem?

ThomasWaldmann commented 4 years ago

It is unclear what the problem is and what you are trying to achieve. Depending on that, there might be a solution or it might be fundamentally impossible.