summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-12-02 12:25:35 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-12-02 12:25:35 -0800
commit3017569ad9a3ba65fe6401fe6dfd8e34929ddd19 (patch)
tree55e824129503a3fe75679270359442191adaaf4b
parent91c234992d54b44242002f6720e962fe0adeaf3c (diff)
parentf294fbb8b6271d54a73bfe627503c92cc8974a85 (diff)
WifiConfigStoreEncryptionUtil: Use 256 bit secret key
am: f294fbb8b6 Change-Id: I811be446958117ceab2a9b97b69ca5b8c21097fb
-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();