From 4c19a3af3535eb3442ff7cc4235420baf16322b7 Mon Sep 17 00:00:00 2001 From: Shawn Willden Date: Mon, 1 Jun 2015 11:40:24 -0600 Subject: [PATCH] Fix block mode numbering (CTR got added as 4 rather than 3) Change-Id: I8c886c67ba081255ef18eb0f99ca1e6003fabb33 --- include/hardware/keymaster_defs.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/hardware/keymaster_defs.h b/include/hardware/keymaster_defs.h index 8e25e6c3..4e769d5d 100644 --- a/include/hardware/keymaster_defs.h +++ b/include/hardware/keymaster_defs.h @@ -150,22 +150,17 @@ typedef enum { /** * Symmetric block cipher modes provided by keymaster implementations. - * - * KM_MODE_FIRST_UNAUTHENTICATED and KM_MODE_FIRST_AUTHENTICATED are not modes but markers used to - * separate the available modes into classes. */ typedef enum { /* Unauthenticated modes, usable only for encryption/decryption and not generally recommended * except for compatibility with existing other protocols. */ - KM_MODE_FIRST_UNAUTHENTICATED = 1, - KM_MODE_ECB = KM_MODE_FIRST_UNAUTHENTICATED, + KM_MODE_ECB = 1, KM_MODE_CBC = 2, - KM_MODE_CTR = 4, + KM_MODE_CTR = 3, /* Authenticated modes, usable for encryption/decryption and signing/verification. Recommended * over unauthenticated modes for all purposes. */ - KM_MODE_FIRST_AUTHENTICATED = 32, - KM_MODE_GCM = KM_MODE_FIRST_AUTHENTICATED, + KM_MODE_GCM = 32, } keymaster_block_mode_t; /**