Print this page
4896 Performance improvements for KCF AES modes

Split Close
Expand all
Collapse all
          --- old/usr/src/common/crypto/des/des_impl.h
          +++ new/usr/src/common/crypto/des/des_impl.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
       25 +/*
       26 + * Copyright 2015 by Saso Kiselkov. All rights reserved.
       27 + */
  25   28  
  26   29  #ifndef _DES_IMPL_H
  27   30  #define _DES_IMPL_H
  28   31  
  29   32  /*
  30   33   * Common definitions used by DES
  31   34   */
  32   35  
  33   36  #ifdef  __cplusplus
  34   37  extern "C" {
↓ open down ↓ 55 lines elided ↑ open up ↑
  90   93  extern uint64_t des_crypt_impl(uint64_t *, uint64_t, int);
  91   94  extern void des_ks(uint64_t *, uint64_t);
  92   95  extern int des_crunch_block(const void *, const uint8_t *, uint8_t *,
  93   96      boolean_t);
  94   97  extern int des3_crunch_block(const void *, const uint8_t *, uint8_t *,
  95   98      boolean_t);
  96   99  extern void des_init_keysched(uint8_t *, des_strength_t, void *);
  97  100  extern void *des_alloc_keysched(size_t *, des_strength_t, int);
  98  101  extern boolean_t des_keycheck(uint8_t *, des_strength_t, uint8_t *);
  99  102  extern void des_parity_fix(uint8_t *, des_strength_t, uint8_t *);
 100      -extern void des_copy_block(uint8_t *, uint8_t *);
 101      -extern void des_xor_block(uint8_t *, uint8_t *);
      103 +extern void des_copy_block(const uint8_t *, uint8_t *);
      104 +extern void des_xor_block(const uint8_t *, uint8_t *);
 102  105  extern int des_encrypt_block(const void *, const uint8_t *, uint8_t *);
 103  106  extern int des3_encrypt_block(const void *, const uint8_t *, uint8_t *);
 104  107  extern int des_decrypt_block(const void *, const uint8_t *, uint8_t *);
 105  108  extern int des3_decrypt_block(const void *, const uint8_t *, uint8_t *);
 106  109  
 107  110  #ifdef _DES_IMPL
 108  111  
 109  112  #ifdef _KERNEL
 110  113  typedef enum des_mech_type {
 111  114          DES_ECB_MECH_INFO_TYPE,         /* SUN_CKM_DES_ECB */
↓ open down ↓ 15 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX