am a270264c: Merge "Track more changes to keymaster_defs.h"
* commit 'a270264c61daa42a5b03bbb1e7f23e77780f8fc0': Track more changes to keymaster_defs.h
This commit is contained in:
@@ -96,18 +96,9 @@ public final class KeymasterDefs {
|
||||
public static final int KM_MODE_FIRST_UNAUTHENTICATED = 1;
|
||||
public static final int KM_MODE_ECB = KM_MODE_FIRST_UNAUTHENTICATED;
|
||||
public static final int KM_MODE_CBC = 2;
|
||||
public static final int KM_MODE_CBC_CTS = 3;
|
||||
public static final int KM_MODE_CTR = 4;
|
||||
public static final int KM_MODE_OFB = 5;
|
||||
public static final int KM_MODE_CFB = 6;
|
||||
public static final int KM_MODE_XTS = 7;
|
||||
public static final int KM_MODE_FIRST_AUTHENTICATED = 32;
|
||||
public static final int KM_MODE_GCM = KM_MODE_FIRST_AUTHENTICATED;
|
||||
public static final int KM_MODE_OCB = 33;
|
||||
public static final int KM_MODE_CCM = 34;
|
||||
public static final int KM_MODE_FIRST_MAC = 128;
|
||||
public static final int KM_MODE_CMAC = KM_MODE_FIRST_MAC;
|
||||
public static final int KM_MODE_POLY1305 = 129;
|
||||
|
||||
// Padding modes.
|
||||
public static final int KM_PAD_NONE = 1;
|
||||
@@ -115,11 +106,7 @@ public final class KeymasterDefs {
|
||||
public static final int KM_PAD_RSA_PSS = 3;
|
||||
public static final int KM_PAD_RSA_PKCS1_1_5_ENCRYPT = 4;
|
||||
public static final int KM_PAD_RSA_PKCS1_1_5_SIGN = 5;
|
||||
public static final int KM_PAD_ANSI_X923 = 32;
|
||||
public static final int KM_PAD_ISO_10126 = 33;
|
||||
public static final int KM_PAD_ZERO = 64;
|
||||
public static final int KM_PAD_PKCS7 = 65;
|
||||
public static final int KM_PAD_ISO_7816_4 = 66;
|
||||
public static final int KM_PAD_PKCS7 = 64;
|
||||
|
||||
// Digest modes.
|
||||
public static final int KM_DIGEST_NONE = 0;
|
||||
@@ -129,9 +116,6 @@ public final class KeymasterDefs {
|
||||
public static final int KM_DIGEST_SHA_2_256 = 4;
|
||||
public static final int KM_DIGEST_SHA_2_384 = 5;
|
||||
public static final int KM_DIGEST_SHA_2_512 = 6;
|
||||
public static final int KM_DIGEST_SHA_3_256 = 7;
|
||||
public static final int KM_DIGEST_SHA_3_384 = 8;
|
||||
public static final int KM_DIGEST_SHA_3_512 = 9;
|
||||
|
||||
// Key origins.
|
||||
public static final int KM_ORIGIN_HARDWARE = 0;
|
||||
@@ -151,7 +135,6 @@ public final class KeymasterDefs {
|
||||
// Key formats.
|
||||
public static final int KM_KEY_FORMAT_X509 = 0;
|
||||
public static final int KM_KEY_FORMAT_PKCS8 = 1;
|
||||
public static final int KM_KEY_FORMAT_PKCS12 = 2;
|
||||
public static final int KM_KEY_FORMAT_RAW = 3;
|
||||
|
||||
// User authenticators.
|
||||
|
||||
@@ -798,7 +798,7 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
|
||||
// TODO: Verify we have an RSA public key that's well formed.
|
||||
}
|
||||
|
||||
public void testAesOcbEncryptSuccess() throws Exception {
|
||||
public void testAesGcmEncryptSuccess() throws Exception {
|
||||
String name = "test";
|
||||
KeymasterArguments args = new KeymasterArguments();
|
||||
args.addInt(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_ENCRYPT);
|
||||
@@ -806,7 +806,7 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
|
||||
args.addInt(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES);
|
||||
args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE);
|
||||
args.addInt(KeymasterDefs.KM_TAG_KEY_SIZE, 256);
|
||||
args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_OCB);
|
||||
args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_GCM);
|
||||
args.addInt(KeymasterDefs.KM_TAG_CHUNK_LENGTH, 4096);
|
||||
args.addInt(KeymasterDefs.KM_TAG_MAC_LENGTH, 16);
|
||||
args.addBoolean(KeymasterDefs.KM_TAG_NO_AUTH_REQUIRED);
|
||||
@@ -903,9 +903,7 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
|
||||
args.addInt(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES);
|
||||
args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE);
|
||||
args.addInt(KeymasterDefs.KM_TAG_KEY_SIZE, 256);
|
||||
args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_OCB);
|
||||
args.addInt(KeymasterDefs.KM_TAG_CHUNK_LENGTH, 4096);
|
||||
args.addInt(KeymasterDefs.KM_TAG_MAC_LENGTH, 16);
|
||||
args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_CTR);
|
||||
args.addBoolean(KeymasterDefs.KM_TAG_NO_AUTH_REQUIRED);
|
||||
|
||||
KeyCharacteristics outCharacteristics = new KeyCharacteristics();
|
||||
@@ -935,11 +933,9 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
|
||||
args.addInt(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_ENCRYPT);
|
||||
args.addInt(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_DECRYPT);
|
||||
args.addInt(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES);
|
||||
args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE);
|
||||
args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_PKCS7);
|
||||
args.addInt(KeymasterDefs.KM_TAG_KEY_SIZE, 256);
|
||||
args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_OCB);
|
||||
args.addInt(KeymasterDefs.KM_TAG_CHUNK_LENGTH, 4096);
|
||||
args.addInt(KeymasterDefs.KM_TAG_MAC_LENGTH, 16);
|
||||
args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_ECB);
|
||||
args.addInt(KeymasterDefs.KM_TAG_USER_AUTH_TYPE, 1);
|
||||
|
||||
KeyCharacteristics outCharacteristics = new KeyCharacteristics();
|
||||
|
||||
Reference in New Issue
Block a user