Print this page
6652716 Need an ARCFOUR implementation optimized for Intel EM64T

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/crypto/common.h
          +++ new/usr/src/uts/common/sys/crypto/common.h
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26   26  #ifndef _SYS_CRYPTO_COMMON_H
  27   27  #define _SYS_CRYPTO_COMMON_H
  28   28  
  29      -#pragma ident   "@(#)common.h   1.26    08/01/04 SMI"
       29 +#pragma ident   "@(#)common.h   1.27    08/03/20 SMI"
  30   30  
  31   31  /*
  32   32   * Header file for the common data structures of the cryptographic framework
  33   33   */
  34   34  
  35   35  #ifdef __cplusplus
  36   36  extern "C" {
  37   37  #endif
  38   38  
  39   39  #include <sys/types.h>
↓ open down ↓ 140 lines elided ↑ open up ↑
 180  180  #define SUN_CKM_SHA1_RSA_PKCS           "CKM_SHA1_RSA_PKCS"
 181  181  #define SUN_CKM_SHA256_RSA_PKCS         "CKM_SHA256_RSA_PKCS"
 182  182  #define SUN_CKM_SHA384_RSA_PKCS         "CKM_SHA384_RSA_PKCS"
 183  183  #define SUN_CKM_SHA512_RSA_PKCS         "CKM_SHA512_RSA_PKCS"
 184  184  #define SUN_CKM_EC_KEY_PAIR_GEN         "CKM_EC_KEY_PAIR_GEN"
 185  185  #define SUN_CKM_ECDH1_DERIVE            "CKM_ECDH1_DERIVE"
 186  186  #define SUN_CKM_ECDSA_SHA1              "CKM_ECDSA_SHA1"
 187  187  #define SUN_CKM_ECDSA                   "CKM_ECDSA"
 188  188  
 189  189  /* Shared operation context format for CKM_RC4 */
      190 +typedef struct {
 190  191  #if defined(__amd64)
 191      -typedef uint64_t arcfour_key_int_t;
      192 +        uint32_t i, j;
      193 +        uint32_t arr[256];
 192  194  #else
 193      -typedef uchar_t arcfour_key_int_t;
      195 +        uchar_t arr[256];
      196 +        uchar_t i, j;
 194  197  #endif /* __amd64 */
 195      -
 196      -typedef struct {
 197      -        arcfour_key_int_t arr[256];
 198      -        arcfour_key_int_t i, j;
 199  198          uint64_t pad;           /* For 64-bit alignment */
 200  199  } arcfour_state_t;
 201  200  
 202  201  /* Data arguments of cryptographic operations */
 203  202  
 204  203  typedef enum crypto_data_format {
 205  204          CRYPTO_DATA_RAW = 1,
 206  205          CRYPTO_DATA_UIO,
 207  206          CRYPTO_DATA_MBLK
 208  207  } crypto_data_format_t;
↓ open down ↓ 321 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX