Print this page
4896 Performance improvements for KCF AES modes

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/des/des_crypt.c
          +++ new/usr/src/uts/common/des/des_crypt.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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  /*
  23   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
       26 +/*
       27 + * Copyright 2015 by Saso Kiselkov. All rights reserved.
       28 + */
  26   29  
  27   30  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  28   31  /*        All Rights Reserved   */
  29   32  
  30   33  /*
  31   34   * Portions of this source code were derived from Berkeley 4.3 BSD
  32   35   * under license from the Regents of the University of California.
  33   36   */
  34   37  
  35   38  /*
↓ open down ↓ 449 lines elided ↑ open up ↑
 485  488                  crypto_free_mode_ctx(des_ctx);
 486  489                  return (rv);
 487  490          }
 488  491  
 489  492          ctx->cc_provider_private = des_ctx;
 490  493  
 491  494          return (CRYPTO_SUCCESS);
 492  495  }
 493  496  
 494  497  static void
 495      -des_copy_block64(uint8_t *in, uint64_t *out)
      498 +des_copy_block64(const uint8_t *in, uint64_t *out)
 496  499  {
 497  500          if (IS_P2ALIGNED(in, sizeof (uint64_t))) {
 498  501                  /* LINTED: pointer alignment */
 499  502                  out[0] = *(uint64_t *)&in[0];
 500  503          } else {
 501  504                  uint64_t tmp64;
 502  505  
 503  506  #ifdef _BIG_ENDIAN
 504  507                  tmp64 = (((uint64_t)in[0] << 56) |
 505  508                      ((uint64_t)in[1] << 48) |
↓ open down ↓ 655 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX