Print this page
Raise max RSA keysize (WIP)


  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 #ifndef _DH_IMPL_H
  27 #define _DH_IMPL_H
  28 
  29 #ifdef __cplusplus
  30 extern "C" {
  31 #endif
  32 
  33 #include <sys/types.h>
  34 #include <bignum.h>
  35 
  36 #define MIN_DH_KEYLENGTH_IN_BYTES       8
  37 #define MAX_DH_KEYLENGTH_IN_BYTES       512
  38 #define DH_MIN_KEY_LEN          64
  39 #define DH_MAX_KEY_LEN          4096
  40 
  41 #ifdef _KERNEL
  42 
  43 #include <sys/sunddi.h>
  44 #include <sys/crypto/common.h>
  45 
  46 #define CK_RV                   ulong_t
  47 
  48 #define CKR_OK                  CRYPTO_SUCCESS
  49 #define CKR_ARGUMENTS_BAD       CRYPTO_ARGUMENTS_BAD
  50 #define CKR_ATTRIBUTE_TYPE_INVALID      CRYPTO_ATTRIBUTE_TYPE_INVALID
  51 #define CKR_ATTRIBUTE_VALUE_INVALID     CRYPTO_ATTRIBUTE_VALUE_INVALID
  52 #define CKR_DEVICE_ERROR        CRYPTO_DEVICE_ERROR
  53 #define CKR_GENERAL_ERROR       CRYPTO_GENERAL_ERROR
  54 #define CKR_HOST_MEMORY         CRYPTO_HOST_MEMORY
  55 #define CKR_KEY_SIZE_RANGE      CRYPTO_KEY_SIZE_RANGE
  56 
  57 int random_get_bytes(uint8_t *ran_out, size_t ran_len);
  58 int random_get_pseudo_bytes(uint8_t *ran_out, size_t ran_len);
  59 




  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 #ifndef _DH_IMPL_H
  27 #define _DH_IMPL_H
  28 
  29 #ifdef __cplusplus
  30 extern "C" {
  31 #endif
  32 
  33 #include <sys/types.h>
  34 #include <bignum.h>
  35 
  36 #define MIN_DH_KEYLENGTH_IN_BYTES       8
  37 #define MAX_DH_KEYLENGTH_IN_BYTES       2048
  38 #define DH_MIN_KEY_LEN          64
  39 #define DH_MAX_KEY_LEN          16384
  40 
  41 #ifdef _KERNEL
  42 
  43 #include <sys/sunddi.h>
  44 #include <sys/crypto/common.h>
  45 
  46 #define CK_RV                   ulong_t
  47 
  48 #define CKR_OK                  CRYPTO_SUCCESS
  49 #define CKR_ARGUMENTS_BAD       CRYPTO_ARGUMENTS_BAD
  50 #define CKR_ATTRIBUTE_TYPE_INVALID      CRYPTO_ATTRIBUTE_TYPE_INVALID
  51 #define CKR_ATTRIBUTE_VALUE_INVALID     CRYPTO_ATTRIBUTE_VALUE_INVALID
  52 #define CKR_DEVICE_ERROR        CRYPTO_DEVICE_ERROR
  53 #define CKR_GENERAL_ERROR       CRYPTO_GENERAL_ERROR
  54 #define CKR_HOST_MEMORY         CRYPTO_HOST_MEMORY
  55 #define CKR_KEY_SIZE_RANGE      CRYPTO_KEY_SIZE_RANGE
  56 
  57 int random_get_bytes(uint8_t *ran_out, size_t ran_len);
  58 int random_get_pseudo_bytes(uint8_t *ran_out, size_t ran_len);
  59