Print this page
6189743 Need an ARCFOUR implementation optimized for AMD64

*** 17,34 **** * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* ! * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _SYS_CRYPTO_COMMON_H #define _SYS_CRYPTO_COMMON_H ! #pragma ident "@(#)common.h 1.24 07/12/10 SMI" /* * Header file for the common data structures of the cryptographic framework */ --- 17,34 ---- * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* ! * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _SYS_CRYPTO_COMMON_H #define _SYS_CRYPTO_COMMON_H ! #pragma ident "@(#)common.h 1.25 08/01/02 SMI" /* * Header file for the common data structures of the cryptographic framework */
*** 183,199 **** #define SUN_CKM_ECDH1_DERIVE "CKM_ECDH1_DERIVE" #define SUN_CKM_ECDSA_SHA1 "CKM_ECDSA_SHA1" #define SUN_CKM_ECDSA "CKM_ECDSA" /* Shared operation context format for CKM_RC4 */ typedef struct { ! uchar_t arr[256]; ! uchar_t i, j; uint64_t pad; /* For 64-bit alignment */ } arcfour_state_t; - /* Data arguments of cryptographic operations */ typedef enum crypto_data_format { CRYPTO_DATA_RAW = 1, CRYPTO_DATA_UIO, --- 183,204 ---- #define SUN_CKM_ECDH1_DERIVE "CKM_ECDH1_DERIVE" #define SUN_CKM_ECDSA_SHA1 "CKM_ECDSA_SHA1" #define SUN_CKM_ECDSA "CKM_ECDSA" /* Shared operation context format for CKM_RC4 */ + #if defined(__amd64) + typedef uint64_t arcfour_key_int_t; + #else + typedef uchar_t arcfour_key_int_t; + #endif /* __amd64 */ + typedef struct { ! arcfour_key_int_t arr[256]; ! arcfour_key_int_t i, j; uint64_t pad; /* For 64-bit alignment */ } arcfour_state_t; /* Data arguments of cryptographic operations */ typedef enum crypto_data_format { CRYPTO_DATA_RAW = 1, CRYPTO_DATA_UIO,