summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-11-26 07:44:35 -0800
committerRoshan Pius <rpius@google.com>2019-11-27 18:22:10 +0000
commitf294fbb8b6271d54a73bfe627503c92cc8974a85 (patch)
tree7dd8deadc49490afa09c6568bb24a02ba936e5ee /service
parentc481bdc54f3c2420c67d1f19a1c6e0dbfdada19a (diff)
WifiConfigStoreEncryptionUtil: Use 256 bit secret key
Bug: 140485110 Test: Manual verification - Store a PSK network config on older build - Upgrade to build with this CL - adb shell settings put global niap_mode 1 - Ensured that the psk was read correctly on upgrade - Ensured that the psk was encrypted when stored on disk after upgrade Change-Id: I3b98c2c83b8aa6280c793068e5c275543ba69e8b
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/util/WifiConfigStoreEncryptionUtil.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/util/WifiConfigStoreEncryptionUtil.java b/service/java/com/android/server/wifi/util/WifiConfigStoreEncryptionUtil.java
index 2f9b08f2b..46bf0fee1 100644
--- a/service/java/com/android/server/wifi/util/WifiConfigStoreEncryptionUtil.java
+++ b/service/java/com/android/server/wifi/util/WifiConfigStoreEncryptionUtil.java
@@ -51,6 +51,7 @@ public class WifiConfigStoreEncryptionUtil {
private static final String ALIAS_SUFFIX = ".data-encryption-key";
private static final String CIPHER_ALGORITHM = "AES/GCM/NoPadding";
private static final int GCM_TAG_LENGTH = 128;
+ private static final int KEY_LENGTH = 256;
private static final String KEY_STORE = "AndroidKeyStore";
private final String mDataFileName;
@@ -160,6 +161,7 @@ public class WifiConfigStoreEncryptionUtil {
KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT)
.setBlockModes(KeyProperties.BLOCK_MODE_GCM)
.setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
+ .setKeySize(KEY_LENGTH)
.setUid(Process.WIFI_UID)
.build();