RSA BSAFE Crypto-C

Cryptographic Components for C

Search

bsafe.h

Go to the documentation of this file.
00001 /* $Id: bsafe.h,v 1.71 2004/12/09 07:05:42 sparki Exp $ */
00002 /*
00003  * Copyright (C) 1998-2004 RSA Security Inc. All rights reserved. 
00004  *
00005  * This work contains proprietary information of RSA Security. 
00006  * Distribution is limited to authorized licensees of RSA 
00007  * Security. Any unauthorized reproduction, distribution or 
00008  * modification of this work is strictly prohibited.
00009  */
00010 
00016 #ifndef _BSAFE_H_
00017 #define _BSAFE_H_ 1
00018 
00019 #include "bsfmacro.h"
00020 #include "bsfplatf.h"
00021 
00022 #include "aglobal.h"
00023 #include "atypes.h"
00024 #include "bexterr.h"
00025 
00026 
00027 #define RSA_STD_ALLOC_FUNCS  RSA_ENABLED
00028 #define RSA_STD_MEM_FUNCS    RSA_ENABLED
00029 #define RSA_STD_STRING_FUNCS RSA_ENABLED
00030 #ifndef RSA_STD_TIME_FUNCS
00031 #define RSA_STD_TIME_FUNCS   RSA_ENABLED
00032 #endif
00033 #include "stdlibrf.h"
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00050 #define BE_ALGORITHM_ALREADY_SET 0x0200
00051 
00055 #define BE_ALGORITHM_INFO 0x0201
00056 
00060 #define BE_ALGORITHM_NOT_INITIALIZED 0x0202
00061 
00065 #define BE_ALGORITHM_NOT_SET 0x0203
00066 
00069 #define BE_ALGORITHM_OBJ 0x0204
00070 
00073 #define BE_ALG_OPERATION_UNKNOWN 0x0205
00074 
00077 #define BE_ALLOC 0x0206
00078 
00081 #define BE_CANCEL 0x0207
00082 
00085 #define BE_DATA 0x0208
00086 
00090 #define BE_EXPONENT_EVEN 0x0209
00091 
00095 #define BE_EXPONENT_LEN 0x020a
00096 
00099 #define BE_HARDWARE 0x020b
00100 
00103 #define BE_INPUT_DATA 0x020c
00104 
00107 #define BE_INPUT_LEN 0x020d
00108 
00112 #define BE_KEY_ALREADY_SET 0x020e
00113 
00116 #define BE_KEY_INFO 0x020f
00117 
00120 #define BE_KEY_LEN 0x0210
00121 
00125 #define BE_KEY_NOT_SET 0x0211
00126 
00129 #define BE_KEY_OBJ 0x0212
00130 
00133 #define BE_KEY_OPERATION_UNKNOWN 0x0213
00134 
00137 #define BE_MEMORY_OBJ 0x0214
00138 
00141 #define BE_MODULUS_LEN 0x0215
00142 
00145 #define BE_NOT_INITIALIZED 0x0216
00146 
00150 #define BE_NOT_SUPPORTED 0x0217
00151 
00155 #define BE_OUTPUT_LEN 0x0218
00156 
00159 #define BE_OVER_32K 0x0219
00160 
00164 #define BE_RANDOM_NOT_INITIALIZED 0x021a
00165 
00168 #define BE_RANDOM_OBJ 0x021b
00169 
00172 #define BE_SIGNATURE 0x021c
00173 
00176 #define BE_WRONG_ALGORITHM_INFO 0x021d
00177 
00180 #define BE_WRONG_KEY_INFO 0x021e
00181 
00185 #define BE_INPUT_COUNT 0x021f
00186 
00190 #define BE_OUTPUT_COUNT 0x0220
00191 
00195 #define BE_METHOD_NOT_IN_CHOOSER 0x221
00196 
00199 #define BE_KEY_WEAK 0x222
00200 
00203 #define BE_EXPONENT_ONE 0x0223
00204 
00207 #define BE_BAD_POINTER 0x0224
00208 
00211 #define BE_BAD_PASSPHRASE 0x0225
00212 
00216 #define BE_AM_DOMESTIC_ONLY 0x226
00217 
00220 #define BE_BAD_SEEDING 0x227
00221 
00225 #define BE_BER_HAS_NO_OID 0x228
00226 
00230 #define BE_BER_OID_NOT_IN_LIST 0x229
00231 
00236 #define BE_BER_FIELDS_TOO_LONG 0x22a
00237 #define BE_FIPS_INTEGRITY_CHECK 0x22b
00238 #define BE_FIPS_SELF_TEST 0x22c
00239 #define BE_FIPS_NOT_INITIALIZED 0x22d
00240 #define BE_METHOD_NOT_FIPS 0x22e
00241 
00242 
00246 #define BE_HASH_DF_BAD_REQUEST 0x22f
00247 
00250 #define BE_EC_RAND_CURVE       0x230 
00251 
00255 #define BE_RAND_ENTROPY       0x231 
00256 
00262 #define BE_RAND_RESEED        0x232 
00263 
00269 #define BE_RAND_NOSELFTEST    0x233 
00270 
00275 #define BE_RAND_SELFTEST_FAILED 0x234
00276 
00281 /* Algorithm Flags for B_DecodeAlgorithmBER
00282 */
00283 #define BSAFE_AI_AES128_CBCPadBER             1
00284 #define BSAFE_AI_AES192_CBCPadBER             2
00285 #define BSAFE_AI_AES256_CBCPadBER             3
00286 #define BSAFE_AI_AES128_ECB_BER               4
00287 #define BSAFE_AI_AES192_ECB_BER               5
00288 #define BSAFE_AI_AES256_ECB_BER               6
00289 #define BSAFE_AI_AES128_CFB_BER               7
00290 #define BSAFE_AI_AES192_CFB_BER               8
00291 #define BSAFE_AI_AES256_CFB_BER               9
00292 #define BSAFE_AI_DES_CBCPadBER                10
00293 #define BSAFE_AI_DES_EDE3_CBCPadBER           11
00294 #define BSAFE_AI_DESX_CBCPadBER               12
00295 #define BSAFE_AI_DHKeyAgreeBER                13
00296 #define BSAFE_AI_DSAWithSHA1_BER              14
00297 #define BSAFE_AI_MD2_BER                      15
00298 #define BSAFE_AI_MD2WithDES_CBCPadBER         16
00299 #define BSAFE_AI_MD2WithRC2_CBCPadBER         17
00300 #define BSAFE_AI_MD2WithRSAEncryptionBER      18
00301 #define BSAFE_AI_MD5_BER                      19
00302 #define BSAFE_AI_MD5WithDES_CBCPadBER         20
00303 #define BSAFE_AI_MD5WithRC2_CBCPadBER         21
00304 #define BSAFE_AI_MD5WithRSAEncryptionBER      22
00305 #define BSAFE_AI_MD5WithXOR_BER               23
00306 #define BSAFE_AI_PKCS5_V2_PBE_BER             43
00307 #define BSAFE_AI_PKCS5_V2_PBMAC_BER           44
00308 #define BSAFE_AI_PKCS_OAEP_RSAPrivateBER      24
00309 #define BSAFE_AI_PKCS_OAEP_RSAMaskFuncBER     25
00310 #define BSAFE_AI_PKCS_OAEP_RSAPSrcFuncBER     26
00311 #define BSAFE_AI_PKCS_OAEP_RSAPublicBER       27
00312 #define BSAFE_AI_PKCS_OAEP_RSARecodeBER       28
00313 #define BSAFE_AI_PKCS_RSAPubOrPrivateBER      29
00314 #define BSAFE_AI_RC2_CBCPadBER                30
00315 #define BSAFE_AI_RC4_BER                      31
00316 #define BSAFE_AI_RC4WithMAC_BER               32
00317 #define BSAFE_AI_RC5_CBCPadBER                33
00318 #define BSAFE_AI_HMAC_BER                     45
00319 #define BSAFE_AI_SHA1_BER                     34
00320 #define BSAFE_AI_SHA256_BER                   51
00321 #define BSAFE_AI_SHA384_BER                   52
00322 #define BSAFE_AI_SHA512_BER                   53
00323 #define BSAFE_AI_SHA1WithDES_CBCPadBER        35
00324 #define BSAFE_AI_SHA1WithRSAEncryptionBER     36
00325 #define BSAFE_AI_SHA256WithRSAEncryptionBER   48
00326 #define BSAFE_AI_SHA384WithRSAEncryptionBER   49
00327 #define BSAFE_AI_SHA512WithRSAEncryptionBER   50
00328 #define BSAFE_AI_PKCS_RSA_PSS_BER             46
00329 #define BSAFE_KI_DSAPrivateBER                37
00330 #define BSAFE_KI_DSAPrivateX957BER            38
00331 #define BSAFE_KI_DSAPublicBER                 39
00332 #define BSAFE_KI_DSAPublicX957BER             40
00333 #define BSAFE_KI_PKCS_RSAPrivateBER           41
00334 #define BSAFE_KI_RSAPublicBER                 42
00335 #define BSAFE_KI_RSAPublicOAEP_BER            47
00336 
00337 typedef POINTER B_KEY_OBJ;
00338 typedef POINTER B_ALGORITHM_OBJ;
00339 
00340 typedef int (RSA_CALLING_CONV *B_INFO_TYPE) PROTO_LIST ((POINTER *));
00341 
00342 #ifndef _BUILD_LIBRARY_
00343 typedef char B_ALGORITHM_METHOD;
00344 typedef B_ALGORITHM_METHOD **B_ALGORITHM_CHOOSER;
00345 #endif
00346 
00347 #ifndef _BUILD_LIBRARY_
00348 typedef char B_EXT_ALGORITHM_METHOD;
00349 #else
00350 typedef struct B_ExtendedMethod B_EXT_ALGORITHM_METHOD;
00351 #endif
00352 
00353 #ifndef _BUILD_LIBRARY_
00354 typedef char B_KEY_METHOD;
00355 typedef B_KEY_METHOD **B_KEY_CHOOSER;
00356 #endif
00357 
00358 #ifndef _HW_TABLE_ENTRY_DEFINITION_
00359 typedef char HW_TABLE_ENTRY;
00360 typedef HW_TABLE_ENTRY **HW_TABLE_LIST;
00361 #endif
00362 extern HW_TABLE_ENTRY HW_INTEL_RANDOM;
00363 
00364 /* Version information.
00365  */
00366 extern char * RSA_CALLING_CONV BSAFE_VERSION;
00367 
00368 
00369 
00370 /* Information for BSAFE 1.x-compatible encryption algorithms.
00371  */
00372 #define B_BSAFE1_PAD 1
00373 #define B_BSAFE1_PAD_CHECKSUM 2
00374 #define B_BSAFE1_RAW 3
00375 
00377 typedef struct {
00378   int encryptionType;                /* Indicates the encryption type: B_BSAFE1_PAD, etc. */
00379 } B_BSAFE1_ENCRYPTION_PARAMS;
00380 
00382 typedef struct {
00383   unsigned char *key;                              /* A pointer to and eight-Byte key */
00384   unsigned int effectiveKeyBits;                   /* The effective key length */
00385 } B_RC2_BSAFE1_PARAMS_KEY;
00386 
00387 /* Information for password-based encryption (PBE) algorithms.
00388  */
00391 typedef struct {
00392   unsigned char *salt;                             /* The salt value */
00393   unsigned int iterationCount;                     /* The iteration count */
00394 } B_PBE_PARAMS;
00395 
00398 typedef struct {
00399   ITEM salt;
00400   unsigned int iterationCount;
00401   unsigned int keyLenOctets;
00402   B_INFO_TYPE pseudoRandomFunction;
00403   POINTER prfParams;
00404   B_INFO_TYPE prfBER;
00405   B_INFO_TYPE encryptionAlgorithm;
00406   POINTER encAlgParams;
00407   B_INFO_TYPE encAlgBER;
00408 } B_PKCS5_V2_PBE_PARAMS;
00409 
00412 typedef struct {
00413   ITEM salt;
00414   unsigned int iterationCount;
00415   unsigned int keyLenOctets;
00416   B_INFO_TYPE pseudoRandomFunction;
00417   POINTER prfParams;
00418   B_INFO_TYPE prfBER;
00419   B_INFO_TYPE macAlgorithm;
00420   POINTER macAlgParams;
00421   B_INFO_TYPE macAlgBER;
00422 } B_PKCS5_V2_PBMAC_PARAMS;
00423 
00426 typedef struct {
00427   unsigned int effectiveKeyBits;                     /* The effective key length */
00428   unsigned char *salt;                               /* The salt value */
00429   unsigned int iterationCount;                       /* The iteration count */
00430 } B_RC2_PBE_PARAMS;
00431 
00432 typedef struct {
00433   B_INFO_TYPE cryptInfoType;
00434   ITEM *cryptParams;
00435   B_INFO_TYPE formatInfoType;
00436   ITEM *formatParams;
00437 } B_SEAL_OPEN_PARAMS;
00438 
00441 typedef struct {
00442   ITEM ivItem;
00443   unsigned int transferSize;
00444 } B_CFB_PARAMS;
00445 
00448 typedef struct {
00449   B_INFO_TYPE encryptAlgorithm;
00450   unsigned char *iv;
00451   int pemEncode;
00452 } B_SSLC_KEY_WRAP_PARAMS;
00453 
00454 /* Information used to specify a block cipher with feedback */
00455 
00457 typedef struct {
00458   unsigned char *encryptionMethodName;
00459   POINTER encryptionParams; /* Indicates the encryption parameters */
00460   unsigned char *feedbackMethodName;
00461   POINTER feedbackParams; /* A pointer to an ITEM for an Initialization Vector */
00462   unsigned char *paddingMethodName;
00463   POINTER paddingParams;
00464 } B_BLK_CIPHER_W_FEEDBACK_PARAMS;
00465 
00466 
00467 /* Information used to specify signing or verifying */
00469 typedef struct {
00470   unsigned char *encryptionMethodName;
00471   POINTER encryptionParams;     /* Most likely to be NULL */
00472   unsigned char *digestMethodName;
00473   POINTER digestParams;       /* Most likely to be NULL */
00474   unsigned char *formatMethodName;
00475   POINTER formatParams;
00476 } B_SIGN_VERIFY_PARAMS;
00477 
00478 
00479 /* Information used to specify key pair tokens at generation time */
00483 typedef struct {
00484   POINTER keyParameters;
00485   UINT4 privateKeyUsage;
00486   UINT4 publicKeyUsage;
00487   unsigned int protectFlag;
00488   unsigned long publicLifeTime;
00489   unsigned long privateLifeTime;
00490 } B_TOKEN_KEYPAIR_GEN_INFO;
00491 
00493 typedef struct {
00494   UINT4 tokenFlag;
00495   UINT4 keyUsage;
00496   RSA_TIME_T start;
00497   RSA_TIME_T end;
00498 } B_KEY_ATTRIBUTES;
00499 
00501 typedef struct {
00502   B_KEY_ATTRIBUTES privateKeyAttributes;
00503   B_KEY_ATTRIBUTES publicKeyAttributes;
00504   B_INFO_TYPE keypairGenInfoType;
00505   POINTER keypairGenInfo;
00506 } B_KEYPAIR_GEN_PARAMS;
00507 
00508 typedef int (*GENERATE_MASK) PROTO_LIST
00509    ((B_ALGORITHM_METHOD *, POINTER, unsigned char *, unsigned int,
00510      unsigned char *, unsigned int));
00511 
00513 typedef struct {
00514   B_INFO_TYPE digestAlgorithm;
00515   POINTER digestParams;
00516   B_INFO_TYPE maskGeneratingFunction;
00517   POINTER mgfParams;
00518   unsigned int tfOption;
00519 } B_PKCS_RSA_PSS_PARAMS;
00520 
00522 #define PKCS_RSA_PSS_NO_HASH_ID    1
00523 
00525 #define PKCS_RSA_PSS_WITH_HASH_ID  2
00526 
00527 typedef struct {
00528   B_INFO_TYPE underlyingAlgorithm;
00529   POINTER algParams;
00530   GENERATE_MASK GenerateMask;
00531 } B_MGF_CTX;
00532 
00534 typedef struct {
00535   B_INFO_TYPE underlyingAlgorithm;
00536   POINTER algParams;
00537 } B_MGF1_PARAMS;
00538 
00539 /* Information contained in key token types */
00541 typedef struct {
00542   ITEM manufacturerId;
00543   ITEM internalKey;
00544 } KI_TOKEN_INFO;
00545 
00547 typedef struct {
00548   KI_TOKEN_INFO keyDataStruct;
00549   A_X509_ATTRIB_INFO attributes;
00550 } KI_EXTENDED_TOKEN_INFO;
00551 
00553 typedef struct {
00554   KI_TOKEN_INFO keyDataStruct;
00555   A_X509_KEYPAIR_ATTRIB_INFO attributes;
00556 } KI_KEYPAIR_TOKEN_INFO;
00557 
00558 
00559 /* Information for Message Authentication Code (MAC) algorithm.
00560  */
00562 typedef struct {
00563   unsigned int macLen;                               /* The length of MAC value */
00564 } B_MAC_PARAMS;
00565 
00566 /* Information for RC4 with MAC algorithm.
00567  */
00569 typedef struct {
00570   ITEM salt;                                  /* The variable-length salt */
00571   unsigned int macLen;                        /* The length to use for MAC value */
00572 } B_RC4_WITH_MAC_PARAMS;
00573 
00574 /* Information for Digital Signature Algorithm (DSA) parameter generation
00575  */
00577 typedef struct {
00578   unsigned int primeBits;
00579 } B_DSA_PARAM_GEN_PARAMS;
00580 
00581 /* Information for Elliptic Curve (EC) parameter generation
00582  */
00584 typedef struct {
00585   unsigned int version;
00586   unsigned int fieldType;   /* The base field for EC           */
00587   unsigned int fieldElementBits;  /* The length of field element in bits         */
00588   unsigned int pointRepresentation; /* Reserved for future use           */
00589   unsigned int minOrderBits;    /* The minimum size of group generated by base */
00590                               /* An input of 0 defaults to fieldElementBits - 7 */
00591   unsigned int trialDivBound;     /* The maximum size of second largest prime    */
00592           /* A subgroup of group generated by base     */
00593           /* An input of 0 defaults to 255        */
00594   unsigned int tableLookup;      /* Relevant only to even field case. Set if */
00595                /* the use of precomputed params is desired */
00596 } B_EC_PARAM_GEN_PARAMS;
00597 
00598 /* Indicates how EC parameters are passed */
00600 typedef struct {
00601   B_INFO_TYPE parameterInfoType;
00602   POINTER parameterInfoValue;
00603 } B_EC_PARAMS;
00604 
00605 /* Indicates how special EC parameters are passed in */
00606 /* Start with the definition of the function pointer */
00607 typedef int (*DEFINED_CURVE) PROTO_LIST
00608    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00609 /* The following are the "flags" to use. Each of them is a function pointer,
00610      but to the user looks like a flag. Call one of these functions and it will
00611      return the info for the special curve.
00612  */
00613 int RSA_CALLING_CONV NIST_P192 PROTO_LIST
00614    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00615 int RSA_CALLING_CONV NIST_P192_WITH_ACCEL PROTO_LIST
00616    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00617 
00618 int RSA_CALLING_CONV NIST_P192Q PROTO_LIST
00619    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00620 
00621 int RSA_CALLING_CONV X962_P192_EX2 PROTO_LIST
00622    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00623 int RSA_CALLING_CONV X962_P192_EX2_WITH_ACCEL PROTO_LIST
00624    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00625 int RSA_CALLING_CONV X962_P192_EX3 PROTO_LIST
00626    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00627 int RSA_CALLING_CONV X962_P192_EX3_WITH_ACCEL PROTO_LIST
00628    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00629 
00630 int RSA_CALLING_CONV NIST_P224 PROTO_LIST
00631    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00632 int RSA_CALLING_CONV NIST_P224_WITH_ACCEL PROTO_LIST
00633    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00634 int RSA_CALLING_CONV NIST_P224Q PROTO_LIST
00635    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00636 
00637 int RSA_CALLING_CONV X962_P239_EX1 PROTO_LIST
00638    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00639 int RSA_CALLING_CONV X962_P239_EX1_WITH_ACCEL PROTO_LIST
00640    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00641 int RSA_CALLING_CONV X962_P239_EX2 PROTO_LIST
00642    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00643 int RSA_CALLING_CONV X962_P239_EX2_WITH_ACCEL PROTO_LIST
00644    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00645 int RSA_CALLING_CONV X962_P239_EX3 PROTO_LIST
00646    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00647 int RSA_CALLING_CONV X962_P239_EX3_WITH_ACCEL PROTO_LIST
00648    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00649 
00650 int RSA_CALLING_CONV NIST_P256 PROTO_LIST
00651    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00652 int RSA_CALLING_CONV NIST_P256_WITH_ACCEL PROTO_LIST
00653    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00654 int RSA_CALLING_CONV NIST_P256Q PROTO_LIST
00655    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00656 
00657 int RSA_CALLING_CONV NIST_P384 PROTO_LIST
00658    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00659 int RSA_CALLING_CONV NIST_P384_WITH_ACCEL PROTO_LIST
00660    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00661 int RSA_CALLING_CONV NIST_P384Q PROTO_LIST
00662    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00663 
00664 int RSA_CALLING_CONV NIST_P521 PROTO_LIST
00665    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00666 int RSA_CALLING_CONV NIST_P521_WITH_ACCEL PROTO_LIST
00667    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00668 int RSA_CALLING_CONV NIST_P521Q PROTO_LIST
00669    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00670 
00671 int RSA_CALLING_CONV NIST_K163 PROTO_LIST
00672    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00673 int RSA_CALLING_CONV NIST_K163_WITH_ACCEL PROTO_LIST
00674    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00675 int RSA_CALLING_CONV NIST_K163Q PROTO_LIST
00676    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00677 int RSA_CALLING_CONV NIST_K163Q_WITH_ACCEL PROTO_LIST
00678    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00679 int RSA_CALLING_CONV NIST_K163_ONB PROTO_LIST
00680    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00681 int RSA_CALLING_CONV NIST_K163_ONB_WITH_ACCEL PROTO_LIST
00682    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00683 int RSA_CALLING_CONV NIST_K163Q_ONB PROTO_LIST
00684    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00685 int RSA_CALLING_CONV NIST_K163Q_ONB_WITH_ACCEL PROTO_LIST
00686    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00687 int RSA_CALLING_CONV NIST_B163 PROTO_LIST
00688    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00689 int RSA_CALLING_CONV NIST_B163_WITH_ACCEL PROTO_LIST
00690    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00691 int RSA_CALLING_CONV NIST_B163Q PROTO_LIST
00692    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00693 int RSA_CALLING_CONV NIST_B163Q_WITH_ACCEL PROTO_LIST
00694    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00695 int RSA_CALLING_CONV NIST_B163_ONB PROTO_LIST
00696    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00697 int RSA_CALLING_CONV NIST_B163_ONB_WITH_ACCEL PROTO_LIST
00698    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00699 int RSA_CALLING_CONV NIST_B163Q_ONB PROTO_LIST
00700    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00701 int RSA_CALLING_CONV NIST_B163Q_ONB_WITH_ACCEL PROTO_LIST
00702    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00703 
00704 int RSA_CALLING_CONV NIST_K233 PROTO_LIST
00705    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00706 int RSA_CALLING_CONV NIST_K233_WITH_ACCEL PROTO_LIST
00707    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00708 int RSA_CALLING_CONV NIST_K233Q PROTO_LIST
00709    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00710 int RSA_CALLING_CONV NIST_K233Q_WITH_ACCEL PROTO_LIST
00711    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00712 int RSA_CALLING_CONV NIST_K233_ONB PROTO_LIST
00713    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00714 int RSA_CALLING_CONV NIST_K233_ONB_WITH_ACCEL PROTO_LIST
00715    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00716 int RSA_CALLING_CONV NIST_K233Q_ONB PROTO_LIST
00717    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00718 int RSA_CALLING_CONV NIST_K233Q_ONB_WITH_ACCEL PROTO_LIST
00719    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00720 int RSA_CALLING_CONV NIST_B233 PROTO_LIST
00721    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00722 int RSA_CALLING_CONV NIST_B233_WITH_ACCEL PROTO_LIST
00723    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00724 int RSA_CALLING_CONV NIST_B233Q PROTO_LIST
00725    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00726 int RSA_CALLING_CONV NIST_B233Q_WITH_ACCEL PROTO_LIST
00727    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00728 int RSA_CALLING_CONV NIST_B233_ONB PROTO_LIST
00729    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00730 int RSA_CALLING_CONV NIST_B233_ONB_WITH_ACCEL PROTO_LIST
00731    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00732 int RSA_CALLING_CONV NIST_B233Q_ONB PROTO_LIST
00733    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00734 int RSA_CALLING_CONV NIST_B233Q_ONB_WITH_ACCEL PROTO_LIST
00735    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00736 
00737 int RSA_CALLING_CONV NIST_K283 PROTO_LIST
00738    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00739 int RSA_CALLING_CONV NIST_K283_WITH_ACCEL PROTO_LIST
00740    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00741 int RSA_CALLING_CONV NIST_K283Q PROTO_LIST
00742    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00743 int RSA_CALLING_CONV NIST_K283Q_WITH_ACCEL PROTO_LIST
00744    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00745 int RSA_CALLING_CONV NIST_K283_ONB PROTO_LIST
00746    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00747 int RSA_CALLING_CONV NIST_K283_ONB_WITH_ACCEL PROTO_LIST
00748    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00749 int RSA_CALLING_CONV NIST_K283Q_ONB PROTO_LIST
00750    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00751 int RSA_CALLING_CONV NIST_K283Q_ONB_WITH_ACCEL PROTO_LIST
00752    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00753 int RSA_CALLING_CONV NIST_B283 PROTO_LIST
00754    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00755 int RSA_CALLING_CONV NIST_B283_WITH_ACCEL PROTO_LIST
00756    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00757 int RSA_CALLING_CONV NIST_B283Q PROTO_LIST
00758    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00759 int RSA_CALLING_CONV NIST_B283Q_WITH_ACCEL PROTO_LIST
00760    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00761 int RSA_CALLING_CONV NIST_B283_ONB PROTO_LIST
00762    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00763 int RSA_CALLING_CONV NIST_B283_ONB_WITH_ACCEL PROTO_LIST
00764    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00765 int RSA_CALLING_CONV NIST_B283Q_ONB PROTO_LIST
00766    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00767 int RSA_CALLING_CONV NIST_B283Q_ONB_WITH_ACCEL PROTO_LIST
00768    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00769 
00770 int RSA_CALLING_CONV NIST_K409 PROTO_LIST
00771    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00772 int RSA_CALLING_CONV NIST_K409_WITH_ACCEL PROTO_LIST
00773    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00774 int RSA_CALLING_CONV NIST_K409Q PROTO_LIST
00775    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00776 int RSA_CALLING_CONV NIST_K409Q_WITH_ACCEL PROTO_LIST
00777    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00778 int RSA_CALLING_CONV NIST_K409_ONB PROTO_LIST
00779    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00780 int RSA_CALLING_CONV NIST_K409_ONB_WITH_ACCEL PROTO_LIST
00781    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00782 int RSA_CALLING_CONV NIST_K409Q_ONB PROTO_LIST
00783    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00784 int RSA_CALLING_CONV NIST_K409Q_ONB_WITH_ACCEL PROTO_LIST
00785    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00786 int RSA_CALLING_CONV NIST_B409 PROTO_LIST
00787    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00788 int RSA_CALLING_CONV NIST_B409_WITH_ACCEL PROTO_LIST
00789    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00790 int RSA_CALLING_CONV NIST_B409Q PROTO_LIST
00791    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00792 int RSA_CALLING_CONV NIST_B409Q_WITH_ACCEL PROTO_LIST
00793    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00794 int RSA_CALLING_CONV NIST_B409_ONB PROTO_LIST
00795    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00796 int RSA_CALLING_CONV NIST_B409_ONB_WITH_ACCEL PROTO_LIST
00797    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00798 int RSA_CALLING_CONV NIST_B409Q_ONB PROTO_LIST
00799    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00800 int RSA_CALLING_CONV NIST_B409Q_ONB_WITH_ACCEL PROTO_LIST
00801    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00802 
00803 int RSA_CALLING_CONV NIST_K571 PROTO_LIST
00804    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00805 int RSA_CALLING_CONV NIST_K571_WITH_ACCEL PROTO_LIST
00806    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00807 int RSA_CALLING_CONV NIST_K571Q PROTO_LIST
00808    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00809 int RSA_CALLING_CONV NIST_K571Q_WITH_ACCEL PROTO_LIST
00810    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00811 int RSA_CALLING_CONV NIST_K571_ONB PROTO_LIST
00812    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00813 int RSA_CALLING_CONV NIST_K571_ONB_WITH_ACCEL PROTO_LIST
00814    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00815 int RSA_CALLING_CONV NIST_K571Q_ONB PROTO_LIST
00816    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00817 int RSA_CALLING_CONV NIST_K571Q_ONB_WITH_ACCEL PROTO_LIST
00818    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00819 int RSA_CALLING_CONV NIST_B571 PROTO_LIST
00820    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00821 int RSA_CALLING_CONV NIST_B571_WITH_ACCEL PROTO_LIST
00822    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00823 int RSA_CALLING_CONV NIST_B571Q PROTO_LIST
00824    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00825 int RSA_CALLING_CONV NIST_B571Q_WITH_ACCEL PROTO_LIST
00826    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00827 int RSA_CALLING_CONV NIST_B571_ONB PROTO_LIST
00828    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00829 int RSA_CALLING_CONV NIST_B571_ONB_WITH_ACCEL PROTO_LIST
00830    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00831 int RSA_CALLING_CONV NIST_B571Q_ONB PROTO_LIST
00832    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00833 int RSA_CALLING_CONV NIST_B571Q_ONB_WITH_ACCEL PROTO_LIST
00834    ((POINTER *, FT_X962_NAMED_CURVE_TYPE *));
00835 
00836 
00837 /* The data struct to pass in data for SetAlgorithmInfo */
00839 typedef struct {
00840   DEFINED_CURVE definedCurve;
00841 } B_EC_SPECIAL_CURVE;
00842 /* The data struct to pass in key data for SetKeyInfo */
00844 typedef struct {
00845   DEFINED_CURVE definedCurve;
00846   ITEM publicKey;
00847 } B_EC_PUBLIC_KEY_SPECIAL_CURVE;
00849 typedef struct {
00850   DEFINED_CURVE definedCurve;
00851   ITEM privateKey;
00852 } B_EC_PRIVATE_KEY_SPECIAL_CURVE;
00853 
00854 /* Indicates how a digest algorithm is specified in a signature scheme */
00858 typedef struct {
00859   B_INFO_TYPE digestInfoType;
00860   POINTER digestInfoParams;
00861 } B_DIGEST_SPECIFIER;
00862 
00863 /* Information for secret sharing algorithm */
00865 typedef struct {
00866   unsigned int threshold;                                 /* The share threshold */
00867 } B_SECRET_SHARING_PARAMS;
00868 
00869 
00870 /* Information for PKCS V2 OAEP Algorithm */
00872 typedef struct {
00873 
00874 /* hashFunc may contain a NULL_PTR or a pointer to the
00875   null-terminated ASCII string, "sha1".
00876   In both cases SHA1 will become the digest function.
00877 */
00878 char*     hashFunc;
00879 ITEM      hashFuncParams;
00880 
00881 /*  maskGenFunc may contain a NULL_PTR or a pointer to the
00882     null-terminated ASCII string, "mgf1".  In both cases MGF1
00883   will become the Mask Generator Function.
00884 */
00885 unsigned char*  maskGenFunc;
00886 ITEM      maskGenFuncParams;
00887 
00888 /* maskGenFuncUnderlyingAlg may contain a NULL_PTR or a pointer
00889    to the null-terminated ASCII string, "sha1".  In both cases
00890    SHA1 will become the underlying algorithm.
00891 */
00892 char*       maskGenFuncUnderlyingAlg;
00893 ITEM      maskGenFuncUnderlyingAlgParams;
00894 
00895 /* pSourceFunc is the method for determining the parameters, P.
00896    pSourceFunc may contain a NULL_PTR or a pointer to the
00897    null-terminated ASCII string, "specified parameters".
00898    In  both cases "specified parameters" will become the
00899    pSource method.
00900 
00901 If pSourceFunc is "specified parameters" then pSourceParams
00902 may be specified in two ways:
00903 
00904 1. As a NULL_PTR.     P is then assumed to be empty.
00905 2. As an ITEM       ITEM contains the specified value for P.
00906 */
00907 
00908 char*     pSourceFunc;
00909 ITEM      pSourceParams;
00910 
00911 } A_PKCS_OAEP_PARAMS;
00912 
00913 typedef struct {
00914   char year[4];
00915   char month[2];
00916   char day[2];
00917 } B_DATE;
00918 
00919 /* Information to set up a chooser for use with a PKCS #11 device
00920  * when the caller wants to use a pre-established session.
00921  */
00925 typedef struct {
00926   unsigned long int sessionHandle; /* In PKCS 11, a session handle is a
00927                            CK_SESSION_HANDLE, which is an unsigned long int */
00928   POINTER cryptokiFunctions;                /* A Cryptoki C_FunctionListPtr */
00929   char *libraryName;     /* The name of the shared library (DLL, .so, etc.) */
00930   ITEM tokenLabel;            /* A user-defined label to differentiate tokens */
00931   ITEM passPhrase;             /* Possibly needed to log in into the device */
00932   A_SURRENDER_CTX *surrenderContext;       /* Install when creating session */
00933 } B_PKCS11_SESSION;
00934 
00935 
01171 int RSA_CALLING_CONV KI_8Byte PROTO_LIST ((POINTER *));
01172 int RSA_CALLING_CONV KI_16Byte PROTO_LIST ((POINTER *));
01173 int RSA_CALLING_CONV KI_24Byte PROTO_LIST ((POINTER *));
01174 int RSA_CALLING_CONV KI_32Byte PROTO_LIST ((POINTER *));
01175 int RSA_CALLING_CONV KI_Token PROTO_LIST ((POINTER *));
01176 int RSA_CALLING_CONV KI_ExtendedToken PROTO_LIST ((POINTER *));
01177 int RSA_CALLING_CONV KI_DES8 PROTO_LIST ((POINTER *));
01178 int RSA_CALLING_CONV KI_DES8Strong PROTO_LIST ((POINTER *));
01179 int RSA_CALLING_CONV KI_DES24Strong PROTO_LIST ((POINTER *));
01180 int RSA_CALLING_CONV KI_DESX PROTO_LIST ((POINTER *));
01181 int RSA_CALLING_CONV KI_DSAPrivate PROTO_LIST ((POINTER *));
01182 int RSA_CALLING_CONV KI_DSAPrivateBER PROTO_LIST ((POINTER *));
01183 int RSA_CALLING_CONV KI_DSAPrivateX957BER PROTO_LIST ((POINTER *));
01184 int RSA_CALLING_CONV KI_DSAPublic PROTO_LIST ((POINTER *));
01185 int RSA_CALLING_CONV KI_DSAPublicBER PROTO_LIST ((POINTER *));
01186 int RSA_CALLING_CONV KI_DSAPublicX957BER PROTO_LIST ((POINTER *));
01187 int RSA_CALLING_CONV KI_ECPrivate PROTO_LIST ((POINTER *));
01188 int RSA_CALLING_CONV KI_ECPrivateSpecialCurve PROTO_LIST ((POINTER *));
01189 int RSA_CALLING_CONV KI_ECPrivateBER PROTO_LIST ((POINTER *));
01190 int RSA_CALLING_CONV KI_ECPrivateComponent PROTO_LIST ((POINTER *));
01191 int RSA_CALLING_CONV KI_ECPrivateComponentBER PROTO_LIST ((POINTER *));
01192 int RSA_CALLING_CONV KI_ECPublic PROTO_LIST ((POINTER *));
01193 int RSA_CALLING_CONV KI_ECPublicSpecialCurve PROTO_LIST ((POINTER *));
01194 int RSA_CALLING_CONV KI_ECPublicBER PROTO_LIST ((POINTER *));
01195 int RSA_CALLING_CONV KI_ECPublicComponent PROTO_LIST ((POINTER *));
01196 int RSA_CALLING_CONV KI_ECPublicComponentBER PROTO_LIST ((POINTER *));
01197 int RSA_CALLING_CONV KI_Item PROTO_LIST ((POINTER *));
01198 int RSA_CALLING_CONV KI_PKCS_RSAPrivate PROTO_LIST ((POINTER *));
01199 int RSA_CALLING_CONV KI_PKCS_RSAMultiPrimePrivate PROTO_LIST ((POINTER *));
01200 int RSA_CALLING_CONV KI_PKCS_RSAPrivateBER PROTO_LIST ((POINTER *));
01201 int RSA_CALLING_CONV KI_PKCS11KeyAttributes PROTO_LIST ((POINTER *));
01202 int RSA_CALLING_CONV KI_RSAPrivate PROTO_LIST ((POINTER *));
01203 int RSA_CALLING_CONV KI_RSAPublic PROTO_LIST ((POINTER *));
01204 int RSA_CALLING_CONV KI_RSAPublicOAEPParams PROTO_LIST ((POINTER *));
01205 int RSA_CALLING_CONV KI_RSAPublicBER PROTO_LIST ((POINTER *));
01206 int RSA_CALLING_CONV KI_RSAPublicOAEP_BER PROTO_LIST ((POINTER *));
01207 int RSA_CALLING_CONV KI_RSA_CRT PROTO_LIST ((POINTER *));
01208 
01209 /* Key Identifiers for BSAFE 1.x Support.
01210  */
01211 int RSA_CALLING_CONV KI_DES_BSAFE1 PROTO_LIST ((POINTER *));
01212 int RSA_CALLING_CONV KI_DESX_BSAFE1 PROTO_LIST ((POINTER *));
01213 int RSA_CALLING_CONV KI_RC2WithBSAFE1Params PROTO_LIST ((POINTER *));
01214 int RSA_CALLING_CONV KI_RC2_BSAFE1 PROTO_LIST ((POINTER *));
01215 int RSA_CALLING_CONV KI_RSAPrivateBSAFE1 PROTO_LIST ((POINTER *));
01216 int RSA_CALLING_CONV KI_RSAPublicBSAFE1 PROTO_LIST ((POINTER *));
01217 
01218 /* Algorithm Identifiers.
01219  */
01220 int RSA_CALLING_CONV AI_BSSecretSharing PROTO_LIST ((POINTER *));
01221 int RSA_CALLING_CONV AI_CBC_IV8 PROTO_LIST ((POINTER *));
01222 int RSA_CALLING_CONV AI_CBC_IV16 PROTO_LIST ((POINTER *));
01223 int RSA_CALLING_CONV AI_HW_Random PROTO_LIST ((POINTER *));
01224 
01225 int RSA_CALLING_CONV AI_AES_ECB PROTO_LIST ((POINTER *));
01226 int RSA_CALLING_CONV AI_AES128_ECB PROTO_LIST ((POINTER *));
01227 int RSA_CALLING_CONV AI_AES192_ECB PROTO_LIST ((POINTER *));
01228 int RSA_CALLING_CONV AI_AES256_ECB PROTO_LIST ((POINTER *));
01229 int RSA_CALLING_CONV AI_AES128_ECB_BER PROTO_LIST ((POINTER *));
01230 int RSA_CALLING_CONV AI_AES192_ECB_BER PROTO_LIST ((POINTER *));
01231 int RSA_CALLING_CONV AI_AES256_ECB_BER PROTO_LIST ((POINTER *));
01232 
01233 int RSA_CALLING_CONV AI_AES_CBC PROTO_LIST ((POINTER *));
01234 int RSA_CALLING_CONV AI_AES128_CBC PROTO_LIST ((POINTER *));
01235 int RSA_CALLING_CONV AI_AES192_CBC PROTO_LIST ((POINTER *));
01236 int RSA_CALLING_CONV AI_AES256_CBC PROTO_LIST ((POINTER *));
01237 int RSA_CALLING_CONV AI_AES_CBCPad PROTO_LIST ((POINTER *));
01238 int RSA_CALLING_CONV AI_AES128_CBCPad PROTO_LIST ((POINTER *));
01239 int RSA_CALLING_CONV AI_AES192_CBCPad PROTO_LIST ((POINTER *));
01240 int RSA_CALLING_CONV AI_AES256_CBCPad PROTO_LIST ((POINTER *));
01241 int RSA_CALLING_CONV AI_AES128_CBCPadBER PROTO_LIST ((POINTER *));
01242 int RSA_CALLING_CONV AI_AES192_CBCPadBER PROTO_LIST ((POINTER *));
01243 int RSA_CALLING_CONV AI_AES256_CBCPadBER PROTO_LIST ((POINTER *));
01244 
01245 int RSA_CALLING_CONV AI_AES_CFB PROTO_LIST ((POINTER *));
01246 int RSA_CALLING_CONV AI_AES128_CFB PROTO_LIST ((POINTER *));
01247 int RSA_CALLING_CONV AI_AES192_CFB PROTO_LIST ((POINTER *));
01248 int RSA_CALLING_CONV AI_AES256_CFB PROTO_LIST ((POINTER *));
01249 int RSA_CALLING_CONV AI_AES128_CFB_BER PROTO_LIST ((POINTER *));
01250 int RSA_CALLING_CONV AI_AES192_CFB_BER PROTO_LIST ((POINTER *));
01251 int RSA_CALLING_CONV AI_AES256_CFB_BER PROTO_LIST ((POINTER *));
01252 
01253 int RSA_CALLING_CONV AI_DES_CBC_IV8 PROTO_LIST ((POINTER *));
01254 int RSA_CALLING_CONV AI_DES_CBCPadBER PROTO_LIST ((POINTER *));
01255 int RSA_CALLING_CONV AI_DES_CBCPadPEM PROTO_LIST ((POINTER *));
01256 int RSA_CALLING_CONV AI_DES_EDE3_CBC_IV8 PROTO_LIST ((POINTER *));
01257 int RSA_CALLING_CONV AI_DES_EDE3_CBCPadIV8 PROTO_LIST ((POINTER *));
01258 int RSA_CALLING_CONV AI_DES_EDE3_CBCPadBER PROTO_LIST ((POINTER *));
01259 int RSA_CALLING_CONV AI_DES_CBCPadIV8 PROTO_LIST ((POINTER *));
01260 int RSA_CALLING_CONV AI_DESX_CBC_IV8 PROTO_LIST ((POINTER *));
01261 int RSA_CALLING_CONV AI_DESX_CBCPadIV8 PROTO_LIST ((POINTER *));
01262 int RSA_CALLING_CONV AI_DESX_CBCPadBER PROTO_LIST ((POINTER *));
01263 int RSA_CALLING_CONV AI_DHKeyAgree PROTO_LIST ((POINTER *));
01264 int RSA_CALLING_CONV AI_DHKeyAgreeBER PROTO_LIST ((POINTER *));
01265 int RSA_CALLING_CONV AI_DHParamGen PROTO_LIST ((POINTER *));
01266 int RSA_CALLING_CONV AI_DSA PROTO_LIST ((POINTER *));
01267 int RSA_CALLING_CONV AI_DSAKeyGen PROTO_LIST ((POINTER *));
01268 int RSA_CALLING_CONV AI_DSAParamGen PROTO_LIST ((POINTER *));
01269 int RSA_CALLING_CONV AI_DSAWithSHA1 PROTO_LIST ((POINTER *));
01270 int RSA_CALLING_CONV AI_DSAWithSHA1_BER PROTO_LIST ((POINTER *));
01271 int RSA_CALLING_CONV AI_ECParamGen PROTO_LIST ((POINTER *));
01272 int RSA_CALLING_CONV AI_ECParameters PROTO_LIST ((POINTER *));
01273 int RSA_CALLING_CONV AI_ECSpecialCurve PROTO_LIST ((POINTER *));
01274 int RSA_CALLING_CONV AI_ECParametersBER PROTO_LIST ((POINTER *));
01275 int RSA_CALLING_CONV AI_ECPubKey PROTO_LIST ((POINTER *));
01276 int RSA_CALLING_CONV AI_ECPubKeyBER PROTO_LIST ((POINTER *));
01277 int RSA_CALLING_CONV AI_ECKeyGen PROTO_LIST ((POINTER *));
01278 int RSA_CALLING_CONV AI_EC_DHKeyAgree PROTO_LIST ((POINTER *));
01279 int RSA_CALLING_CONV AI_EC_DSAWithDigest PROTO_LIST ((POINTER *));
01280 int RSA_CALLING_CONV AI_EC_DSA PROTO_LIST ((POINTER *));
01281 int RSA_CALLING_CONV AI_EC_ES PROTO_LIST ((POINTER *));
01282 int RSA_CALLING_CONV AI_ECAcceleratorTable PROTO_LIST ((POINTER *));
01283 int RSA_CALLING_CONV AI_ECBuildAcceleratorTable PROTO_LIST ((POINTER *));
01284 int RSA_CALLING_CONV AI_ECBuildPubKeyAccelTable PROTO_LIST ((POINTER *));
01285 int RSA_CALLING_CONV AI_FeedbackCipher PROTO_LIST ((POINTER *));
01286 int RSA_CALLING_CONV AI_HMAC PROTO_LIST ((POINTER *));
01287 int RSA_CALLING_CONV AI_HMAC_BER PROTO_LIST ((POINTER *));
01288 int RSA_CALLING_CONV AI_KeypairGen PROTO_LIST ((POINTER *));
01289 int RSA_CALLING_CONV AI_KeypairTokenGen PROTO_LIST ((POINTER *));
01290 int RSA_CALLING_CONV AI_MD2 PROTO_LIST ((POINTER *));
01291 int RSA_CALLING_CONV AI_MD2Random PROTO_LIST ((POINTER *));
01292 int RSA_CALLING_CONV AI_MD2WithDES_CBCPad PROTO_LIST ((POINTER *));
01293 int RSA_CALLING_CONV AI_MD2WithDES_CBCPadBER PROTO_LIST ((POINTER *));
01294 int RSA_CALLING_CONV AI_MD2WithRC2_CBCPad PROTO_LIST ((POINTER *));
01295 int RSA_CALLING_CONV AI_MD2WithRC2_CBCPadBER PROTO_LIST ((POINTER *));
01296 int RSA_CALLING_CONV AI_MD2WithRSAEncryption PROTO_LIST ((POINTER *));
01297 int RSA_CALLING_CONV AI_MD2WithRSAEncryptionBER PROTO_LIST ((POINTER *));
01298 int RSA_CALLING_CONV AI_MD2_BER PROTO_LIST ((POINTER *));
01299 int RSA_CALLING_CONV AI_MD2_PEM PROTO_LIST ((POINTER *));
01300 int RSA_CALLING_CONV AI_MD5 PROTO_LIST ((POINTER *));
01301 int RSA_CALLING_CONV AI_MD5Random PROTO_LIST ((POINTER *));
01302 int RSA_CALLING_CONV AI_MD5WithDES_CBCPad PROTO_LIST ((POINTER *));
01303 int RSA_CALLING_CONV AI_MD5WithDES_CBCPadBER PROTO_LIST ((POINTER *));
01304 int RSA_CALLING_CONV AI_MD5WithRC2_CBCPad PROTO_LIST ((POINTER *));
01305 int RSA_CALLING_CONV AI_MD5WithRC2_CBCPadBER PROTO_LIST ((POINTER *));
01306 int RSA_CALLING_CONV AI_MD5WithRSAEncryption PROTO_LIST ((POINTER *));
01307 int RSA_CALLING_CONV AI_MD5WithRSAEncryptionBER PROTO_LIST ((POINTER *));
01308 int RSA_CALLING_CONV AI_MD5WithXOR PROTO_LIST ((POINTER *));
01309 int RSA_CALLING_CONV AI_MD5WithXOR_BER PROTO_LIST ((POINTER *));
01310 int RSA_CALLING_CONV AI_MD5_BER PROTO_LIST ((POINTER *));
01311 int RSA_CALLING_CONV AI_MD5_PEM PROTO_LIST ((POINTER *));
01312 
01313 /* PKCS OAEP added for Bsafe 4.1 */
01314 int RSA_CALLING_CONV AI_PKCS_OAEPRecode PROTO_LIST ((POINTER *));
01315 int RSA_CALLING_CONV AI_PKCS_OAEPRecodeBER PROTO_LIST ((POINTER *));
01316 int RSA_CALLING_CONV AI_PKCS_OAEP_RSAPublic PROTO_LIST ((POINTER *));
01317 int RSA_CALLING_CONV AI_PKCS_OAEP_RSAPublicBER PROTO_LIST ((POINTER *));
01318 int RSA_CALLING_CONV AI_PKCS_OAEP_RSAPrivate PROTO_LIST ((POINTER *));
01319 int RSA_CALLING_CONV AI_PKCS_OAEP_RSAPrivateBER PROTO_LIST ((POINTER *));
01320 
01321 int RSA_CALLING_CONV AI_PKCS_RSAPrivate PROTO_LIST ((POINTER *));
01322 int RSA_CALLING_CONV AI_SET_OAEP_RSAPrivate PROTO_LIST ((POINTER *));
01323 int RSA_CALLING_CONV AI_PKCS_RSAPrivateBER PROTO_LIST ((POINTER *));
01324 int RSA_CALLING_CONV AI_PKCS_RSAPrivatePEM PROTO_LIST ((POINTER *));
01325 int RSA_CALLING_CONV AI_PKCS_RSAPublic PROTO_LIST ((POINTER *));
01326 int RSA_CALLING_CONV AI_SET_OAEP_RSAPublic PROTO_LIST ((POINTER *));
01327 int RSA_CALLING_CONV AI_PKCS_RSAPublicBER PROTO_LIST ((POINTER *));
01328 int RSA_CALLING_CONV AI_PKCS_RSAPublicPEM PROTO_LIST ((POINTER *));
01329 int RSA_CALLING_CONV AI_PKCS_RSA_PSS PROTO_LIST ((POINTER *));
01330 int RSA_CALLING_CONV AI_PKCS_RSA_PSS_BER PROTO_LIST ((POINTER *));
01331 int RSA_CALLING_CONV AI_RC2 PROTO_LIST ((POINTER *));
01332 int RSA_CALLING_CONV AI_RC2_CBC PROTO_LIST ((POINTER *));
01333 int RSA_CALLING_CONV AI_RC2_CBCPad PROTO_LIST ((POINTER *));
01334 int RSA_CALLING_CONV AI_RC2_CBCPadBER PROTO_LIST ((POINTER *));
01335 int RSA_CALLING_CONV AI_RC2_CBCPadPEM PROTO_LIST ((POINTER *));
01336 int RSA_CALLING_CONV AI_RC4 PROTO_LIST ((POINTER *));
01337 int RSA_CALLING_CONV AI_RC4WithMAC PROTO_LIST ((POINTER *));
01338 int RSA_CALLING_CONV AI_RC4WithMAC_BER PROTO_LIST ((POINTER *));
01339 int RSA_CALLING_CONV AI_RC4_BER PROTO_LIST ((POINTER *));
01340 int RSA_CALLING_CONV AI_RC5_CBC PROTO_LIST ((POINTER *));
01341 int RSA_CALLING_CONV AI_RC5_CBCPad PROTO_LIST ((POINTER *));
01342 int RSA_CALLING_CONV AI_RC5_CBCPadBER PROTO_LIST ((POINTER *));
01343 int RSA_CALLING_CONV AI_SeedBlockCipherECB PROTO_LIST ((POINTER *));
01344 int RSA_CALLING_CONV AI_SeedBlockCipherCBC PROTO_LIST ((POINTER *));
01345 int RSA_CALLING_CONV AI_SeedBlockCipherCBCPad PROTO_LIST ((POINTER *));
01346 int RSA_CALLING_CONV AI_SeedBlockCipherCBCPadBER PROTO_LIST ((POINTER *));
01347 int RSA_CALLING_CONV AI_RESET_IV PROTO_LIST ((POINTER *));
01348 int RSA_CALLING_CONV AI_RFC1113Recode PROTO_LIST ((POINTER *));
01349 int RSA_CALLING_CONV AI_RSAKeyGen PROTO_LIST ((POINTER *));
01350 int RSA_CALLING_CONV AI_RSAMultiPrimeKeyGen PROTO_LIST ((POINTER *));
01351 int RSA_CALLING_CONV AI_RSAStrongKeyGen PROTO_LIST ((POINTER *));
01352 int RSA_CALLING_CONV AI_SignVerify PROTO_LIST ((POINTER *));
01353 int RSA_CALLING_CONV AI_RSAPrivate PROTO_LIST ((POINTER *));
01354 int RSA_CALLING_CONV AI_RSAPublic PROTO_LIST ((POINTER *));
01355 int RSA_CALLING_CONV AI_SHA1 PROTO_LIST ((POINTER *));
01356 int RSA_CALLING_CONV AI_SHA256 PROTO_LIST ((POINTER *));
01357 int RSA_CALLING_CONV AI_SHA384 PROTO_LIST ((POINTER *));
01358 int RSA_CALLING_CONV AI_SHA512 PROTO_LIST ((POINTER *));
01359 int RSA_CALLING_CONV AI_PKCS5_V2_PBE PROTO_LIST ((POINTER *));
01360 int RSA_CALLING_CONV AI_PKCS5_V2_PBE_BER PROTO_LIST ((POINTER *));
01361 int RSA_CALLING_CONV AI_PKCS5_V2_PBMAC PROTO_LIST ((POINTER *));
01362 int RSA_CALLING_CONV AI_PKCS5_V2_PBMAC_BER PROTO_LIST ((POINTER *));
01363 
01364 /* We recommend that customers use AI_X962Random_V0 instead */
01365 /* of AI_SHA1Random because future releases of BSAFE may */
01366 /* change the behavior of AI_SHA1Random to match the */
01367 /* algorithm by that name in JSAFE. */
01368 int RSA_CALLING_CONV AI_SHA1Random PROTO_LIST ((POINTER *));
01369 int RSA_CALLING_CONV AI_SHA1_BER PROTO_LIST ((POINTER *));
01370 int RSA_CALLING_CONV AI_SHA256_BER PROTO_LIST ((POINTER *));
01371 int RSA_CALLING_CONV AI_SHA384_BER PROTO_LIST ((POINTER *));
01372 int RSA_CALLING_CONV AI_SHA512_BER PROTO_LIST ((POINTER *));
01373 int RSA_CALLING_CONV AI_SHA1WithDES_CBCPad PROTO_LIST ((POINTER *));
01374 int RSA_CALLING_CONV AI_SHA1WithDES_CBCPadBER PROTO_LIST ((POINTER *));
01375 int RSA_CALLING_CONV AI_SHA1WithRSAEncryption PROTO_LIST ((POINTER *));
01376 int RSA_CALLING_CONV AI_SHA1WithRSAEncryptionBER PROTO_LIST ((POINTER *));
01377 int RSA_CALLING_CONV AI_SHA256WithRSAEncryption PROTO_LIST ((POINTER *));
01378 int RSA_CALLING_CONV AI_SHA256WithRSAEncryptionBER PROTO_LIST ((POINTER *));
01379 int RSA_CALLING_CONV AI_SHA384WithRSAEncryption PROTO_LIST ((POINTER *));
01380 int RSA_CALLING_CONV AI_SHA384WithRSAEncryptionBER PROTO_LIST ((POINTER *));
01381 int RSA_CALLING_CONV AI_SHA512WithRSAEncryption PROTO_LIST ((POINTER *));
01382 int RSA_CALLING_CONV AI_SHA512WithRSAEncryptionBER PROTO_LIST ((POINTER *));
01383 int RSA_CALLING_CONV AI_SymKeyTokenGen PROTO_LIST ((POINTER *));
01384 int RSA_CALLING_CONV AI_X962Random_V0 PROTO_LIST ((POINTER *));
01385 int RSA_CALLING_CONV AI_X931Random PROTO_LIST ((POINTER *));
01386 int RSA_CALLING_CONV AI_ECRandom PROTO_LIST ((POINTER *));
01387 int RSA_CALLING_CONV AI_ECRandomCtx PROTO_LIST ((POINTER *));
01388 int RSA_CALLING_CONV AI_Entropy PROTO_LIST ((POINTER *));
01389 int RSA_CALLING_CONV AI_EntropyCtx PROTO_LIST ((POINTER *));
01390 
01391 /* Algorithm Identifiers for BSAFE 1.x Support.
01392  */
01393 int RSA_CALLING_CONV AI_DES_CBC_BSAFE1 PROTO_LIST ((POINTER *));
01394 int RSA_CALLING_CONV AI_DESX_CBC_BSAFE1 PROTO_LIST ((POINTER *));
01395 int RSA_CALLING_CONV AI_MAC PROTO_LIST ((POINTER *));
01396 int RSA_CALLING_CONV AI_MD PROTO_LIST ((POINTER *));
01397 int RSA_CALLING_CONV AI_RC2_CBC_BSAFE1 PROTO_LIST ((POINTER *));
01398 int RSA_CALLING_CONV AI_RSAPrivateBSAFE1 PROTO_LIST ((POINTER *));
01399 int RSA_CALLING_CONV AI_RSAPublicBSAFE1 PROTO_LIST ((POINTER *));
01400 
01401 /* Algorithm Identifiers for interoperability with SSL-C key wrapping
01402  */
01403 int RSA_CALLING_CONV AI_SSLC_KeyWrap PROTO_LIST ((POINTER *));
01404 
01405 int RSA_CALLING_CONV AI_MGF1 PROTO_LIST ((POINTER *));
01406 
01407 /*
01408  * @defgroup HI_TYPES Hardware Identifiers
01409  * This section details the HIs.
01410  * @ingroup AD_CRC_HDW
01411  * @{
01412  * @}
01413  */
01414 
01415 /* Hardware Identifiers for PKCS11 Support.
01416  */
01417 
01418 int RSA_CALLING_CONV HI_PKCS11Session PROTO_LIST ((POINTER *));
01419 
01420 /* Hardware Identifier for Atalla AXL 300 support.
01421      Define _BSAFEAXL_H so that if a user includes bsafeaxl.h (from the
01422      interim release), there won't be a double declaration.
01423  */
01424 #ifndef _BSAFEAXL_H
01425 #define _BSAFEAXL_H
01426 #endif
01427 int RSA_CALLING_CONV HI_AtallaAXL300 PROTO_LIST ((POINTER *));
01428 
01429 int RSA_CALLING_CONV B_EncodeDigestInfo PROTO_LIST
01430   ((unsigned char *, unsigned int *, unsigned int, ITEM *, unsigned char *,
01431     unsigned int));
01432 int RSA_CALLING_CONV B_DecodeDigestInfo PROTO_LIST
01433   ((ITEM *, ITEM *, unsigned char *, unsigned int));
01434 
01435 /* Algorithm methods used when implementing block ciphers with feedback */
01436 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES_ENCRYPT;
01437 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES_DECRYPT;
01438 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES128_ENCRYPT;
01439 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES128_DECRYPT;
01440 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES192_ENCRYPT;
01441 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES192_DECRYPT;
01442 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES256_ENCRYPT;
01443 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES256_DECRYPT;
01444 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DES_ENCRYPT;
01445 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DES_DECRYPT;
01446 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DESX_ENCRYPT;
01447 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DESX_DECRYPT;
01448 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DES_EDE_ENCRYPT;
01449 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DES_EDE_DECRYPT;
01450 
01451 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_CBC_ENCRYPT;
01452 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_CBC_DECRYPT;
01453 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_CBC_INTER_LEAVED_ENCRYPT;
01454 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_CBC_INTER_LEAVED_DECRYPT;
01455 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_CFB_ENCRYPT;
01456 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_CFB_DECRYPT;
01457 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_CFB_PIPELINED_ENCRYPT;
01458 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_CFB_PIPELINED_DECRYPT;
01459 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECB_ENCRYPT;
01460 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECB_DECRYPT;
01461 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_OFB_ENCRYPT;
01462 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_OFB_DECRYPT;
01463 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_OFB_PIPELINED_ENCRYPT;
01464 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_OFB_PIPELINED_DECRYPT;
01465 
01466 
01467 
01468 /* Algorithm methods for use in the algorithm chooser */
01469 
01470 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_DES_CBC_ENCRYPT;
01471 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_DES_CBC_DECRYPT;
01472 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_DES_EDE3_CBC_ENCRYPT;
01473 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_DES_EDE3_CBC_DECRYPT;
01474 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_HW_RANDOM;
01475 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_FORMAT_X931;
01476 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_EXTRACT_X931;
01477 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_RSA_PRV_ENCRYPT;
01478 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_RSA_PUB_DECRYPT;
01479 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_RSA_ENCRYPT;
01480 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_RSA_DECRYPT;
01481 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_RSA_CRT_ENCRYPT;
01482 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_RSA_CRT_DECRYPT;
01483 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES_CBC_DECRYPT;
01484 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES_CBC_ENCRYPT;
01485 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES128_CBC_DECRYPT;
01486 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES128_CBC_ENCRYPT;
01487 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES192_CBC_DECRYPT;
01488 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES192_CBC_ENCRYPT;
01489 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES256_CBC_DECRYPT;
01490 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_AES256_CBC_ENCRYPT;
01491 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DES_CBC_DECRYPT;
01492 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DES_CBC_ENCRYPT;
01493 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DES_EDE3_CBC_DECRYPT;
01494 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DES_EDE3_CBC_ENCRYPT;
01495 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DESX_CBC_DECRYPT;
01496 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DESX_CBC_ENCRYPT;
01497 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DH_KEY_AGREE;
01498 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DH_PARAM_GEN;
01499 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DSA_KEY_GEN;
01500 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DSA_PARAM_GEN;
01501 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DSA_SIGN;
01502 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DSA_VERIFY;
01503 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DSA_KEY_TOKEN_GEN;
01504 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_DSA_SIGN;
01505 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_TOKEN_DSA_VERIFY;
01506 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DYN_HUFF_COMPRESS;
01507 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_DYN_HUFF_DECOMPRESS;
01508 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_PARAM_GEN;
01509 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_PARAM_GEN;
01510 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_BLD_ACCEL_TABLE;
01511 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_BLD_PUB_KEY_ACC_TAB;
01512 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_BLD_ACCEL_TABLE;
01513 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_BLD_PUB_KEY_ACC_TAB;
01514 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_DECRYPT;
01515 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_DECRYPT;
01516 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_ENCRYPT;
01517 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_ENCRYPT;
01518 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_KEY_GEN;
01519 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_KEY_GEN;
01520 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_DH_KEY_AGREE;
01521 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_DH_KEY_AGREE;
01522 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_DSA_SIGN;
01523 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_DSA_SIGN;
01524 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECFP_DSA_VERIFY;
01525 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ECF2POLY_DSA_VERIFY;
01526 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_MAC;
01527 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_MD2;
01528 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_MD2_RANDOM;
01529 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_MD2_RANDOM_2X;
01530 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_MD5;
01531 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_MD5_RANDOM;
01532 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_MD5_RANDOM_2X;
01533 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_MD;
01534 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC2_DECRYPT;
01535 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC2_ENCRYPT;
01536 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC2_CBC_DECRYPT;
01537 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC2_CBC_ENCRYPT;
01538 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC4_DECRYPT;
01539 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC4_ENCRYPT;
01540 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC4_WITH_MAC_DECRYPT;
01541 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC4_WITH_MAC_ENCRYPT;
01542 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC5_64DECRYPT;
01543 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC5_64ENCRYPT;
01544 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC5_ENCRYPT;
01545 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC5_DECRYPT;
01546 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC5_CBC_ENCRYPT;
01547 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RC5_CBC_DECRYPT;
01548 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SEED_DECRYPT;
01549 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SEED_ENCRYPT;
01550 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SEED_CBC_DECRYPT;
01551 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SEED_CBC_ENCRYPT;
01552 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_CRT_DECRYPT;
01553 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_CRT_ENCRYPT;
01554 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_CRT_DECRYPT_BLIND;
01555 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_CRT_ENCRYPT_BLIND;
01556 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_CRT_DECRYPT_NO_BLIND;
01557 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_CRT_ENCRYPT_NO_BLIND;
01558 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_CRT_X931_ENCRYPT;
01559 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_X931_DECRYPT;
01560 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_DECRYPT;
01561 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_ENCRYPT;
01562 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_KEY_GEN;
01563 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_STRONG_KEY_GEN;
01564 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_RSA_KEY_TOKEN_GEN;
01565 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SHA;
01566 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SHA_RANDOM;
01567 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SHA256;
01568 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SHA384;
01569 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SHA512;
01570 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_SYMMETRIC_KEY_TOKEN_GEN;
01571 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_X931_RANDOM;
01572 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_EC_RANDOM;
01573 extern B_ALGORITHM_METHOD RSA_CALLING_CONV AM_ENTROPY;
01574 
01575 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_RSA_KEY_GEN;
01576 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_RSA_PRIVATE_SIGN;
01577 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_RSA_PRIVATE_DECRYPT;
01578 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_RSA_PUBLIC_ENCRYPT;
01579 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_RSA_PUBLIC_VERIFY;
01580 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_DSA_KEY_GEN;
01581 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_DSA_SIGN;
01582 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_DSA_VERIFY;
01583 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_EC_KEY_GEN;
01584 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_EC_DSA_SIGN;
01585 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_PKCS11_EC_DSA_VERIFY;
01586 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_AXL300_RSA_PRIVATE_ENCRYPT;
01587 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_AXL300_RSA_PRIVATE_DECRYPT;
01588 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_AXL300_RSA_PUBLIC_ENCRYPT;
01589 extern B_EXT_ALGORITHM_METHOD RSA_CALLING_CONV AM_AXL300_RSA_PUBLIC_DECRYPT;
01590 
01591 /* For key wrapping and unwrapping */
01592 extern B_KEY_METHOD KM_SYMMETRIC_KEY;
01593 extern B_KEY_METHOD KM_PKCS_RSA_PRIVATE_BER_KEY;
01594 
01595 
01596 /* The data profiling object */
01597 int RSA_CALLING_CONV B_BuildTableInit PROTO_LIST ((B_ALGORITHM_OBJ,
01598     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01599 int RSA_CALLING_CONV B_BuildTableUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01600     unsigned char *, unsigned int, A_SURRENDER_CTX *));
01601 int RSA_CALLING_CONV B_BuildTableGetBufSize PROTO_LIST ((B_ALGORITHM_OBJ,
01602     unsigned int *));
01603 int RSA_CALLING_CONV B_BuildTableFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01604     unsigned char *, unsigned int *, unsigned int, A_SURRENDER_CTX *));
01605 
01606 int RSA_CALLING_CONV B_DecodeAlgorithmBER PROTO_LIST ((unsigned char *encoding,
01607   unsigned int len, unsigned int *algorithmFlag));
01608 
01609 /* The compression object */
01610 int RSA_CALLING_CONV B_CompressInit PROTO_LIST ((B_ALGORITHM_OBJ,
01611     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01612 int RSA_CALLING_CONV B_CompressUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01613     unsigned char *, unsigned int *, unsigned int, unsigned char *,
01614     unsigned int, unsigned int*, A_SURRENDER_CTX *));
01615 int RSA_CALLING_CONV B_CompressFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01616     unsigned char *, unsigned int *, unsigned int, A_SURRENDER_CTX *));
01617 int RSA_CALLING_CONV B_DecompressInit PROTO_LIST ((B_ALGORITHM_OBJ,
01618     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01619 int RSA_CALLING_CONV B_DecompressUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01620     unsigned char *, unsigned int *, unsigned int, unsigned char *,
01621     unsigned int, unsigned int *, A_SURRENDER_CTX *));
01622 int RSA_CALLING_CONV B_DecompressFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01623     unsigned char *, unsigned int *, unsigned int, A_SURRENDER_CTX *));
01624 
01625 /* The key object.
01626  */
01627 int RSA_CALLING_CONV B_CreateKeyObject PROTO_LIST ((B_KEY_OBJ *));
01628 void RSA_CALLING_CONV B_DestroyKeyObject PROTO_LIST ((B_KEY_OBJ *));
01629 int RSA_CALLING_CONV B_SetKeyInfo PROTO_LIST ((B_KEY_OBJ, B_INFO_TYPE,
01630     POINTER));
01631 void RSA_CALLING_CONV B_GetKeyExtendedErrorInfo PROTO_LIST ((B_KEY_OBJ,
01632      ITEM *, POINTER *));
01633 int RSA_CALLING_CONV B_GetKeyInfo PROTO_LIST ((POINTER *, B_KEY_OBJ,
01634     B_INFO_TYPE));
01635 
01636 int RSA_CALLING_CONV B_WrapKeyInit PROTO_LIST ((B_ALGORITHM_OBJ,
01637     B_KEY_OBJ, B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01638 
01639 int RSA_CALLING_CONV B_WrapKey PROTO_LIST ((B_ALGORITHM_OBJ algorithmObject,
01640     unsigned char *wrappedKey, unsigned int *wrappedKeyLen,
01641     unsigned int maxOutLen, B_KEY_OBJ keyToWrap, B_KEY_CHOOSER keyChooser,
01642     B_ALGORITHM_OBJ randomAlgorithm, A_SURRENDER_CTX *surrenderContext));
01643 
01644 int RSA_CALLING_CONV B_UnwrapKeyInit PROTO_LIST ((B_ALGORITHM_OBJ, B_KEY_OBJ,
01645     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01646 
01647 int RSA_CALLING_CONV B_UnwrapKey PROTO_LIST ((B_ALGORITHM_OBJ algorithmObject,
01648     B_KEY_OBJ unwrappedKey, unsigned char *wrappedKey,
01649     unsigned int wrappedKeyLen, B_KEY_CHOOSER keyChooser,
01650     B_ALGORITHM_OBJ randomAlgorithm, A_SURRENDER_CTX *surrenderContext));
01651 
01652 /* The algorithm object.
01653  */
01654 int RSA_CALLING_CONV B_CreateAlgorithmObject PROTO_LIST ((B_ALGORITHM_OBJ *));
01655 void RSA_CALLING_CONV B_DestroyAlgorithmObject PROTO_LIST (
01656         (B_ALGORITHM_OBJ *));
01657 int RSA_CALLING_CONV B_SetAlgorithmInfo PROTO_LIST ((B_ALGORITHM_OBJ,
01658     B_INFO_TYPE, POINTER));
01659 int RSA_CALLING_CONV B_GetAlgorithmInfo PROTO_LIST ((POINTER *,
01660     B_ALGORITHM_OBJ, B_INFO_TYPE));
01661 int RSA_CALLING_CONV B_GetAlgorithmState PROTO_LIST ((ITEM *,
01662     B_ALGORITHM_OBJ));
01663 int RSA_CALLING_CONV B_SetAlgorithmState PROTO_LIST ((B_ALGORITHM_OBJ,
01664     B_INFO_TYPE, ITEM *, B_ALGORITHM_CHOOSER));
01665 
01666 
01667 void RSA_CALLING_CONV B_GetExtendedErrorInfo PROTO_LIST ((B_ALGORITHM_OBJ,
01668     ITEM *, POINTER *));
01669 
01670 unsigned int B_IntegerBits PROTO_LIST ((unsigned char *, unsigned int));
01671 
01672 /* Algorithm operations.
01673  */
01674 
01675 int RSA_CALLING_CONV B_RandomInit PROTO_LIST ((B_ALGORITHM_OBJ,
01676     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01677 int RSA_CALLING_CONV B_GenerateRandomBytes PROTO_LIST ((B_ALGORITHM_OBJ,
01678     unsigned char *, unsigned int, A_SURRENDER_CTX *));
01679 
01680 int RSA_CALLING_CONV B_RandomUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01681     unsigned char *, unsigned int, A_SURRENDER_CTX *));
01682 
01683 int RSA_CALLING_CONV B_RandomSelfTest PROTO_LIST ((B_ALGORITHM_OBJ algorithmObject,
01684     A_SURRENDER_CTX *surrenderContext));
01685 
01686 
01687 int RSA_CALLING_CONV B_DigestInit PROTO_LIST ((B_ALGORITHM_OBJ,
01688     B_KEY_OBJ, B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01689 int RSA_CALLING_CONV B_DigestUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01690     unsigned char *, unsigned int, A_SURRENDER_CTX *));
01691 int RSA_CALLING_CONV B_DigestFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01692     unsigned char *, unsigned int *, unsigned int, A_SURRENDER_CTX *));
01693 
01694 int RSA_CALLING_CONV B_EncryptInit PROTO_LIST ((B_ALGORITHM_OBJ,
01695     B_KEY_OBJ, B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01696 int RSA_CALLING_CONV B_EncryptUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01697     unsigned char *, unsigned int *, unsigned int, unsigned char *,
01698     unsigned int, B_ALGORITHM_OBJ, A_SURRENDER_CTX *));
01699 int RSA_CALLING_CONV B_EncryptFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01700     unsigned char *, unsigned int *, unsigned int, B_ALGORITHM_OBJ,
01701     A_SURRENDER_CTX *));
01702 
01703 int RSA_CALLING_CONV B_DecryptInit PROTO_LIST ((B_ALGORITHM_OBJ,
01704     B_KEY_OBJ, B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01705 int RSA_CALLING_CONV B_DecryptUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01706     unsigned char *, unsigned int *, unsigned int, unsigned char *,
01707     unsigned int, B_ALGORITHM_OBJ, A_SURRENDER_CTX *));
01708 int RSA_CALLING_CONV B_DecryptFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01709     unsigned char *, unsigned int *, unsigned int, B_ALGORITHM_OBJ,
01710     A_SURRENDER_CTX *));
01711 
01712 int RSA_CALLING_CONV B_EncodeInit PROTO_LIST ((B_ALGORITHM_OBJ));
01713 int RSA_CALLING_CONV B_EncodeUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01714     unsigned char *, unsigned int *, unsigned int, unsigned char *,
01715     unsigned int));
01716 int RSA_CALLING_CONV B_EncodeFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01717     unsigned char *, unsigned int *, unsigned int));
01718 
01719 int RSA_CALLING_CONV B_DecodeInit PROTO_LIST ((B_ALGORITHM_OBJ));
01720 int RSA_CALLING_CONV B_DecodeUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01721     unsigned char *, unsigned int *, unsigned int, unsigned char *,
01722     unsigned int));
01723 int RSA_CALLING_CONV B_DecodeFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01724     unsigned char *, unsigned int *, unsigned int));
01725 int B_OpenEnvelopeInit PROTO_LIST ((B_ALGORITHM_OBJ, unsigned int *,
01726     ITEM *, B_KEY_OBJ, B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01727 
01728 int RSA_CALLING_CONV B_OpenEnvelope PROTO_LIST ((B_ALGORITHM_OBJ,
01729     ITEM *, unsigned int, ITEM *, B_KEY_OBJ, A_SURRENDER_CTX *));
01730 int RSA_CALLING_CONV B_SealEnvelope PROTO_LIST ((B_ALGORITHM_OBJ,
01731     ITEM *, unsigned int, ITEM *, B_KEY_OBJ, B_ALGORITHM_OBJ,
01732     A_SURRENDER_CTX *));
01733 int RSA_CALLING_CONV B_SealEnvelopeInit PROTO_LIST ((B_ALGORITHM_OBJ,
01734     unsigned int *, ITEM *, B_KEY_OBJ, B_KEY_OBJ, B_ALGORITHM_CHOOSER,
01735     A_SURRENDER_CTX *));
01736 
01737 int RSA_CALLING_CONV B_SignInit PROTO_LIST ((B_ALGORITHM_OBJ, B_KEY_OBJ,
01738     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01739 int RSA_CALLING_CONV B_SignUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01740     unsigned char *, unsigned int, A_SURRENDER_CTX *));
01741 int RSA_CALLING_CONV B_SignFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01742     unsigned char *, unsigned int *, unsigned int, B_ALGORITHM_OBJ,
01743     A_SURRENDER_CTX *));
01744 
01745 int RSA_CALLING_CONV B_VerifyInit PROTO_LIST ((B_ALGORITHM_OBJ, B_KEY_OBJ,
01746     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01747 int RSA_CALLING_CONV B_VerifyUpdate PROTO_LIST ((B_ALGORITHM_OBJ,
01748     unsigned char *, unsigned int, A_SURRENDER_CTX *));
01749 int RSA_CALLING_CONV B_VerifyFinal PROTO_LIST ((B_ALGORITHM_OBJ,
01750     unsigned char *, unsigned int, B_ALGORITHM_OBJ, A_SURRENDER_CTX *));
01751 
01752 int RSA_CALLING_CONV B_KeyAgreeInit PROTO_LIST ((B_ALGORITHM_OBJ, B_KEY_OBJ,
01753     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01754 int RSA_CALLING_CONV B_KeyAgreePhase1 PROTO_LIST ((B_ALGORITHM_OBJ,
01755     unsigned char *, unsigned int *, unsigned int, B_ALGORITHM_OBJ,
01756     A_SURRENDER_CTX *));
01757 int RSA_CALLING_CONV B_KeyAgreePhase2 PROTO_LIST ((B_ALGORITHM_OBJ,
01758     unsigned char *, unsigned int *, unsigned int, unsigned char *,
01759     unsigned int, A_SURRENDER_CTX *));
01760 
01761 int RSA_CALLING_CONV B_GenerateInit PROTO_LIST ((B_ALGORITHM_OBJ,
01762     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01763 int RSA_CALLING_CONV B_GenerateParameters PROTO_LIST ((B_ALGORITHM_OBJ,
01764     B_ALGORITHM_OBJ, B_ALGORITHM_OBJ, A_SURRENDER_CTX *));
01765 
01766 int RSA_CALLING_CONV B_GenerateKeypair PROTO_LIST ((B_ALGORITHM_OBJ,
01767     B_KEY_OBJ, B_KEY_OBJ, B_ALGORITHM_OBJ, A_SURRENDER_CTX *));
01768 
01769 int RSA_CALLING_CONV B_SymmetricKeyGenerateInit PROTO_LIST ((B_ALGORITHM_OBJ,
01770     B_ALGORITHM_CHOOSER, A_SURRENDER_CTX *));
01771 int RSA_CALLING_CONV B_SymmetricKeyGenerate PROTO_LIST ((B_ALGORITHM_OBJ,
01772     B_KEY_OBJ, B_ALGORITHM_OBJ, A_SURRENDER_CTX *));
01773 
01774 int B_CreateSessionChooser PROTO_LIST ((B_ALGORITHM_CHOOSER,
01775     B_ALGORITHM_CHOOSER *, POINTER *, ITEM *, POINTER *, unsigned char ***));
01776 int B_FreeSessionChooser PROTO_LIST ((B_ALGORITHM_CHOOSER *,
01777     unsigned char ***));
01778 
01779 int RSA_CALLING_CONV B_CreateHardwareChooser PROTO_LIST (
01780         (B_ALGORITHM_CHOOSER currentChooser,
01781     B_ALGORITHM_CHOOSER *newChooser,
01782     B_ALGORITHM_CHOOSER swReplacements,
01783     B_INFO_TYPE hwInfoType, POINTER info));
01784 void RSA_CALLING_CONV B_DestroyHardwareChooser PROTO_LIST (
01785         (B_ALGORITHM_CHOOSER *chooser));
01786 int RSA_CALLING_CONV B_GetDevice PROTO_LIST ((ITEM *device,
01787      B_ALGORITHM_OBJ algorithmObject));
01788 
01789 /* If the compiler does not support global data initialization for
01790    function pointers, you should compile your application with
01791    GLOBAL_FUNCTION_POINTERS defined as 0 and call the appropriate AM_ Init
01792    function for the corresponding AM_.  By default, GLOBAL_FUNCTION_POINTERS
01793    is defined as 1.
01794  */
01795 #if RSA_GLOBAL_FUNCTION_POINTERS == RSA_DISABLED
01796 void RSA_CALLING_CONV BSAFE_VERSIONInit PROTO_LIST ((void));
01797 void RSA_CALLING_CONV AM_TokenDES_CBCEncryptInit PROTO_LIST ((void));
01798 void RSA_CALLING_CONV AM_TokenDES_CBCDecryptInit PROTO_LIST ((void));
01799 void RSA_CALLING_CONV AM_HWRandomInit PROTO_LIST ((void));
01800 void RSA_CALLING_CONV AM_TokenRSAPrvEncryptInit PROTO_LIST ((void));
01801 void RSA_CALLING_CONV AM_TokenRSAPubDecryptInit PROTO_LIST ((void));
01802 void RSA_CALLING_CONV AM_AES_CBCDecryptInit PROTO_LIST ((void));
01803 void RSA_CALLING_CONV AM_AES_CBCEncryptInit PROTO_LIST ((void));
01804 void RSA_CALLING_CONV AM_DES_CBCDecryptInit PROTO_LIST ((void));
01805 void RSA_CALLING_CONV AM_DES_CBCEncryptInit PROTO_LIST ((void));
01806 void RSA_CALLING_CONV AM_DES_EDE3_CBCDecryptInit PROTO_LIST ((void));
01807 void RSA_CALLING_CONV AM_DES_EDE3_CBCEncryptInit PROTO_LIST ((void));
01808 void RSA_CALLING_CONV AM_DESX_CBCDecryptInit PROTO_LIST ((void));
01809 void RSA_CALLING_CONV AM_DESX_CBCEncryptInit PROTO_LIST ((void));
01810 void RSA_CALLING_CONV AM_DHKeyAgreeInit PROTO_LIST ((void));
01811 void RSA_CALLING_CONV AM_DHParamGenInit PROTO_LIST ((void));
01812 void RSA_CALLING_CONV AM_DSAKeyGenInit PROTO_LIST ((void));
01813 void RSA_CALLING_CONV AM_DSAParamGenInit PROTO_LIST ((void));
01814 void RSA_CALLING_CONV AM_DSASignInit PROTO_LIST ((void));
01815 void RSA_CALLING_CONV AM_DSAVerifyInit PROTO_LIST ((void));
01816 void RSA_CALLING_CONV AM_ECFPEncryptInit PROTO_LIST ((void));
01817 void RSA_CALLING_CONV AM_ECF2PolyEncryptInit PROTO_LIST ((void));
01818 void RSA_CALLING_CONV AM_ECFPDecryptInit PROTO_LIST ((void));
01819 void RSA_CALLING_CONV AM_ECF2PolyDecryptInit PROTO_LIST ((void));
01820 void RSA_CALLING_CONV AM_ECFPBldAccelTableInit PROTO_LIST ((void));
01821 void RSA_CALLING_CONV AM_ECFPBldPubKeyAccTabInit PROTO_LIST ((void));
01822 void RSA_CALLING_CONV AM_ECF2PolyBldAccelTableInit PROTO_LIST ((void));
01823 void RSA_CALLING_CONV AM_FormatX931Init PROTO_LIST ((void));
01824 void RSA_CALLING_CONV AM_ExtractX931Init PROTO_LIST ((void));
01825 void RSA_CALLING_CONV AM_HMACInit PROTO_LIST ((void));
01826 void RSA_CALLING_CONV AM_MACInit PROTO_LIST ((void));
01827 void RSA_CALLING_CONV AM_MD2Init PROTO_LIST ((void));
01828 void RSA_CALLING_CONV AM_MD2RandomInit PROTO_LIST ((void));
01829 void RSA_CALLING_CONV AM_MD2RandomInit_2X PROTO_LIST ((void));
01830 void RSA_CALLING_CONV AM_MD5Init PROTO_LIST ((void));
01831 void RSA_CALLING_CONV AM_MD5RandomInit PROTO_LIST ((void));
01832 void RSA_CALLING_CONV AM_MD5RandomInit_2X PROTO_LIST ((void));
01833 void RSA_CALLING_CONV AM_MDInit PROTO_LIST ((void));
01834 void RSA_CALLING_CONV AM_RC2DecryptInit PROTO_LIST ((void));
01835 void RSA_CALLING_CONV AM_RC2EncryptInit PROTO_LIST ((void));
01836 void RSA_CALLING_CONV AM_RC2_CBCDecryptInit PROTO_LIST ((void));
01837 void RSA_CALLING_CONV AM_RC2_CBCEncryptInit PROTO_LIST ((void));
01838 void RSA_CALLING_CONV AM_RC4EncryptDecryptInit PROTO_LIST ((void));
01839 void RSA_CALLING_CONV AM_RC4WithMacEncryptInit PROTO_LIST ((void));
01840 void RSA_CALLING_CONV AM_RC4WithMacDecryptInit PROTO_LIST ((void));
01841 void RSA_CALLING_CONV AM_RC5DecryptInit PROTO_LIST ((void));
01842 void RSA_CALLING_CONV AM_RC5EncryptInit PROTO_LIST ((void));
01843 void RSA_CALLING_CONV AM_RC5_CBCDecryptInit PROTO_LIST ((void));
01844 void RSA_CALLING_CONV AM_RC5_CBCEncryptInit PROTO_LIST ((void));
01845 void RSA_CALLING_CONV AM_SeedDecryptInit PROTO_LIST ((void));
01846 void RSA_CALLING_CONV AM_SeedEncryptInit PROTO_LIST ((void));
01847 void RSA_CALLING_CONV AM_SeedCBCDecryptInit PROTO_LIST ((void));
01848 void RSA_CALLING_CONV AM_SeedCBCEncryptInit PROTO_LIST ((void));
01849 void RSA_CALLING_CONV AM_RSA_CRTEncryptDecryptInit PROTO_LIST ((void));
01850 void RSA_CALLING_CONV AM_RSA_CRTEncryptDecryptBlindInit PROTO_LIST ((void));
01851 void RSA_CALLING_CONV AM_RSAEncryptDecryptInit PROTO_LIST ((void));
01852 void RSA_CALLING_CONV AM_RSAX931DecryptInit PROTO_LIST ((void));
01853 void RSA_CALLING_CONV AM_RSA_CRT_X931EncryptInit PROTO_LIST ((void));
01854 
01855 void RSA_CALLING_CONV AM_RSAKeyGenInit PROTO_LIST ((void));
01856 void RSA_CALLING_CONV AM_SHAInit PROTO_LIST ((void));
01857 void RSA_CALLING_CONV AM_SHARandomInit PROTO_LIST ((void));
01858 void RSA_CALLING_CONV AM_SymmetricKeyTokenGenInit PROTO_LIST (void);
01859 void RSA_CALLING_CONV AM_X931RandomInit PROTO_LIST ((void));
01860 void RSA_CALLING_CONV AM_ECRandomInit PROTO_LIST ((void));
01861 void RSA_CALLING_CONV AM_EntropyInit PROTO_LIST ((void));
01862 #endif
01863 
01864 #ifdef __cplusplus
01865 }
01866 #endif
01867 
01868 #endif /* end _BSAFE_H_ */

Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 068-001001-6210-001-000 - 6.2.1