When I do cat on wpa_supplicant.conf file on Samsung mobiles, I see that the passwords are encrypted. But when I open the same file on LG mobiles, I can see the passwords in plain text.

This is what I see on my Galaxy S5. The information below is for my network which has a WPA password 77807780 (psk is the encrypted passkey):


Is this a feature on Samsung mobiles? What kind of encryption is used to encrypt the password and how to decrypt them?

  • Yeah, I can confirm that it's in plain text on LG Nexus 4. Researching a bit also confirms that Samsung does encrypt/hash it, but I haven't found the method yet.
    – Andrew T.
    Jan 15, 2015 at 9:04
  • On my Galaxy S5, it uses OpenSSL's EVP_Encrypt* methods with the EVP_aes_128_cbc cipher, i.e. AES with a 128-bit key in CBC mode. It makes sense since all encrypted PSKs I've seen have a length modulo 32 hex chars (32*4 bits = 128 bits, the block size of AES). No idea what's being used as the key or the IV.
    – johnwait
    Dec 26, 2015 at 12:54
  • Related: Retrieve WiFi password, How to recover stored wifi password?
    – Andrew T.
    Jan 16, 2022 at 10:18

3 Answers 3


Use wpa_supplicant's wpa_passphrase tool to create your own "real" psk. Actually, the plain-text psk (double-quoted) must be processed at every startup and config reload to generate the real, 64 hex-digit (256-bit) psk. So, using wpa_passphrase to manually create the fully-processed PSK actually optimizes wpa_supplicant's startup & config reload time. :)

About decrypting them... wpa_supplicant uses an AES-based cipher, which is well respected. I think TKIP is deprecated and possibly exploitable.


I got a solution:

  • Go to root browser
  • Go to /etc/secure_storage/.system.wpa_supplicant then delete this folder (only ".secure.supplicant.conf"), then reboot.
  • Strange number gone

Note: It only works for Samsung devices, all saved WiFi hotspots will be lost for the first time.


Find the following line in build.prop:


and change it to


Then reboot the device. Now retype password of your Wi-Fi network.

If your phone is rooted, you can view passwords either by reading wpa_supplicant.conf file or by installing "WiFi Key Recovery" app.

  • currently i don't have a device to test your solution on, but anyway that's not what i asked for i need to know the encryption type and how to decrypt an already encrypted password Sep 12, 2015 at 12:49
  • This is the same as the one above that deletes the secure storage folder, but applies to everything that uses Secure Server.
    – cde
    Jun 11, 2016 at 22:57
  • @MOHAMMAD it's unlikely you will ever decrypt one once encrypted.
    – cde
    Jun 11, 2016 at 22:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .