Cryptographic Token Interface Standard |
PKCS#11 |
00001 /* rewritten */ 00006 #define CK_INVALID_HANDLE 00007 00008 #define CK_TRUE 1 00009 00010 #define CK_FALSE 0 00011 00013 #define CK_UNAVAILABLE_INFORMATION (~0UL) 00014 00015 #define CK_EFFECTIVELY_INFINITE 0 00016 00018 #define CKU_SO 0 00019 00020 #define CKU_USER 1 00021 00022 #define CKU_CONTEXT_SPECIFIC 2 00023 00025 #define CKS_RO_PUBLIC_SESSION 0 00026 00028 #define CKS_RO_USER_FUNCTIONS 1 00029 00031 #define CKS_RW_PUBLIC_SESSION 2 00032 00034 #define CKS_RW_USER_FUNCTIONS 3 00035 00037 #define CKS_RW_SO_FUNCTIONS 4 00038 00040 #define TRUE CK_TRUE 00041 00042 #define FALSE CK_FALSE 00043 /* an unsigned 8-bit value */ 00047 typedef unsigned char CK_BYTE; 00048 /* an unsigned 8-bit character */ 00052 typedef CK_BYTE CK_CHAR; 00053 /* an 8-bit UTF-8 character */ 00057 typedef CK_BYTE CK_UTF8CHAR; 00058 /* a BYTE-sized Boolean flag */ 00062 typedef CK_BYTE CK_BBOOL; 00063 /* an unsigned value, at least 32 bits long */ 00067 typedef unsigned long int CK_ULONG; 00068 /* a signed value, the same size as a CK_ULONG */ 00072 typedef long int CK_LONG; 00073 /* at least 32 bits; each bit is a Boolean flag */ 00077 typedef CK_ULONG CK_FLAGS; 00078 00079 00081 typedef CK_BYTE CK_PTR CK_BYTE_PTR; 00083 typedef CK_CHAR CK_PTR CK_CHAR_PTR; 00085 typedef CK_UTF8CHAR CK_PTR CK_UTF8CHAR_PTR; 00087 typedef CK_ULONG CK_PTR CK_ULONG_PTR; 00089 typedef void CK_PTR CK_VOID_PTR; 00090 00091 00093 typedef CK_VOID_PTR CK_PTR CK_VOID_PTR_PTR; 00094 00095 00097 typedef NULL CK_PTR NULL_PTR; 00098 00099 00103 typedef CK_BYTE CK_PTR CK_BYTE_PTR; 00104 00105 00106 typedef CK_DECLARE_FUNCTION_POINTER(CK_RV, myC_InitializeType)( CK_VOID_PTR pReserved ); 00107 myC_InitializeType myC_Initialize; 00108 00109 00122 typedef CK_CALLBACK_FUNCTION(CK_RV, myCallbackType)(args); 00123 myCallbackType myCallback; 00124 00125 00126 00127 00187 typedef struct CK_VERSION { 00189 CK_BYTE major; 00191 CK_BYTE minor; 00192 } CK_VERSION; 00193 00194 00196 typedef CK_VERSION CK_PTR CK_VERSION_PTR; 00197 00198 00239 typedef struct CK_INFO { 00241 CK_VERSION cryptokiVersion; 00243 CK_UTF8CHAR manufacturerID[32]; 00245 CK_FLAGS flags; 00247 CK_UTF8CHAR libraryDescription[32]; 00249 CK_VERSION libraryVersion; 00250 } CK_INFO; 00251 00252 00254 typedef CK_INFO CK_PTR CK_INFO_PTR; 00260 typedef CK_ULONG CK_NOTIFICATION; 00261 00262 00268 typedef CK_ULONG CK_SLOT_ID; 00269 00270 00272 typedef CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR; 00273 00274 00333 typedef struct CK_SLOT_INFO { 00335 CK_UTF8CHAR slotDescription[64]; 00337 CK_UTF8CHAR manufacturerID[32]; 00339 CK_FLAGS flags; 00341 CK_VERSION hardwareVersion; 00343 CK_VERSION firmwareVersion; 00344 } CK_SLOT_INFO; 00345 00346 00348 #define CKF_TOKEN_PRESENT 0x00000001 00349 00351 #define CKF_REMOVABLE_DEVICE 0x00000002 00352 00354 #define CKF_HW_SLOT 0x00000004 00355 00357 typedef CK_SLOT_INFO CK_PTR CK_SLOT_INFO_PTR; 00358 00359 00576 typedef struct CK_TOKEN_INFO { 00578 CK_UTF8CHAR label[32]; 00580 CK_UTF8CHAR manufacturerID[32]; 00582 CK_UTF8CHAR model[16]; 00584 CK_CHAR serialNumber[16]; 00586 CK_FLAGS flags; 00588 CK_ULONG ulMaxSessionCount; 00590 CK_ULONG ulSessionCount; 00592 CK_ULONG ulMaxRwSessionCount; 00594 CK_ULONG ulRwSessionCount; 00596 CK_ULONG ulMaxPinLen; 00598 CK_ULONG ulMinPinLen; 00600 CK_ULONG ulTotalPublicMemory; 00602 CK_ULONG ulFreePublicMemory; 00604 CK_ULONG ulTotalPrivateMemory; 00606 CK_ULONG ulFreePrivateMemory; 00608 CK_VERSION hardwareVersion; 00610 CK_VERSION firmwareVersion; 00612 CK_CHAR utcTime[16]; 00613 } CK_TOKEN_INFO; 00614 00615 00617 #define CKF_RNG 0x00000001 00618 00620 #define CKF_WRITE_PROTECTED 0x00000002 00621 00623 #define CKF_LOGIN_REQUIRED 0x00000004 00624 00626 #define CKF_USER_PIN_INITIALIZED 0x00000008 00627 00629 #define CKF_RESTORE_KEY_NOT_NEEDED 0x00000020 00630 00632 #define CKF_CLOCK_ON_TOKEN 0x00000040 00633 00635 #define CKF_PROTECTED_AUTHENTICATION_PATH 0x00000100 00636 00638 #define CKF_DUAL_CRYPTO_OPERATIONS 0x00000200 00639 00641 #define CKF_TOKEN_INITIALIZED 0x00000400 00642 00644 #define CKF_SECONDARY_AUTHENTICATION 0x00000800 00645 00647 #define CKF_USER_PIN_COUNT_LOW 0x00010000 00648 00650 #define CKF_USER_PIN_FINAL_TRY 0x00020000 00651 00653 #define CKF_USER_PIN_LOCKED 0x00040000 00654 00656 #define CKF_USER_PIN_TO_BE_CHANGED 0x00080000 00657 00659 #define CKF_SO_PIN_COUNT_LOW 0x00100000 00660 00662 #define CKF_SO_PIN_FINAL_TRY 0x00200000 00663 00665 #define CKF_SO_PIN_LOCKED 0x00400000 00666 00668 #define CKF_SO_PIN_TO_BE_CHANGED 0x00800000 00669 00670 00671 00673 typedef CK_TOKEN_INFO CK_PTR CK_TOKEN_INFO_PTR; 00679 typedef CK_ULONG CK_SESSION_HANDLE; 00680 00681 00683 typedef CK_SESSION_HANDLE CK_PTR CK_SESSION_HANDLE_PTR; 00689 typedef CK_ULONG CK_USER_TYPE; 00690 00691 00698 typedef CK_ULONG CK_STATE; 00699 00700 00701 00702 00742 typedef struct CK_SESSION_INFO { 00744 CK_SLOT_ID slotID; 00746 CK_STATE state; 00748 CK_FLAGS flags; 00750 CK_ULONG ulDeviceError; 00751 } CK_SESSION_INFO; 00752 00753 00755 #define CKF_RW_SESSION 0x00000002 00756 00758 #define CKF_SERIAL_SESSION 0x00000004 00759 00761 typedef CK_SESSION_INFO CK_PTR CK_SESSION_INFO_PTR; 00767 typedef CK_ULONG CK_OBJECT_HANDLE; 00768 00769 00771 typedef CK_OBJECT_HANDLE CK_PTR CK_OBJECT_HANDLE_PTR; 00777 typedef CK_ULONG CK_OBJECT_CLASS; 00778 00779 00781 typedef CK_OBJECT_CLASS CK_PTR CK_OBJECT_CLASS_PTR; 00787 typedef CK_ULONG CK_HW_FEATURE_TYPE; 00788 00789 00795 typedef CK_ULONG CK_KEY_TYPE; 00796 00797 00803 typedef CK_ULONG CK_CERTIFICATE_TYPE; 00804 00805 00811 typedef CK_ULONG CK_ATTRIBUTE_TYPE; 00812 00813 00814 00815 00846 typedef struct CK_ATTRIBUTE { 00848 CK_ATTRIBUTE_TYPE type; 00850 CK_VOID_PTR pValue; 00852 CK_ULONG ulValueLen; 00853 } CK_ATTRIBUTE; 00854 00855 00857 typedef CK_ATTRIBUTE CK_PTR CK_ATTRIBUTE_PTR; 00858 00859 00874 typedef struct CK_DATE { 00876 CK_CHAR year[4]; 00878 CK_CHAR month[2]; 00880 CK_CHAR day[2]; 00881 } CK_DATE; 00882 00883 00889 typedef CK_ULONG CK_MECHANISM_TYPE; 00890 00891 00893 typedef CK_MECHANISM_TYPE CK_PTR CK_MECHANISM_TYPE_PTR; 00894 00895 00921 typedef struct CK_MECHANISM { 00923 CK_MECHANISM_TYPE mechanism; 00925 CK_VOID_PTR pParameter; 00927 CK_ULONG ulParameterLen; 00928 } CK_MECHANISM; 00929 00930 00932 typedef CK_MECHANISM CK_PTR CK_MECHANISM_PTR; 00933 00934 01072 typedef struct CK_MECHANISM_INFO { 01074 CK_ULONG ulMinKeySize; 01076 CK_ULONG ulMaxKeySize; 01078 CK_FLAGS flags; 01079 } CK_MECHANISM_INFO; 01080 01081 01083 #define CKF_HW 0x00000001 01084 01086 #define CKF_ENCRYPT 0x00000100 01087 01089 #define CKF_DECRYPT 0x00000200 01090 01092 #define CKF_DIGEST 0x00000400 01093 01095 #define CKF_SIGN 0x00000800 01096 01098 #define CKF_SIGN_RECOVER 0x00001000 01099 01101 #define CKF_VERIFY 0x00002000 01102 01104 #define CKF_VERIFY_RECOVER 0x00004000 01105 01107 #define CKF_GENERATE 0x00008000 01108 01110 #define CKF_GENERATE_KEY_PAIR 0x00010000 01111 01113 #define CKF_WRAP 0x00020000 01114 01116 #define CKF_UNWRAP 0x00040000 01117 01119 #define CKF_DERIVE 0x00080000 01120 01122 #define CKF_EC_F_P 0x00100000 01123 01125 #define CKF_EC_F_2M 0x00200000 01126 01128 #define CKF_EC_ECPARAMETERS 0x00400000 01129 01131 #define CKF_EC_NAMEDCURVE 0x00800000 01132 01134 #define CKF_EC_UNCOMPRESS 0x01000000 01135 01137 #define CKF_EC_COMPRESS 0x02000000 01138 01140 #define CKF_EXTENSION 0x80000000 01141 01143 typedef CK_MECHANISM_INFO CK_PTR CK_MECHANISM_INFO_PTR; 01149 typedef CK_ULONG CK_RV; 01150 01151 01157 typedef CK_CALLBACK_FUNCTION(CK_RV, CK_NOTIFY)( 01158 CK_SESSION_HANDLE hSession, 01159 CK_NOTIFICATION event, 01160 CK_VOID_PTR pApplication 01161 ); 01162 01163 01164 01165 01181 typedef struct CK_FUNCTION_LIST { 01182 CK_VERSION version; 01183 CK_C_Initialize C_Initialize; 01184 CK_C_Finalize C_Finalize; 01185 CK_C_GetInfo C_GetInfo; 01186 CK_C_GetFunctionList C_GetFunctionList; 01187 CK_C_GetSlotList C_GetSlotList; 01188 CK_C_GetSlotInfo C_GetSlotInfo; 01189 CK_C_GetTokenInfo C_GetTokenInfo; 01190 CK_C_GetMechanismList C_GetMechanismList; 01191 CK_C_GetMechanismInfo C_GetMechanismInfo; 01192 CK_C_InitToken C_InitToken; 01193 CK_C_InitPIN C_InitPIN; 01194 CK_C_SetPIN C_SetPIN; 01195 CK_C_OpenSession C_OpenSession; 01196 CK_C_CloseSession C_CloseSession; 01197 CK_C_CloseAllSessions C_CloseAllSessions; 01198 CK_C_GetSessionInfo C_GetSessionInfo; 01199 CK_C_GetOperationState C_GetOperationState; 01200 CK_C_SetOperationState C_SetOperationState; 01201 CK_C_Login C_Login; 01202 CK_C_Logout C_Logout; 01203 CK_C_CreateObject C_CreateObject; 01204 CK_C_CopyObject C_CopyObject; 01205 CK_C_DestroyObject C_DestroyObject; 01206 CK_C_GetObjectSize C_GetObjectSize; 01207 CK_C_GetAttributeValue C_GetAttributeValue; 01208 CK_C_SetAttributeValue C_SetAttributeValue; 01209 CK_C_FindObjectsInit C_FindObjectsInit; 01210 CK_C_FindObjects C_FindObjects; 01211 CK_C_FindObjectsFinal C_FindObjectsFinal; 01212 CK_C_EncryptInit C_EncryptInit; 01213 CK_C_Encrypt C_Encrypt; 01214 CK_C_EncryptUpdate C_EncryptUpdate; 01215 CK_C_EncryptFinal C_EncryptFinal; 01216 CK_C_DecryptInit C_DecryptInit; 01217 CK_C_Decrypt C_Decrypt; 01218 CK_C_DecryptUpdate C_DecryptUpdate; 01219 CK_C_DecryptFinal C_DecryptFinal; 01220 CK_C_DigestInit C_DigestInit; 01221 CK_C_Digest C_Digest; 01222 CK_C_DigestUpdate C_DigestUpdate; 01223 CK_C_DigestKey C_DigestKey; 01224 CK_C_DigestFinal C_DigestFinal; 01225 CK_C_SignInit C_SignInit; 01226 CK_C_Sign C_Sign; 01227 CK_C_SignUpdate C_SignUpdate; 01228 CK_C_SignFinal C_SignFinal; 01229 CK_C_SignRecoverInit C_SignRecoverInit; 01230 CK_C_SignRecover C_SignRecover; 01231 CK_C_VerifyInit C_VerifyInit; 01232 CK_C_Verify C_Verify; 01233 CK_C_VerifyUpdate C_VerifyUpdate; 01234 CK_C_VerifyFinal C_VerifyFinal; 01235 CK_C_VerifyRecoverInit C_VerifyRecoverInit; 01236 CK_C_VerifyRecover C_VerifyRecover; 01237 CK_C_DigestEncryptUpdate C_DigestEncryptUpdate; 01238 CK_C_DecryptDigestUpdate C_DecryptDigestUpdate; 01239 CK_C_SignEncryptUpdate C_SignEncryptUpdate; 01240 CK_C_DecryptVerifyUpdate C_DecryptVerifyUpdate; 01241 CK_C_GenerateKey C_GenerateKey; 01242 CK_C_GenerateKeyPair C_GenerateKeyPair; 01243 CK_C_WrapKey C_WrapKey; 01244 CK_C_UnwrapKey C_UnwrapKey; 01245 CK_C_DeriveKey C_DeriveKey; 01246 CK_C_SeedRandom C_SeedRandom; 01247 CK_C_GenerateRandom C_GenerateRandom; 01248 CK_C_GetFunctionStatus C_GetFunctionStatus; 01249 CK_C_CancelFunction C_CancelFunction; 01250 CK_C_WaitForSlotEvent C_WaitForSlotEvent; 01251 } CK_FUNCTION_LIST; 01252 01253 01255 typedef CK_FUNCTION_LIST CK_PTR CK_FUNCTION_LIST_PTR; 01257 typedef CK_FUNCTION_LIST_PTR CK_PTR CK_FUNCTION_LIST_PTR_PTR; 01264 typedef CK_CALLBACK_FUNCTION(CK_RV, CK_CREATEMUTEX)( 01265 CK_VOID_PTR_PTR ppMutex 01266 ); 01267 01268 01274 typedef CK_CALLBACK_FUNCTION(CK_RV, CK_DESTROYMUTEX)( 01275 CK_VOID_PTR pMutex 01276 ); 01277 01278 01305 typedef CK_CALLBACK_FUNCTION(CK_RV, CK_LOCKMUTEX)( 01306 CK_VOID_PTR pMutex 01307 ); 01308 01309 01313 typedef CK_CALLBACK_FUNCTION(CK_RV, CK_UNLOCKMUTEX)( 01314 CK_VOID_PTR pMutex 01315 ); 01316 01317 01318 01319 01366 typedef struct CK_C_INITIALIZE_ARGS { 01368 CK_CREATEMUTEX CreateMutex; 01370 CK_DESTROYMUTEX DestroyMutex; 01372 CK_LOCKMUTEX LockMutex; 01374 CK_UNLOCKMUTEX UnlockMutex; 01376 CK_FLAGS flags; 01378 CK_VOID_PTR pReserved; 01379 } CK_C_INITIALIZE_ARGS; 01380 01381 01383 #define CKF_LIBRARY_CANT_CREATE_OS_THREADS 0x00000001 01384 01386 #define CKF_OS_LOCKING_OK 0x00000002 01387 01389 typedef CK_C_INITIALIZE_ARGS CK_PTR CK_C_INITIALIZE_ARGS_PTR; 01391 #define CKA_CLASS 01392 01394 #define CKA_HW_FEATURE_TYPE 01395 01397 #define CKA_VALUE 01398 01400 #define CKA_RESET_ON_INIT 01401 01403 #define CKA_HAS_RESET 01404 01406 #define CKA_VALUE 01407 01409 #define CKA_TOKEN 01410 01412 #define CKA_PRIVATE 01413 01415 #define CKA_MODIFIABLE 01416 01418 #define CKA_LABEL 01419 01421 #define CKA_APPLICATION 01422 01424 #define CKA_OBJECT_ID 01425 01427 #define CKA_VALUE 01428 01429 01430 01432 #define CKA_CERTIFICATE_TYPE 01433 01435 #define CKA_TRUSTED 01436 01438 #define CKA_SUBJECT 01439 01441 #define CKA_ID 01442 01444 #define CKA_ISSUER 01445 01447 #define CKA_SERIAL_NUMBER 01448 01450 #define CKA_VALUE 01451 01452 01453 01455 #define CKA_OWNER 01456 01458 #define CKA_AC_ISSUER 01459 01461 #define CKA_SERIAL_NUMBER 01462 01464 #define CKA_ATTR_TYPES 01465 01467 #define CKA_VALUE 01468 01469 01470 01472 #define CKA_KEY_TYPE 01473 01475 #define CKA_ID 01476 01478 #define CKA_START_DATE 01479 01481 #define CKA_END_DATE 01482 01484 #define CKA_DERIVE 01485 01487 #define CKA_LOCAL 01488 01490 #define CKA_KEY_GEN_MECHANISM 01491 01493 #define CKA_SUBJECT 01494 01496 #define CKA_ENCRYPT 01497 01499 #define CKA_VERIFY 01500 01502 #define CKA_VERIFY_RECOVER 01503 01505 #define CKA_WRAP 01506 01508 #define CKA_TRUSTED 01509 01511 #define CKA_MODULUS 01512 01514 #define CKA_MODULUS_BITS 01515 01517 #define CKA_PUBLIC_EXPONENT 01518 01519 01520 01522 #define CKA_PRIME 01523 01525 #define CKA_SUBPRIME 01526 01528 #define CKA_BASE 01529 01531 #define CKA_VALUE 01532 01533 01534 01536 #define CKA_EC_PARAMS 01537 01539 #define CKA_EC_POINT 01540 01541 01542 01544 #define CKA_PRIME 01545 01547 #define CKA_BASE 01548 01550 #define CKA_VALUE 01551 01552 01553 01555 #define CKA_PRIME 01556 01558 #define CKA_BASE 01559 01561 #define CKA_SUBPRIME 01562 01564 #define CKA_VALUE 01565 01566 01567 01569 #define CKA_PRIME 01570 01572 #define CKA_SUBPRIME 01573 01575 #define CKA_BASE 01576 01578 #define CKA_VALUE 01579 01580 01581 01583 #define CKA_SUBJECT 01584 01586 #define CKA_SENSITIVE 01587 01589 #define CKA_SECONDARY_AUTH 01590 01592 #define CKA_AUTH_PIN_FLAGS 01593 01595 #define CKA_DECRYPT 01596 01598 #define CKA_SIGN 01599 01601 #define CKA_SIGN_RECOVER 01602 01604 #define CKA_UNWRAP 01605 01607 #define CKA_EXTRACTABLE 01608 01610 #define CKA_ALWAYS_SENSITIVE 01611 01613 #define CKA_NEVER_EXTRACTABLE 01614 01616 #define CKA_MODULUS 01617 01619 #define CKA_PUBLIC_EXPONENT 01620 01622 #define CKA_PRIVATE_EXPONENT 01623 01625 #define CKA_PRIME_1 01626 01628 #define CKA_PRIME_2 01629 01631 #define CKA_EXPONENT_1 01632 01634 #define CKA_EXPONENT_2 01635 01637 #define CKA_COEFFICIENT 01638 01639 01640 01642 #define CKA_PRIME 01643 01645 #define CKA_SUBPRIME 01646 01648 #define CKA_BASE 01649 01651 #define CKA_VALUE 01652 01653 01654 01656 #define CKA_EC_PARAMS 01657 01659 #define CKA_VALUE 01660 01661 01662 01664 #define CKA_PRIME 01665 01667 #define CKA_BASE 01668 01670 #define CKA_VALUE 01671 01673 #define CKA_VALUE_BITS 01674 01675 01676 01678 #define CKA_PRIME 01679 01681 #define CKA_BASE 01682 01684 #define CKA_SUBPRIME 01685 01687 #define CKA_VALUE 01688 01689 01690 01692 #define CKA_PRIME 01693 01695 #define CKA_SUBPRIME 01696 01698 #define CKA_BASE 01699 01701 #define CKA_VALUE 01702 01703 01704 01706 #define CKA_SENSITIVE 01707 01709 #define CKA_ENCRYPT 01710 01712 #define CKA_DECRYPT 01713 01715 #define CKA_SIGN 01716 01718 #define CKA_VERIFY 01719 01721 #define CKA_WRAP 01722 01724 #define CKA_UNWRAP 01725 01727 #define CKA_EXTRACTABLE 01728 01730 #define CKA_ALWAYS_SENSITIVE 01731 01733 #define CKA_NEVER_EXTRACTABLE 01734 01736 #define CKA_VALUE 01737 01739 #define CKA_VALUE_LEN 01740 01741 01742 01744 #define CKA_VALUE 01745 01747 #define CKA_VALUE_LEN 01748 01749 01750 01752 #define CKA_VALUE 01753 01755 #define CKA_VALUE_LEN 01756 01757 01758 01760 #define CKA_VALUE 01761 01763 #define CKA_VALUE_LEN 01764 01765 01766 01768 #define CKA_VALUE 01769 01771 #define CKA_VALUE_LEN 01772 01773 01774 01776 #define CKA_VALUE 01777 01778 01779 01781 #define CKA_VALUE 01782 01783 01784 01786 #define CKA_VALUE 01787 01788 01789 01791 #define CKA_VALUE 01792 01794 #define CKA_VALUE_LEN 01795 01796 01797 01799 #define CKA_VALUE 01800 01802 #define CKA_VALUE_LEN 01803 01804 01805 01807 #define CKA_VALUE 01808 01810 #define CKA_VALUE_LEN 01811 01812 01813 01815 #define CKA_VALUE 01816 01817 01818 01820 #define CKA_VALUE 01821 01822 01823 01825 #define CKA_VALUE 01826 01827 01828 01830 #define CKA_VALUE 01831 01832 01833 01835 #define CKA_VALUE 01836 01837 01838 01840 #define CKA_KEY_TYPE 01841 01843 #define CKA_LOCAL 01844 01846 #define CKA_PRIME 01847 01849 #define CKA_SUBPRIME 01850 01852 #define CKA_BASE 01853 01855 #define CKA_PRIME_BITS 01856 01857 01858 01860 #define CKA_PRIME 01861 01863 #define CKA_BASE 01864 01866 #define CKA_PRIME_BITS 01867 01868 01869 01871 #define CKA_PRIME 01872 01874 #define CKA_BASE 01875 01877 #define CKA_SUBPRIME 01878 01880 #define CKA_PRIME_BITS 01881 01883 #define CKA_SUBPRIME_BITS 01884 01885 01886 01888 #define CKR_GENERAL_ERROR 01889 01891 #define CKR_HOST_MEMORY 01892 01894 #define CKR_FUNCTION_FAILED 01895 01897 #define CKR_OK 01898 01900 #define CKR_SESSION_HANDLE_INVALID 01901 01903 #define CKR_DEVICE_REMOVED 01904 01906 #define CKR_SESSION_CLOSED 01907 01909 #define CKR_DEVICE_MEMORY 01910 01912 #define CKR_DEVICE_ERROR 01913 01915 #define CKR_TOKEN_NOT_PRESENT 01916 01918 #define CKR_DEVICE_REMOVED 01919 01921 #define CKR_CANCEL 01922 01924 #define CKR_MUTEX_BAD 01925 01927 #define CKR_MUTEX_NOT_LOCKED 01928 01930 #define CKR_ARGUMENTS_BAD 01931 01933 #define CKR_ATTRIBUTE_READ_ONLY 01934 01936 #define CKR_ATTRIBUTE_SENSITIVE 01937 01939 #define CKR_ATTRIBUTE_TYPE_INVALID 01940 01942 #define CKR_ATTRIBUTE_VALUE_INVALID 01943 01945 #define CKR_BUFFER_TOO_SMALL 01946 01948 #define CKR_CANT_LOCK 01949 01951 #define CKR_CRYPTOKI_ALREADY_INITIALIZED 01952 01954 #define CKR_CRYPTOKI_NOT_INITIALIZED 01955 01957 #define CKR_DATA_INVALID 01958 01960 #define CKR_DATA_LEN_RANGE 01961 01963 #define CKR_DOMAIN_PARAMS_INVALID 01964 01966 #define CKR_ENCRYPTED_DATA_INVALID 01967 01969 #define CKR_ENCRYPTED_DATA_LEN_RANGE 01970 01972 #define CKR_FUNCTION_CANCELED 01973 01975 #define CKR_FUNCTION_NOT_PARALLEL 01976 01978 #define CKR_FUNCTION_NOT_SUPPORTED 01979 01981 #define CKR_INFORMATION_SENSITIVE 01982 01984 #define CKR_KEY_CHANGED 01985 01987 #define CKR_KEY_FUNCTION_NOT_PERMITTED 01988 01990 #define CKR_KEY_HANDLE_INVALID 01991 01993 #define CKR_KEY_INDIGESTIBLE 01994 01996 #define CKR_KEY_NEEDED 01997 01999 #define CKR_KEY_NOT_NEEDED 02000 02002 #define CKR_KEY_NOT_WRAPPABLE 02003 02005 #define CKR_KEY_SIZE_RANGE 02006 02008 #define CKR_KEY_TYPE_INCONSISTENT 02009 02011 #define CKR_KEY_UNEXTRACTABLE 02012 02014 #define CKR_MECHANISM_INVALID 02015 02017 #define CKR_MECHANISM_PARAM_INVALID 02018 02020 #define CKR_NEED_TO_CREATE_THREADS 02021 02023 #define CKR_NO_EVENT 02024 02026 #define CKR_OBJECT_HANDLE_INVALID 02027 02029 #define CKR_OPERATION_ACTIVE 02030 02032 #define CKR_OPERATION_NOT_INITIALIZED 02033 02035 #define CKR_PIN_EXPIRED 02036 02038 #define CKR_PIN_INCORRECT 02039 02041 #define CKR_PIN_INVALID 02042 02044 #define CKR_PIN_LEN_RANGE 02045 02047 #define CKR_PIN_LOCKED 02048 02050 #define CKR_RANDOM_NO_RNG 02051 02053 #define CKR_RANDOM_SEED_NOT_SUPPORTED 02054 02056 #define CKR_SAVED_STATE_INVALID 02057 02059 #define CKR_SESSION_COUNT 02060 02062 #define CKR_SESSION_EXISTS 02063 02065 #define CKR_SESSION_PARALLEL_NOT_SUPPORTED 02066 02068 #define CKR_SESSION_READ_ONLY 02069 02071 #define CKR_SESSION_READ_ONLY_EXISTS 02072 02074 #define CKR_SESSION_READ_WRITE_SO_EXISTS 02075 02077 #define CKR_SIGNATURE_LEN_RANGE 02078 02080 #define CKR_SIGNATURE_INVALID 02081 02083 #define CKR_SLOT_ID_INVALID 02084 02086 #define CKR_STATE_UNSAVEABLE 02087 02089 #define CKR_TEMPLATE_INCOMPLETE 02090 02092 #define CKR_TEMPLATE_INCONSISTENT 02093 02095 #define CKR_TOKEN_NOT_RECOGNIZED 02096 02098 #define CKR_TOKEN_WRITE_PROTECTED 02099 02101 #define CKR_UNWRAPPING_KEY_HANDLE_INVALID 02102 02104 #define CKR_UNWRAPPING_KEY_SIZE_RANGE 02105 02107 #define CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT 02108 02110 #define CKR_USER_ALREADY_LOGGED_IN 02111 02113 #define CKR_USER_ANOTHER_ALREADY_LOGGED_IN 02114 02116 #define CKR_USER_NOT_LOGGED_IN 02117 02119 #define CKR_USER_PIN_NOT_INITIALIZED 02120 02122 #define CKR_USER_TOO_MANY_TYPES 02123 02125 #define CKR_USER_TYPE_INVALID 02126 02128 #define CKR_WRAPPED_KEY_INVALID 02129 02131 #define CKR_WRAPPED_KEY_LEN_RANGE 02132 02134 #define CKR_WRAPPING_KEY_HANDLE_INVALID 02135 02137 #define CKR_WRAPPING_KEY_SIZE_RANGE 02138 02140 #define CKR_WRAPPING_KEY_TYPE_INCONSISTENT 02141 02226 CK_RV C_Initialize( CK_VOID_PTR pInitArgs); 02227 02228 02259 CK_RV C_Finalize( CK_VOID_PTR pReserved); 02260 02261 02275 CK_RV C_GetInfo( CK_INFO_PTR pInfo); 02276 02277 02298 CK_RV C_GetFunctionList( CK_FUNCTION_LIST_PTR_PTR ppFunctionList); 02299 02300 02352 CK_RV C_GetSlotList( CK_BBOOL tokenPresent, CK_SLOT_ID_PTR pSlotList, CK_ULONG_PTR pulCount); 02353 02354 02368 CK_RV C_GetSlotInfo( CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo); 02369 02370 02387 CK_RV C_GetTokenInfo( CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo); 02388 02389 02447 CK_RV C_WaitForSlotEvent( CK_FLAGS flags, CK_SLOT_ID_PTR pSlot, CK_VOID_PTR pReserved); 02448 02449 02486 CK_RV C_GetMechanismList( CK_SLOT_ID slotID, CK_MECHANISM_TYPE_PTR pMechanismList, CK_ULONG_PTR pulCount); 02487 02488 02506 CK_RV C_GetMechanismInfo( CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, CK_MECHANISM_INFO_PTR pInfo); 02507 02508 02578 CK_RV C_InitToken( CK_SLOT_ID slotID, CK_UTF8CHAR_PTR pPin, CK_ULONG ulPinLen, CK_UTF8CHAR_PTR pLabel); 02579 02580 02619 CK_RV C_InitPIN( CK_SESSION_HANDLE hSession, CK_UTF8CHAR_PTR pPin, CK_ULONG ulPinLen); 02620 02621 02664 CK_RV C_SetPIN( CK_SESSION_HANDLE hSession, CK_UTF8CHAR_PTR pOldPin, CK_ULONG ulOldLen, CK_UTF8CHAR_PTR pNewPin, CK_ULONG ulNewLen); 02665 02666 02713 CK_RV C_OpenSession( CK_SLOT_ID slotID, CK_FLAGS flags, CK_VOID_PTR pApplication, CK_NOTIFY Notify, CK_SESSION_HANDLE_PTR phSession); 02714 02715 02753 CK_RV C_CloseSession( CK_SESSION_HANDLE hSession); 02754 02755 02782 CK_RV C_CloseAllSessions( CK_SLOT_ID slotID); 02783 02784 02801 CK_RV C_GetSessionInfo( CK_SESSION_HANDLE hSession, CK_SESSION_INFO_PTR pInfo); 02802 02803 02877 CK_RV C_GetOperationState( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pOperationState, CK_ULONG_PTR pulOperationStateLen); 02878 02879 02961 CK_RV C_SetOperationState( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pOperationState, CK_ULONG ulOperationStateLen, CK_OBJECT_HANDLE hEncryptionKey, CK_OBJECT_HANDLE hAuthenticationKey); 02962 02963 03013 CK_RV C_Login( CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, CK_UTF8CHAR_PTR pPin, CK_ULONG ulPinLen); 03014 03015 03047 CK_RV C_Logout( CK_SESSION_HANDLE hSession); 03048 03049 03084 CK_RV C_CreateObject( CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phObject); 03085 03086 03130 CK_RV C_CopyObject( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phNewObject); 03131 03132 03151 CK_RV C_DestroyObject( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject); 03152 03153 03178 CK_RV C_GetObjectSize( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ULONG_PTR pulSize); 03179 03180 03242 CK_RV C_GetAttributeValue( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount); 03243 03244 03277 CK_RV C_SetAttributeValue( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount); 03278 03279 03323 CK_RV C_FindObjectsInit( CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount); 03324 03325 03347 CK_RV C_FindObjects( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE_PTR phObject, CK_ULONG ulMaxObjectCount, CK_ULONG_PTR pulObjectCount); 03348 03349 03365 CK_RV C_FindObjectsFinal( CK_SESSION_HANDLE hSession); 03366 03367 03398 CK_RV C_EncryptInit( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey); 03399 03400 03445 CK_RV C_Encrypt( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen, CK_BYTE_PTR pEncryptedData, CK_ULONG_PTR pulEncryptedDataLen); 03446 03447 03479 CK_RV C_EncryptUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ULONG ulPartLen, CK_BYTE_PTR pEncryptedPart, CK_ULONG_PTR pulEncryptedPartLen); 03480 03481 03515 CK_RV C_EncryptFinal( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pLastEncryptedPart, CK_ULONG_PTR pulLastEncryptedPartLen); 03516 03517 03548 CK_RV C_DecryptInit( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey); 03549 03550 03593 CK_RV C_Decrypt( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncryptedData, CK_ULONG ulEncryptedDataLen, CK_BYTE_PTR pData, CK_ULONG_PTR pulDataLen); 03594 03595 03627 CK_RV C_DecryptUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncryptedPart, CK_ULONG ulEncryptedPartLen, CK_BYTE_PTR pPart, CK_ULONG_PTR pulPartLen); 03628 03629 03662 CK_RV C_DecryptFinal( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pLastPart, CK_ULONG_PTR pulLastPartLen); 03663 03664 03690 CK_RV C_DigestInit( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism); 03691 03692 03729 CK_RV C_Digest( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen, CK_BYTE_PTR pDigest, CK_ULONG_PTR pulDigestLen); 03730 03731 03753 CK_RV C_DigestUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ULONG ulPartLen); 03754 03755 03780 CK_RV C_DigestKey( CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey); 03781 03782 03810 CK_RV C_DigestFinal( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pDigest, CK_ULONG_PTR pulDigestLen); 03811 03812 03842 CK_RV C_SignInit( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey); 03843 03844 03880 CK_RV C_Sign( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen, CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen); 03881 03882 03903 CK_RV C_SignUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ULONG ulPartLen); 03904 03905 03934 CK_RV C_SignFinal( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen); 03935 03936 03965 CK_RV C_SignRecoverInit( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey); 03966 03967 03998 CK_RV C_SignRecover( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen, CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen); 03999 04000 04031 CK_RV C_VerifyInit( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey); 04032 04033 04071 CK_RV C_Verify( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen, CK_BYTE_PTR pSignature, CK_ULONG ulSignatureLen); 04072 04073 04094 CK_RV C_VerifyUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ULONG ulPartLen); 04095 04096 04127 CK_RV C_VerifyFinal( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature, CK_ULONG ulSignatureLen); 04128 04129 04157 CK_RV C_VerifyRecoverInit( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey); 04158 04159 04201 CK_RV C_VerifyRecover( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature, CK_ULONG ulSignatureLen, CK_BYTE_PTR pData, CK_ULONG_PTR pulDataLen); 04202 04203 04241 CK_RV C_DigestEncryptUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ULONG ulPartLen, CK_BYTE_PTR pEncryptedPart, CK_ULONG_PTR pulEncryptedPartLen); 04242 04243 04322 CK_RV C_DecryptDigestUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncryptedPart, CK_ULONG ulEncryptedPartLen, CK_BYTE_PTR pPart, CK_ULONG_PTR pulPartLen); 04323 04324 04360 CK_RV C_SignEncryptUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, CK_ULONG ulPartLen, CK_BYTE_PTR pEncryptedPart, CK_ULONG_PTR pulEncryptedPartLen); 04361 04362 04440 CK_RV C_DecryptVerifyUpdate( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncryptedPart, CK_ULONG ulEncryptedPartLen, CK_BYTE_PTR pPart, CK_ULONG_PTR pulPartLen); 04441 04442 04483 CK_RV C_GenerateKey( CK_SESSION_HANDLE hSession CK_MECHANISM_PTR pMechanism, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phKey); 04484 04485 04536 CK_RV C_GenerateKeyPair( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_ATTRIBUTE_PTR pPublicKeyTemplate, CK_ULONG ulPublicKeyAttributeCount, CK_ATTRIBUTE_PTR pPrivateKeyTemplate, CK_ULONG ulPrivateKeyAttributeCount, CK_OBJECT_HANDLE_PTR phPublicKey, CK_OBJECT_HANDLE_PTR phPrivateKey); 04537 04538 04595 CK_RV C_WrapKey( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hWrappingKey, CK_OBJECT_HANDLE hKey, CK_BYTE_PTR pWrappedKey, CK_ULONG_PTR pulWrappedKeyLen); 04596 04597 04650 CK_RV C_UnwrapKey( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hUnwrappingKey, CK_BYTE_PTR pWrappedKey, CK_ULONG ulWrappedKeyLen, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount, CK_OBJECT_HANDLE_PTR phKey); 04651 04652 04693 CK_RV C_DeriveKey( CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hBaseKey, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount, CK_OBJECT_HANDLE_PTR phKey); 04694 04695 04712 CK_RV C_SeedRandom( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSeed, CK_ULONG ulSeedLen); 04713 04714 04733 CK_RV C_GenerateRandom( CK_SESSION_HANDLE hSession, CK_BYTE_PTR pRandomData, CK_ULONG ulRandomLen ); 04734 04735 04746 CK_RV C_GetFunctionStatus( CK_SESSION_HANDLE hSession); 04747 04748 04759 CK_RV C_CancelFunction( CK_SESSION_HANDLE hSession); 04760 04761 04769 typedef CK_ULONG CK_RSA_PKCS_MGF_TYPE; 04770 04771 04773 typedef CK_RSA_PKCS_MGF_TYPE CK_PTR CK_RSA_PKCS_MGF_TYPE_PTR; 04780 typedef CK_ULONG CK_RSA_PKCS_OAEP_SOURCE_TYPE; 04781 04782 04784 typedef CK_RSA_PKCS_OAEP_SOURCE_TYPE CK_PTR CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR; 04785 04786 04805 typedef struct CK_RSA_PKCS_OAEP_PARAMS { 04807 CK_MECHANISM_TYPE hashAlg; 04809 CK_RSA_PKCS_MGF_TYPE mgf; 04811 CK_RSA_PKCS_OAEP_SOURCE_TYPE source; 04813 CK_VOID_PTR pSourceData; 04815 CK_ULONG ulSourceDataLen; 04816 } CK_RSA_PKCS_OAEP_PARAMS; 04817 04818 04820 typedef CK_RSA_PKCS_OAEP_PARAMS CK_PTR CK_RSA_PKCS_OAEP_PARAMS_PTR; 04821 04822 04844 typedef struct CK_RSA_PKCS_PSS_PARAMS { 04845 CK_MECHANISM_TYPE hashAlg; 04847 CK_RSA_PKCS_MGF_TYPE mgf; 04849 CK_ULONG sLen; 04850 } CK_RSA_PKCS_PSS_PARAMS; 04851 04852 04854 typedef CK_RSA_PKCS_PSS_PARAMS CK_PTR CK_RSA_PKCS_PSS_PARAMS_PTR; 04862 typedef CK_ULONG CK_EC_KDF_TYPE; 04863 04864 04866 typedef CK_EC_KDF_TYPE CK_PTR CK_EC_KDF_TYPE_PTR; 04867 04868 04903 typedef struct CK_ECDH1_DERIVE_PARAMS { 04905 CK_EC_KDF_TYPE kdf; 04907 CK_ULONG ulSharedDataLen; 04909 CK_BYTE_PTR pSharedData; 04911 CK_ULONG ulPublicDataLen; 04913 CK_BYTE_PTR pPublicData; 04914 } CK_ECDH1_DERIVE_PARAMS; 04915 04916 04918 typedef CK_ECDH1_DERIVE_PARAMS CK_PTR CK_ECDH1_DERIVE_PARAMS_PTR; 04919 04920 04950 typedef struct CK_ECDH2_DERIVE_PARAMS { 04952 CK_EC_KDF_TYPE kdf; 04954 CK_ULONG ulSharedDataLen; 04956 CK_BYTE_PTR pSharedData; 04958 CK_ULONG ulPublicDataLen; 04960 CK_BYTE_PTR pPublicData; 04962 CK_ULONG ulPrivateDataLen; 04964 CK_OBJECT_HANDLE hPrivateData; 04966 CK_ULONG ulPublicDataLen2; 04968 CK_BYTE_PTR pPublicData2; 04969 } CK_ECDH2_DERIVE_PARAMS; 04970 04971 04973 typedef CK_ECDH2_DERIVE_PARAMS CK_PTR CK_ECDH2_DERIVE_PARAMS_PTR; 04981 typedef CK_ULONG CK_X9_42_DH_KDF_TYPE; 04982 04983 04985 typedef CK_X9_42_DH_KDF_TYPE CK_PTR CK_X9_42_DH_KDF_TYPE_PTR; 04986 04987 05029 typedef struct CK_X9_42_DH1_DERIVE_PARAMS { 05031 CK_X9_42_DH_KDF_TYPE kdf; 05033 CK_ULONG ulOtherInfoLen; 05035 CK_BYTE_PTR pOtherInfo; 05037 CK_ULONG ulPublicDataLen; 05039 CK_BYTE_PTR pPublicData; 05040 } CK_X9_42_DH1_DERIVE_PARAMS; 05041 05042 05044 typedef CK_X9_42_DH1_DERIVE_PARAMS CK_PTR CK_X9_42_DH1_DERIVE_PARAMS_PTR; 05045 05046 05082 typedef struct CK_X9_42_DH2_DERIVE_PARAMS { 05084 CK_X9_42_DH_KDF_TYPE kdf; 05086 CK_ULONG ulOtherInfoLen; 05088 CK_BYTE_PTR pOtherInfo; 05090 CK_ULONG ulPublicDataLen; 05092 CK_BYTE_PTR pPublicData; 05094 CK_ULONG ulPrivateDataLen; 05096 CK_OBJECT_HANDLE hPrivateData; 05098 CK_ULONG ulPublicDataLen2; 05100 CK_BYTE_PTR pPublicData2; 05101 } CK_X9_42_DH2_DERIVE_PARAMS; 05102 05103 05105 typedef CK_X9_42_DH2_DERIVE_PARAMS CK_PTR CK_X9_42_DH2_DERIVE_PARAMS_PTR; 05106 05107 05138 typedef struct CK_KEA_DERIVE_PARAMS { 05140 CK_BBOOL isSender; 05142 CK_ULONG ulRandomLen; 05144 CK_BYTE_PTR pRandomA; 05146 CK_BYTE_PTR pRandomB; 05148 CK_ULONG ulPublicDataLen; 05150 CK_BYTE_PTR pPublicData; 05151 } CK_KEA_DERIVE_PARAMS; 05152 05153 05155 typedef CK_KEA_DERIVE_PARAMS CK_PTR CK_KEA_DERIVE_PARAMS_PTR; 05156 05157 05166 typedef CK_ULONG CK_RC2_PARAMS; 05167 05168 05170 typedef CK_RC2_PARAMS CK_PTR CK_RC2_PARAMS_PTR; 05171 05172 05197 typedef struct CK_RC2_CBC_PARAMS { 05199 CK_ULONG ulEffectiveBits; 05201 CK_BYTE iv[8]; 05202 } CK_RC2_CBC_PARAMS; 05203 05204 05206 typedef CK_RC2_CBC_PARAMS CK_PTR CK_RC2_CBC_PARAMS_PTR; 05207 05208 05224 typedef struct CK_RC2_MAC_GENERAL_PARAMS { 05226 CK_ULONG ulEffectiveBits; 05228 CK_ULONG ulMacLength; 05229 } CK_RC2_MAC_GENERAL_PARAMS; 05230 05231 05233 typedef CK_RC2_MAC_GENERAL_PARAMS CK_PTR CK_RC2_MAC_GENERAL_PARAMS_PTR; 05234 05235 05260 typedef struct CK_RC5_PARAMS { 05262 CK_ULONG ulWordsize; 05264 CK_ULONG ulRounds; 05265 } CK_RC5_PARAMS; 05266 05267 05269 typedef CK_RC5_PARAMS CK_PTR CK_RC5_PARAMS_PTR; 05270 05271 05298 typedef struct CK_RC5_CBC_PARAMS { 05300 CK_ULONG ulWordsize; 05302 CK_ULONG ulRounds; 05304 CK_BYTE_PTR pIv; 05306 CK_ULONG ulIvLen; 05307 } CK_RC5_CBC_PARAMS; 05308 05309 05311 typedef CK_RC5_CBC_PARAMS CK_PTR CK_RC5_CBC_PARAMS_PTR; 05312 05313 05330 typedef struct CK_RC5_MAC_GENERAL_PARAMS { 05332 CK_ULONG ulWordsize; 05334 CK_ULONG ulRounds; 05336 CK_ULONG ulMacLength; 05337 } CK_RC5_MAC_GENERAL_PARAMS; 05338 05339 05341 typedef CK_RC5_MAC_GENERAL_PARAMS CK_PTR CK_RC5_MAC_GENERAL_PARAMS_PTR; 05352 typedef CK_ULONG CK_MAC_GENERAL_PARAMS; 05353 05354 05356 typedef CK_MAC_GENERAL_PARAMS CK_PTR CK_MAC_GENERAL_PARAMS_PTR; 05357 05358 05392 typedef struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { 05394 CK_ULONG ulPasswordLen; 05396 CK_BYTE_PTR pPassword; 05398 CK_ULONG ulPublicDataLen; 05400 CK_BYTE_PTR pPublicData; 05402 CK_ULONG ulPandGLen; 05404 CK_ULONG ulQLen; 05406 CK_ULONG ulRandomLen; 05408 CK_BYTE_PTR pRandomA; 05410 CK_BYTE_PTR pPrimeP; 05412 CK_BYTE_PTR pBaseG; 05414 CK_BYTE_PTR pSubprimeQ; 05415 } CK_SKIPJACK_PRIVATE_WRAP_PARAMS; 05416 05417 05419 typedef CK_PRIVATE_WRAP_PARAMS CK_PTR CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR; 05420 05421 05449 typedef struct CK_SKIPJACK_RELAYX_PARAMS { 05451 CK_ULONG ulOldWrappedXLen; 05453 CK_BYTE_PTR pOldWrappedX; 05455 CK_ULONG ulOldPasswordLen; 05457 CK_BYTE_PTR pOldPassword; 05459 CK_ULONG ulOldPublicDataLen; 05461 CK_BYTE_PTR pOldPublicData; 05463 CK_ULONG ulOldRandomLen; 05465 CK_BYTE_PTR pOldRandomA; 05467 CK_ULONG ulNewPasswordLen; 05469 CK_BYTE_PTR pNewPassword; 05471 CK_ULONG ulNewPublicDataLen; 05473 CK_BYTE_PTR pNewPublicData; 05475 CK_ULONG ulNewRandomLen; 05477 CK_BYTE_PTR pNewRandomA; 05478 } CK_SKIPJACK_RELAYX_PARAMS; 05479 05480 05482 typedef CK_SKIPJACK_RELAYX_PARAMS CK_PTR CK_SKIPJACK_RELAYX_PARAMS_PTR; 05483 05484 05503 typedef struct CK_PBE_PARAMS { 05505 CK_BYTE_PTR pInitVector; 05507 CK_UTF8CHAR_PTR pPassword; 05509 CK_ULONG ulPasswordLen; 05511 CK_BYTE_PTR pSalt; 05513 CK_ULONG ulSaltLen; 05515 CK_ULONG ulIteration; 05516 } CK_PBE_PARAMS; 05517 05518 05520 typedef CK_PBE_PARAMS CK_PTR CK_PBE_PARAMS_PTR; 05527 typedef CK_ULONG CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; 05528 05529 05531 typedef CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE CK_PTR CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR; 05538 typedef CK_ULONG CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; 05539 05540 05542 typedef CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE CK_PTR CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR; 05543 05544 05567 typedef struct CK_PKCS5_PBKD2_PARAMS { 05569 CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE saltSource; 05571 CK_VOID_PTR pSaltSourceData; 05573 CK_ULONG ulSaltSourceDataLen; 05575 CK_ULONG iterations; 05577 CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE prf; 05579 CK_VOID_PTR pPrfData; 05580 CK_ULONG ulPrfDataLen;CK_UTF8CHAR_PTR pPassword; 05582 CK_ULONG_PTR ulPasswordLen; 05583 } CK_PKCS5_PBKD2_PARAMS; 05584 05585 05587 typedef CK_PKCS5_PBKD2_PARAMS CK_PTR CK_PKCS5_PBKD2_PARAMS_PTR; 05588 05589 05606 typedef struct CK_KEY_WRAP_SET_OAEP_PARAMS { 05608 CK_BYTE bBC; 05610 CK_BYTE_PTR pX; 05612 CK_ULONG ulXLen; 05613 } CK_KEY_WRAP_SET_OAEP_PARAMS; 05614 05615 05617 typedef CK_KEY_WRAP_SET_OAEP_PARAMS CK_PTR CK_KEY_WRAP_SET_OAEP_PARAMS_PTR; 05618 05619 05643 typedef struct CK_SSL3_RANDOM_DATA { 05645 CK_BYTE_PTR pClientRandom; 05647 CK_ULONG ulClientRandomLen; 05649 CK_BYTE_PTR pServerRandom; 05651 CK_ULONG ulServerRandomLen; 05652 } CK_SSL3_RANDOM_DATA; 05653 05654 05655 05656 05687 typedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { 05689 CK_SSL3_RANDOM_DATA RandomInfo; 05691 CK_VERSION_PTR pVersion; 05692 } CK_SSL3_MASTER_KEY_DERIVE_PARAMS; 05693 05694 05696 typedef CK_SSL3_MASTER_KEY_DERIVE_PARAMS CK_PTR CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR; 05697 05698 05727 typedef struct CK_SSL3_KEY_MAT_OUT { 05729 CK_OBJECT_HANDLE hClientMacSecret; 05731 CK_OBJECT_HANDLE hServerMacSecret; 05733 CK_OBJECT_HANDLE hClientKey; 05735 CK_OBJECT_HANDLE hServerKey; 05737 CK_BYTE_PTR pIVClient; 05739 CK_BYTE_PTR pIVServer; 05740 } CK_SSL3_KEY_MAT_OUT; 05741 05742 05744 typedef CK_SSL3_KEY_MAT_OUT CK_PTR CK_SSL3_KEY_MAT_OUT_PTR; 05745 05746 05766 typedef struct CK_SSL3_KEY_MAT_PARAMS { 05768 CK_ULONG ulMacSizeInBits; 05770 CK_ULONG ulKeySizeInBits; 05772 CK_ULONG ulIVSizeInBits; 05774 CK_BBOOL bIsExport; 05776 CK_SSL3_RANDOM_DATA RandomInfo; 05778 CK_SSL3_KEY_MAT_OUT_PTR pReturnedKeyMaterial; 05779 } CK_SSL3_KEY_MAT_PARAMS; 05780 05781 05783 typedef CK_SSL3_KEY_MAT_PARAMS CK_PTR CK_SSL3_KEY_MAT_PARAMS_PTR; 05784 05785 05808 typedef struct CK_KEY_DERIVATION_STRING_DATA { 05810 CK_BYTE_PTR pData; 05812 CK_ULONG ulLen; 05813 } CK_KEY_DERIVATION_STRING_DATA; 05814 05815 05824 typedef CK_ULONG CK_EXTRACT_PARAMS; 05825 05826 05828 typedef CK_EXTRACT_PARAMS CK_PTR CK_EXTRACT_PARAMS_PTR; 05829 05830