Print this page
4185 New hash algorithm support


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  23  */



  24 
  25 #ifndef _SYS_CRYPTO_COMMON_H
  26 #define _SYS_CRYPTO_COMMON_H
  27 
  28 /*
  29  * Header file for the common data structures of the cryptographic framework
  30  */
  31 
  32 #ifdef __cplusplus
  33 extern "C" {
  34 #endif
  35 
  36 #include <sys/types.h>
  37 #include <sys/uio.h>
  38 #include <sys/stream.h>
  39 #include <sys/mutex.h>
  40 #include <sys/condvar.h>
  41 
  42 
  43 /* Cryptographic Mechanisms */


 177 #define CRYPTO_CAN_SHARE_OPSTATE        0x00000004 /* supports sharing */
 178 
 179 
 180 /* Mechanisms supported out-of-the-box */
 181 #define SUN_CKM_MD4                     "CKM_MD4"
 182 #define SUN_CKM_MD5                     "CKM_MD5"
 183 #define SUN_CKM_MD5_HMAC                "CKM_MD5_HMAC"
 184 #define SUN_CKM_MD5_HMAC_GENERAL        "CKM_MD5_HMAC_GENERAL"
 185 #define SUN_CKM_SHA1                    "CKM_SHA_1"
 186 #define SUN_CKM_SHA1_HMAC               "CKM_SHA_1_HMAC"
 187 #define SUN_CKM_SHA1_HMAC_GENERAL       "CKM_SHA_1_HMAC_GENERAL"
 188 #define SUN_CKM_SHA256                  "CKM_SHA256"
 189 #define SUN_CKM_SHA256_HMAC             "CKM_SHA256_HMAC"
 190 #define SUN_CKM_SHA256_HMAC_GENERAL     "CKM_SHA256_HMAC_GENERAL"
 191 #define SUN_CKM_SHA384                  "CKM_SHA384"
 192 #define SUN_CKM_SHA384_HMAC             "CKM_SHA384_HMAC"
 193 #define SUN_CKM_SHA384_HMAC_GENERAL     "CKM_SHA384_HMAC_GENERAL"
 194 #define SUN_CKM_SHA512                  "CKM_SHA512"
 195 #define SUN_CKM_SHA512_HMAC             "CKM_SHA512_HMAC"
 196 #define SUN_CKM_SHA512_HMAC_GENERAL     "CKM_SHA512_HMAC_GENERAL"


 197 #define SUN_CKM_DES_CBC                 "CKM_DES_CBC"
 198 #define SUN_CKM_DES3_CBC                "CKM_DES3_CBC"
 199 #define SUN_CKM_DES_ECB                 "CKM_DES_ECB"
 200 #define SUN_CKM_DES3_ECB                "CKM_DES3_ECB"
 201 #define SUN_CKM_BLOWFISH_CBC            "CKM_BLOWFISH_CBC"
 202 #define SUN_CKM_BLOWFISH_ECB            "CKM_BLOWFISH_ECB"
 203 #define SUN_CKM_AES_CBC                 "CKM_AES_CBC"
 204 #define SUN_CKM_AES_ECB                 "CKM_AES_ECB"
 205 #define SUN_CKM_AES_CTR                 "CKM_AES_CTR"
 206 #define SUN_CKM_AES_CCM                 "CKM_AES_CCM"
 207 #define SUN_CKM_AES_GCM                 "CKM_AES_GCM"
 208 #define SUN_CKM_AES_GMAC                "CKM_AES_GMAC"
 209 #define SUN_CKM_AES_CFB128              "CKM_AES_CFB128"
 210 #define SUN_CKM_RC4                     "CKM_RC4"
 211 #define SUN_CKM_RSA_PKCS                "CKM_RSA_PKCS"
 212 #define SUN_CKM_RSA_X_509               "CKM_RSA_X_509"
 213 #define SUN_CKM_MD5_RSA_PKCS            "CKM_MD5_RSA_PKCS"
 214 #define SUN_CKM_SHA1_RSA_PKCS           "CKM_SHA1_RSA_PKCS"
 215 #define SUN_CKM_SHA256_RSA_PKCS         "CKM_SHA256_RSA_PKCS"
 216 #define SUN_CKM_SHA384_RSA_PKCS         "CKM_SHA384_RSA_PKCS"




   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  23  */
  24 /*
  25  * Copyright 2013 Saso Kiselkov.  All rights reserved.
  26  */
  27 
  28 #ifndef _SYS_CRYPTO_COMMON_H
  29 #define _SYS_CRYPTO_COMMON_H
  30 
  31 /*
  32  * Header file for the common data structures of the cryptographic framework
  33  */
  34 
  35 #ifdef __cplusplus
  36 extern "C" {
  37 #endif
  38 
  39 #include <sys/types.h>
  40 #include <sys/uio.h>
  41 #include <sys/stream.h>
  42 #include <sys/mutex.h>
  43 #include <sys/condvar.h>
  44 
  45 
  46 /* Cryptographic Mechanisms */


 180 #define CRYPTO_CAN_SHARE_OPSTATE        0x00000004 /* supports sharing */
 181 
 182 
 183 /* Mechanisms supported out-of-the-box */
 184 #define SUN_CKM_MD4                     "CKM_MD4"
 185 #define SUN_CKM_MD5                     "CKM_MD5"
 186 #define SUN_CKM_MD5_HMAC                "CKM_MD5_HMAC"
 187 #define SUN_CKM_MD5_HMAC_GENERAL        "CKM_MD5_HMAC_GENERAL"
 188 #define SUN_CKM_SHA1                    "CKM_SHA_1"
 189 #define SUN_CKM_SHA1_HMAC               "CKM_SHA_1_HMAC"
 190 #define SUN_CKM_SHA1_HMAC_GENERAL       "CKM_SHA_1_HMAC_GENERAL"
 191 #define SUN_CKM_SHA256                  "CKM_SHA256"
 192 #define SUN_CKM_SHA256_HMAC             "CKM_SHA256_HMAC"
 193 #define SUN_CKM_SHA256_HMAC_GENERAL     "CKM_SHA256_HMAC_GENERAL"
 194 #define SUN_CKM_SHA384                  "CKM_SHA384"
 195 #define SUN_CKM_SHA384_HMAC             "CKM_SHA384_HMAC"
 196 #define SUN_CKM_SHA384_HMAC_GENERAL     "CKM_SHA384_HMAC_GENERAL"
 197 #define SUN_CKM_SHA512                  "CKM_SHA512"
 198 #define SUN_CKM_SHA512_HMAC             "CKM_SHA512_HMAC"
 199 #define SUN_CKM_SHA512_HMAC_GENERAL     "CKM_SHA512_HMAC_GENERAL"
 200 #define SUN_CKM_SHA512_224              "CKM_SHA512_224"
 201 #define SUN_CKM_SHA512_256              "CKM_SHA512_256"
 202 #define SUN_CKM_DES_CBC                 "CKM_DES_CBC"
 203 #define SUN_CKM_DES3_CBC                "CKM_DES3_CBC"
 204 #define SUN_CKM_DES_ECB                 "CKM_DES_ECB"
 205 #define SUN_CKM_DES3_ECB                "CKM_DES3_ECB"
 206 #define SUN_CKM_BLOWFISH_CBC            "CKM_BLOWFISH_CBC"
 207 #define SUN_CKM_BLOWFISH_ECB            "CKM_BLOWFISH_ECB"
 208 #define SUN_CKM_AES_CBC                 "CKM_AES_CBC"
 209 #define SUN_CKM_AES_ECB                 "CKM_AES_ECB"
 210 #define SUN_CKM_AES_CTR                 "CKM_AES_CTR"
 211 #define SUN_CKM_AES_CCM                 "CKM_AES_CCM"
 212 #define SUN_CKM_AES_GCM                 "CKM_AES_GCM"
 213 #define SUN_CKM_AES_GMAC                "CKM_AES_GMAC"
 214 #define SUN_CKM_AES_CFB128              "CKM_AES_CFB128"
 215 #define SUN_CKM_RC4                     "CKM_RC4"
 216 #define SUN_CKM_RSA_PKCS                "CKM_RSA_PKCS"
 217 #define SUN_CKM_RSA_X_509               "CKM_RSA_X_509"
 218 #define SUN_CKM_MD5_RSA_PKCS            "CKM_MD5_RSA_PKCS"
 219 #define SUN_CKM_SHA1_RSA_PKCS           "CKM_SHA1_RSA_PKCS"
 220 #define SUN_CKM_SHA256_RSA_PKCS         "CKM_SHA256_RSA_PKCS"
 221 #define SUN_CKM_SHA384_RSA_PKCS         "CKM_SHA384_RSA_PKCS"