cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Macros | Enumerations
consts.h File Reference

Go to the source code of this file.

Macros

#define MAX_INTLENGTH_DELTA   1048576
 
#define MAX_INTLENGTH   ( INT_MAX - MAX_INTLENGTH_DELTA )
 
#define MAX_INTLENGTH_SHORT   16384
 
#define KEYID_SIZE   20
 
#define PGP_KEYID_SIZE   8
 
#define MIN_PRIVATE_KEYSIZE   18 /* For DLP keys */
 
#define MAX_PRIVATE_KEYSIZE   ( ( CRYPT_MAX_PKCSIZE * 8 ) + 256 )
 
#define MIN_KEYSIZE   bitsToBytes( 64 )
 
#define MAX_WORKING_KEYSIZE   bitsToBytes( 256 )
 
#define MIN_PKCSIZE   ( bitsToBytes( 1024 ) - 1 )
 
#define MIN_PKCSIZE_ECC   ( bitsToBytes( 192 ) - 1 )
 
#define MIN_PKCSIZE_THRESHOLD   ( bitsToBytes( 504 ) )
 
#define MIN_PKCSIZE_ECC_THRESHOLD   ( bitsToBytes( 120 ) )
 
#define MIN_PKCSIZE_ECCPOINT   ( 1 + ( MIN_PKCSIZE_ECC * 2 ) )
 
#define MIN_PKCSIZE_ECCPOINT_THRESHOLD   ( 1 + ( MIN_PKCSIZE_ECC_THRESHOLD * 2 ) )
 
#define MAX_PKCSIZE_ECCPOINT   ( 1 + ( CRYPT_MAX_PKCSIZE_ECC * 2 ) )
 
#define MAX_PKCENCRYPTED_SIZE   CRYPT_MAX_PKCSIZE
 
#define MAX_PKC_OBJECTSIZE   ( CRYPT_MAX_PKCSIZE * 2 )
 
#define MIN_CRYPT_OBJECTSIZE   64
 
#define MIN_CERTSIZE   256
 
#define MAX_ATTRIBUTE_SIZE   1024
 
#define MIN_BUFFER_SIZE   8192
 
#define MIN_NAME_LENGTH   2
 
#define MIN_TIME_VALUE   ( ( 2007 - 1970 ) * 365 * 86400L )
 
#define CURRENT_TIME_VALUE   ( ( 2009 - 1970 ) * 365 * 86400L )
 
#define MIN_STORED_TIME_VALUE   ( ( 1995 - 1970 ) * 365 * 86400L )
 
#define MIN_PORT_NUMBER   21
 
#define MAX_PORT_NUMBER   49151L
 
#define MAX_ERRMSG_SIZE   512
 
#define MAX_KEYSETUP_ITERATIONS   20000
 
#define MAX_COMPLIANCE_LEVEL   CRYPT_COMPLIANCELEVEL_STANDARD
 
#define FAILSAFE_ITERATIONS_SMALL   10
 
#define FAILSAFE_ITERATIONS_MED   50
 
#define FAILSAFE_ITERATIONS_LARGE   1000
 
#define FAILSAFE_ITERATIONS_MAX   100000
 
#define FAILSAFE_ARRAYSIZE(array, elementType)   ( ( sizeof( array ) / sizeof( elementType ) ) - 1 )
 
#define MIN_DNS_SIZE   4 /* x.com */
 
#define MAX_DNS_SIZE   255 /* Max hostname size */
 
#define MIN_RFC822_SIZE   7 /* [email protected] */
 
#define MAX_RFC822_SIZE   255
 
#define MIN_URL_SIZE   12 /* http://x.com */
 
#define MAX_URL_SIZE   MAX_DNS_SIZE
 
#define HMAC_IPAD   0x36
 
#define HMAC_OPAD   0x5C
 
#define CRYPT_ERROR   -1
 
#define DUMMY_INIT   0
 
#define DUMMY_INIT_PTR   NULL
 
#define DUMMY_INIT_STRUCT   { 0 }
 
#define OK_SPECIAL   ( -4321 )
 
#define CRYPT_ARGERROR_OBJECT   ( -1000 ) /* Error in object being sent msg.*/
 
#define CRYPT_ARGERROR_VALUE   ( -1001 ) /* Error in message value */
 
#define CRYPT_ARGERROR_STR1   ( -1002 ) /* Error in first string arg */
 
#define CRYPT_ARGERROR_STR2   ( -1003 ) /* Error in second string arg */
 
#define CRYPT_ARGERROR_NUM1   ( -1004 ) /* Error in first numeric arg */
 
#define CRYPT_ARGERROR_NUM2   ( -1005 ) /* Error in second numeric arg */
 
#define cryptArgError(status)   ( ( status ) >= CRYPT_ARGERROR_NUM2 && ( status ) <= CRYPT_ARGERROR_OBJECT )
 
