Print this page
4896 Performance improvements for KCF AES modes

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/crypto/io/blowfish.c
          +++ new/usr/src/uts/common/crypto/io/blowfish.c
↓ 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 2010 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  /*
  27   30   * Blowfish provider for the Kernel Cryptographic Framework (KCF)
  28   31   */
  29   32  
  30   33  #include <sys/types.h>
  31   34  #include <sys/systm.h>
  32   35  #include <sys/modctl.h>
  33   36  #include <sys/cmn_err.h>
  34   37  #include <sys/ddi.h>
↓ open down ↓ 277 lines elided ↑ open up ↑
 312  315                  crypto_free_mode_ctx(blowfish_ctx);
 313  316                  return (rv);
 314  317          }
 315  318  
 316  319          ctx->cc_provider_private = blowfish_ctx;
 317  320  
 318  321          return (CRYPTO_SUCCESS);
 319  322  }
 320  323  
 321  324  static void
 322      -blowfish_copy_block64(uint8_t *in, uint64_t *out)
      325 +blowfish_copy_block64(const uint8_t *in, uint64_t *out)
 323  326  {
 324  327          if (IS_P2ALIGNED(in, sizeof (uint64_t))) {
 325  328                  /* LINTED: pointer alignment */
 326  329                  out[0] = *(uint64_t *)&in[0];
 327  330          } else {
 328  331                  uint8_t *iv8 = (uint8_t *)&out[0];
 329  332  
 330  333                  BLOWFISH_COPY_BLOCK(in, iv8);
 331  334          }
 332  335  }
↓ open down ↓ 538 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX