Print this page
12390 AES: aes_mech_info_tab error
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Matt Barden <mbarden@tintri.com>
Reviewed by: Toomas Soome <tsoome@me.com>


  58         NULL
  59 };
  60 
  61 /*
  62  * Mechanism info structure passed to KCF during registration.
  63  */
  64 static crypto_mech_info_t aes_mech_info_tab[] = {
  65         /* AES_ECB */
  66         {SUN_CKM_AES_ECB, AES_ECB_MECH_INFO_TYPE,
  67             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  68             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  69             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  70         /* AES_CBC */
  71         {SUN_CKM_AES_CBC, AES_CBC_MECH_INFO_TYPE,
  72             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  73             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  74             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  75         /* AES_CMAC */
  76         {SUN_CKM_AES_CMAC, AES_CMAC_MECH_INFO_TYPE,
  77             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  78             CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC |
  79             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  80         /* AES_CTR */
  81         {SUN_CKM_AES_CTR, AES_CTR_MECH_INFO_TYPE,
  82             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  83             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  84             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  85         /* AES_CCM */
  86         {SUN_CKM_AES_CCM, AES_CCM_MECH_INFO_TYPE,
  87             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  88             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  89             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  90         /* AES_GCM */
  91         {SUN_CKM_AES_GCM, AES_GCM_MECH_INFO_TYPE,
  92             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  93             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  94             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  95         /* AES_GMAC */
  96         {SUN_CKM_AES_GMAC, AES_GMAC_MECH_INFO_TYPE,
  97             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  98             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC |




  58         NULL
  59 };
  60 
  61 /*
  62  * Mechanism info structure passed to KCF during registration.
  63  */
  64 static crypto_mech_info_t aes_mech_info_tab[] = {
  65         /* AES_ECB */
  66         {SUN_CKM_AES_ECB, AES_ECB_MECH_INFO_TYPE,
  67             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  68             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  69             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  70         /* AES_CBC */
  71         {SUN_CKM_AES_CBC, AES_CBC_MECH_INFO_TYPE,
  72             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  73             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  74             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  75         /* AES_CMAC */
  76         {SUN_CKM_AES_CMAC, AES_CMAC_MECH_INFO_TYPE,
  77             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  78             CRYPTO_FG_MAC | CRYPTO_FG_MAC_ATOMIC,
  79             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  80         /* AES_CTR */
  81         {SUN_CKM_AES_CTR, AES_CTR_MECH_INFO_TYPE,
  82             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  83             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  84             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  85         /* AES_CCM */
  86         {SUN_CKM_AES_CCM, AES_CCM_MECH_INFO_TYPE,
  87             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  88             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  89             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  90         /* AES_GCM */
  91         {SUN_CKM_AES_GCM, AES_GCM_MECH_INFO_TYPE,
  92             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  93             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC,
  94             AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES},
  95         /* AES_GMAC */
  96         {SUN_CKM_AES_GMAC, AES_GMAC_MECH_INFO_TYPE,
  97             CRYPTO_FG_ENCRYPT | CRYPTO_FG_ENCRYPT_ATOMIC |
  98             CRYPTO_FG_DECRYPT | CRYPTO_FG_DECRYPT_ATOMIC |