#define cryptStandardError(status)   ( ( status ) >= CRYPT_ENVELOPE_RESOURCE && ( status ) <= CRYPT_OK )
 
#define KEYUSAGE_SIGN
 
#define KEYUSAGE_CA
 
#define KEYUSAGE_CRYPT   ( CRYPT_KEYUSAGE_KEYENCIPHERMENT )
 
#define KEYUSAGE_KEYAGREEMENT
 

Enumerations

enum  KEYFORMAT_TYPE {
  KEYFORMAT_NONE, KEYFORMAT_CERT, KEYFORMAT_SSH, KEYFORMAT_SSH1,
  KEYFORMAT_SSL, KEYFORMAT_PGP, KEYFORMAT_PRIVATE, KEYFORMAT_PRIVATE_OLD,
  KEYFORMAT_LAST
}
 
enum  MANAGEMENT_ACTION_TYPE {
  MANAGEMENT_ACTION_NONE, MANAGEMENT_ACTION_PRE_INIT, MANAGEMENT_ACTION_INIT, MANAGEMENT_ACTION_PRE_SHUTDOWN,
  MANAGEMENT_ACTION_SHUTDOWN, MANAGEMENT_ACTION_LAST
}
 

Macro Definition Documentation

#define CRYPT_ARGERROR_NUM1   ( -1004 ) /* Error in first numeric arg */

Definition at line 306 of file consts.h.

#define CRYPT_ARGERROR_NUM2   ( -1005 ) /* Error in second numeric arg */

Definition at line 307 of file consts.h.

#define CRYPT_ARGERROR_OBJECT   ( -1000 ) /* Error in object being sent msg.*/

Definition at line 302 of file consts.h.

#define CRYPT_ARGERROR_STR1   ( -1002 ) /* Error in first string arg */

Definition at line 304 of file consts.h.

#define CRYPT_ARGERROR_STR2   ( -1003 ) /* Error in second string arg */

Definition at line 305 of file consts.h.

#define CRYPT_ARGERROR_VALUE   ( -1001 ) /* Error in message value */

Definition at line 303 of file consts.h.

#define CRYPT_ERROR   -1

Definition at line 268 of file consts.h.

#define cryptArgError (   status)    ( ( status ) >= CRYPT_ARGERROR_NUM2 && ( status ) <= CRYPT_ARGERROR_OBJECT )

Definition at line 309 of file consts.h.

#define cryptStandardError (   status)    ( ( status ) >= CRYPT_ENVELOPE_RESOURCE && ( status ) <= CRYPT_OK )

Definition at line 311 of file consts.h.

#define CURRENT_TIME_VALUE   ( ( 2009 - 1970 ) * 365 * 86400L )

Definition at line 158 of file consts.h.

#define DUMMY_INIT   0

Definition at line 278 of file consts.h.

#define DUMMY_INIT_PTR   NULL

Definition at line 279 of file consts.h.

#define DUMMY_INIT_STRUCT   { 0 }

Definition at line 280 of file consts.h.

#define FAILSAFE_ARRAYSIZE (   array,
  elementType 
)    ( ( sizeof( array ) / sizeof( elementType ) ) - 1 )

Definition at line 244 of file consts.h.

#define FAILSAFE_ITERATIONS_LARGE   1000

Definition at line 232 of file consts.h.

#define FAILSAFE_ITERATIONS_MAX   100000

Definition at line 236 of file consts.h.

#define FAILSAFE_ITERATIONS_MED   50

Definition at line 231 of file consts.h.

#define FAILSAFE_ITERATIONS_SMALL   10

Definition at line 230 of file consts.h.

#define HMAC_IPAD   0x36

Definition at line 263 of file consts.h.

#define HMAC_OPAD   0x5C

Definition at line 264 of file consts.h.

#define KEYID_SIZE   20

Definition at line 31 of file consts.h.

#define KEYUSAGE_CA
Value:
CRYPT_KEYUSAGE_CRLSIGN )

Definition at line 349 of file consts.h.

#define KEYUSAGE_CRYPT   ( CRYPT_KEYUSAGE_KEYENCIPHERMENT )

Definition at line 351 of file consts.h.

#define KEYUSAGE_KEYAGREEMENT
Value:
CRYPT_KEYUSAGE_ENCIPHERONLY | \
CRYPT_KEYUSAGE_DECIPHERONLY )

Definition at line 352 of file consts.h.

#define KEYUSAGE_SIGN
Value:
CRYPT_KEYUSAGE_NONREPUDIATION )

Definition at line 347 of file consts.h.

#define MAX_ATTRIBUTE_SIZE   1024

Definition at line 129 of file consts.h.

#define MAX_COMPLIANCE_LEVEL   CRYPT_COMPLIANCELEVEL_STANDARD

Definition at line 191 of file consts.h.

#define MAX_DNS_SIZE   255 /* Max hostname size */

Definition at line 251 of file consts.h.

#define MAX_ERRMSG_SIZE   512

Definition at line 176 of file consts.h.

#define MAX_INTLENGTH   ( INT_MAX - MAX_INTLENGTH_DELTA )

Definition at line 25 of file consts.h.

#define MAX_INTLENGTH_DELTA   1048576

Definition at line 23 of file consts.h.

#define MAX_INTLENGTH_SHORT   16384

Definition at line 26 of file consts.h.

#define MAX_KEYSETUP_ITERATIONS   20000

Definition at line 182 of file consts.h.

#define MAX_PKC_OBJECTSIZE   ( CRYPT_MAX_PKCSIZE * 2 )

Definition at line 106 of file consts.h.

#define MAX_PKCENCRYPTED_SIZE   CRYPT_MAX_PKCSIZE

Definition at line 97 of file consts.h.

#define MAX_PKCSIZE_ECCPOINT   ( 1 + ( CRYPT_MAX_PKCSIZE_ECC * 2 ) )

Definition at line 88 of file consts.h.

#define MAX_PORT_NUMBER   49151L

Definition at line 170 of file consts.h.

#define MAX_PRIVATE_KEYSIZE   ( ( CRYPT_MAX_PKCSIZE * 8 ) + 256 )

Definition at line 41 of file consts.h.

#define MAX_RFC822_SIZE   255

Definition at line 253 of file consts.h.

#define MAX_URL_SIZE   MAX_DNS_SIZE

Definition at line 255 of file consts.h.

#define MAX_WORKING_KEYSIZE   bitsToBytes( 256 )

Definition at line 57 of file consts.h.

#define MIN_BUFFER_SIZE   8192

Definition at line 135 of file consts.h.

#define MIN_CERTSIZE   256

Definition at line 122 of file consts.h.

#define MIN_CRYPT_OBJECTSIZE   64

Definition at line 115 of file consts.h.

#define MIN_DNS_SIZE   4 /* x.com */

Definition at line 250 of file consts.h.

#define MIN_KEYSIZE   bitsToBytes( 64 )

Definition at line 56 of file consts.h.

#define MIN_NAME_LENGTH   2

Definition at line 146 of file consts.h.

#define MIN_PKCSIZE   ( bitsToBytes( 1024 ) - 1 )

Definition at line 65 of file consts.h.

#define MIN_PKCSIZE_ECC   ( bitsToBytes( 192 ) - 1 )

Definition at line 66 of file consts.h.

#define MIN_PKCSIZE_ECC_THRESHOLD   ( bitsToBytes( 120 ) )

Definition at line 79 of file consts.h.

#define MIN_PKCSIZE_ECCPOINT   ( 1 + ( MIN_PKCSIZE_ECC * 2 ) )

Definition at line 85 of file consts.h.

#define MIN_PKCSIZE_ECCPOINT_THRESHOLD   ( 1 + ( MIN_PKCSIZE_ECC_THRESHOLD * 2 ) )

Definition at line 86 of file consts.h.

#define MIN_PKCSIZE_THRESHOLD   ( bitsToBytes( 504 ) )

Definition at line 78 of file consts.h.

#define MIN_PORT_NUMBER   21

Definition at line 169 of file consts.h.

#define MIN_PRIVATE_KEYSIZE   18 /* For DLP keys */

Definition at line 40 of file consts.h.

#define MIN_RFC822_SIZE   7 /* [email protected] */

Definition at line 252 of file consts.h.

#define MIN_STORED_TIME_VALUE   ( ( 1995 - 1970 ) * 365 * 86400L )

Definition at line 159 of file consts.h.

#define MIN_TIME_VALUE   ( ( 2007 - 1970 ) * 365 * 86400L )

Definition at line 157 of file consts.h.

#define MIN_URL_SIZE   12 /* http://x.com */

Definition at line 254 of file consts.h.

#define OK_SPECIAL   ( -4321 )

Definition at line 290 of file consts.h.

#define PGP_KEYID_SIZE   8

Definition at line 32 of file consts.h.

Enumeration Type Documentation

Enumerator:
KEYFORMAT_NONE 
KEYFORMAT_CERT 
KEYFORMAT_SSH 
KEYFORMAT_SSH1 
KEYFORMAT_SSL 
KEYFORMAT_PGP 
KEYFORMAT_PRIVATE 
KEYFORMAT_PRIVATE_OLD 
KEYFORMAT_LAST 

Definition at line 316 of file consts.h.

Enumerator:
MANAGEMENT_ACTION_NONE 
MANAGEMENT_ACTION_PRE_INIT 
MANAGEMENT_ACTION_INIT 
MANAGEMENT_ACTION_PRE_SHUTDOWN 
MANAGEMENT_ACTION_SHUTDOWN 
MANAGEMENT_ACTION_LAST 

Definition at line 334 of file consts.h.