1
0
mirror of https://github.com/opencryptoki/opencryptoki.git synced 2026-10-27 06:12:56 +03:00

Commit Graph

  • 258fe53426 Replace OCK_LOG with new TRACE facility in tpm token. Joy Latten 2015-02-03 13:45:55 -06:00
  • be1ae0cdfb Replace OCK_LOG with new TRACE facility in ICSF token. Joy Latten 2015-02-03 13:45:15 -06:00
  • d27efe89cd Replace OCK_LOG with new TRACE facility in cca token. Joy Latten 2015-02-03 13:44:32 -06:00
  • a3ada0ab56 Replace OCK_LOG with new TRACE facility in ica token. Joy Latten 2015-02-03 13:44:01 -06:00
  • 3d077bf480 Replace OCK_LOG wth new TRACE facility in soft token. Joy Latten 2015-02-03 13:43:33 -06:00
  • 078b39c419 Replace OCK_LOG with new TRACE facility in common files. Joy Latten 2015-02-03 14:31:06 -06:00
  • 0d718d8457 Replace OCK_LOG with TRACE equivalents in api. Joy Latten 2015-02-03 12:36:21 -06:00
  • c83048f63d Initialize the new tracing facility in the api and in the common token code. Joy Latten 2015-02-03 12:34:30 -06:00
  • c9747160cc Add a new tracing facility that will replace current log facility. Claudio Siqueira De Carvalho 2015-02-03 12:30:02 -06:00
  • afa004e43d Since confname is in Slot_Info_t_64 structure, dont need to pass it separately in DL_Load_and_Init(). Joy Latten 2015-02-03 12:10:07 -06:00
  • 2475aaee11 Make root run all the pkcs11 commands without the need to be a member of the pkcs11 group. Harald Freudenberger 2014-12-02 16:34:28 -06:00
  • 86a2f71074 ICSF token: Skip rsa testcases that have public exponent or modbit settings that icsf does not support. Joy Latten 2014-11-11 17:47:46 -06:00
  • 5ca8739c93 ICSF Token: C_SignUpdate was sometimes segfaulting and testcases were reporting that resulting signature did not match expected signature. Verification tests were also failing. ICSF token Was not copying chain data and setting initiated flag appropriately. Segfault occurred because needed to check clear text to see if not null before ber encoding. Also was not setting verify flag. Joy Latten 2014-11-11 17:45:18 -06:00
  • eca2c25e17 EP11: Added zero size check for EncryptUpdate, DecryptUpdate, SignUpdate and VerifyUpdate. Added check in rsaupdate test suite to skip not supported key sizes (non 128 bit granularity) Ingo Tuchscherer 2014-11-10 13:27:26 -06:00
  • 3ed4a11af6 Refactor ica token's sha. Harald Freudenberger 2014-11-05 12:42:00 -06:00
  • a475f1e24f Update rsa testcases to allow various sized chunks of input including zero-length input to sign/verify update testcases. Joy Latten 2014-11-05 12:39:37 -06:00
  • a9007e28d1 Allow C_SignUpdate and C_VerifyUpdate to accept zero-length input. Joy Latten 2014-11-05 12:36:16 -06:00
  • 8afbc0954e Update des testcases to handle various sized chunks of data including null and empty string when calling encrypt/decrypt update. Joy Latten 2014-11-05 12:34:51 -06:00
  • 06817f5d61 - Minor cleanup in des3 testcases. - Update des3 testcases to handle various sized chunks of data including null and smpty string when calling encrypt update and decrypt update. Joy Latten 2014-11-05 12:32:24 -06:00
  • 9a2278a7f4 - Minor cleanup in aes testcases. - Update aes testcases to handle various sized chunks of data including zero-length input when calling encrypt update and decrypt update. Joy Latten 2014-11-05 12:26:41 -06:00
  • 85936bab06 Allow C_EncryptUpdate and C_DecryptUpdate to accept zero-length and null input data. Joy Latten 2014-11-05 12:23:59 -06:00
  • b3d0012d06 Add additional sha1 test vectors. Joy Latten 2014-11-05 12:22:57 -06:00
  • 0184e6034d Add ability to test various-sized chunks, including null and empty-string for input into C_DigestUpdate tests. Joy Latten 2014-11-05 12:21:47 -06:00
  • ec8a75850a Allow C_DigestUpdate to accept NULL or empty string for input without it being an error. Allow common code and token to handle. Joy Latten 2014-11-05 12:18:54 -06:00
  • 1e86226c8a Correctly declare OAEP parameter in RSA Wrap tests to prevent a possible scope issue. Joy Latten 2014-10-29 15:23:12 -05:00
  • 7eb16eba5a Correct testcase vector. 2.4.3.1 Ingo Tuchscherer 2014-10-22 13:49:04 -05:00
  • f53e18bb0f Add several general hmac mechanisms to opencryptoki. The ica token supports these hmacs, and testcases were written for them. But ica token was failing the testcases because opencryptoki did not include them in sign and verify codes. This patch adds them to the sign and verify codes in opencryptoki. Ingo Tuchscherer 2014-10-21 16:07:01 -05:00
  • f28dc082ad pkcsep11_migrate: Fixed parameter handling for pkcsep11_migrate tool - Hexadecimal values allowed for input parameters - Non digit input parameters will be rejected - Extended Error messages with ock error strings - improved man-page Ingo Tuchscherer 2014-10-21 10:00:52 -05:00
  • 643301ab2e The last EP11 test run found a mismatch between specification and runtime for the ep11 log file. Upon creation it should have the group ppcs11 and permissions 640. This patch introduces this behaviour. Harald Freudenberger 2014-09-29 11:41:24 -05:00
  • 2b051ea4eb Bump up version to 3.2 and add info to ChangeLog and elsewhere. v3.2 Joy Latten 2014-09-09 22:48:10 -05:00
  • 75fcd977e0 Check attributes to determine which testcases to run run for ep11 and tpm rsa testcases. Also added pkcscca into gitignore. Joy Latten 2014-09-09 18:31:29 -05:00
  • ba8ea73bde Correctly declare OAEP parameter to prevent a possible scope issue. Joy Latten 2014-09-04 18:35:44 -05:00
  • 13eda6d102 Add documentation (pkcscca manpage and README.cca_stdll) to assist in migrating cca private token objects from v2 to v3. Joy Latten 2014-09-01 22:46:37 -05:00
  • afb086ce22 Add a pkcscca tool to help migrate cca private token objects from v2(encrypted with cca hardware) to v3 (encrypted in software) Joy Latten 2014-08-28 00:36:43 -05:00
  • 17e11781dc The SHAs in ICA token were not always computing correct digests when sent chunks of data in various sizes to the update functions. Joy Latten 2014-09-03 17:56:12 -05:00
  • 7094bfab9c Man page corrections. Joy Latten 2014-08-29 12:40:35 -05:00
  • 7ce033a2a9 The EP11 token has restrictions regarding the modulus size granularity. The modulus length must be a multiple of 128 byte. Therefore some tests will be skipped for the EP11 token. Ingo Tuchscherer 2014-08-25 12:22:04 -05:00
  • 338bd8ba00 A little cleanup on the aes testcase: - whitespace fixes - line breaks on very long printf lines - correction of returncode handling Harald Freudenberger 2014-08-21 17:13:47 -05:00
  • cf264e2e40 Some small fixes and improvements on the digest testcase: - multipart digest update now really breaks down the data into chunks. - fix in regress.h: macro testcase_pass prints out timev differences but start time was nowhere set (causing to print just some kind of random time). Now the testcase_begin* macros set start time and thus the time values printed out make sense. Harald Freudenberger 2014-08-21 16:39:23 -05:00
  • c1c381607b EP11 token: fixed config_dir and conf_name handling Ingo Tuchscherer 2014-08-21 13:37:19 -05:00
  • 9c83f0c74a Remove references to obsoleted pk_config_data and pkcs11_startup in the pkcsslotd man page. Joy Latten 2014-07-23 11:59:39 -05:00
  • ef30ce0bee Minor cleanup and rework: - correlator parameter was still in stdll.h - ica token had wrong parameter list (correlator) in init func - ep11 token logging was done without newline at the end - api_interface OCK_LOG_DEBUG preprocessor macro invocation was split across multible lines Harald Freudenberger 2014-07-17 11:55:00 -05:00
  • 549f17073a ica-stdll is obsoleted, so remove files under ica_stdll. Joy Latten 2014-07-17 11:29:44 -05:00
  • 1ab93e9632 fix several issues found by coverity scan - wrong usage of sizeof on const char * - few filedescriptor and other resource leaks - missing initialization Petr Lautrbach 2014-07-16 17:28:27 -05:00
  • 6168489bca Remove reference to a correlator since it is not used. Joy Latten 2014-07-01 16:38:50 -05:00
  • b4f376f577 Slot_Info_t structure was modified to reduce size of fields but forgot to modify the corresponding Slot_Info_t_64 structure to do the same. This commit corrects the Slot_Info_t_64 structure too. Joy Latten 2014-07-01 15:52:21 -05:00
  • 74c40d51d7 -skip AES_ECB/CBC wrap/unwrap test-case for asymmetric keys. -skip AES_CBC wrap/unwrap test-case for EP11 token only in case of symmetric keys with key length not multiple of AES block size. -add testcase to test that wrapping with aes-cbc and aes-ecb results in an error. Ingo Tuchscherer 2014-06-23 12:29:29 -05:00
  • eb388f604e Fix for AES_ECB/AES_CBC wrap/unwrap: ep11-token now rejects wrap/unwrap attempts with AES_ECB/CBC to non-secret-Keys. Ingo Tuchscherer 2014-06-23 12:14:13 -05:00
  • 047fbf537f pkcs#11v2.20 states that aes-cbc, aes-ecb, cdmf-ecb and des-ecb only wrap secret keys. Fix key_mgr_wrap_key and key_mgr_unwrap_key to comply with this. Also fix some of the return codes in these functions. Joy Latten 2014-06-23 12:12:02 -05:00
  • ee513a14c7 pkcsslotd attempts to transfer ~400000 bytes of slot info via a socket to the api. This is too huge so not all gets through in one read. Also, most of the data is empty allocated space. Reduced the data by: 1. Reduce NUMBER_SLOTS_MANAGED from 32 to 6. There are only 6 possible tokens. This number can be increased when a new token is implemented into opencryptoki. 2. Reduce size of fields in Slot_Info_t_64 structure. These fields are arrays with allocated space equal to PATH_MAX. We only need the name of the file so can use NAME_MAX instead which is smaller. Joy Latten 2014-06-26 16:44:14 -05:00
  • 94a9db32b4 Make it an error if the slot is not specified when running testcases. The default was 0, but if slot 0 is not configured or initialized, this often resulted in a crazy loop. So, just make it mandatory to specify the slot for testing. Joy Latten 2014-06-18 16:01:31 -05:00
  • c4b12c92dc The performance measurement application 'speed' in testcases/misc_tests was somewhat outdated. Did a complete rework with adding some more speed tests and some other improvements. Now these speed tests are by default run: - rsa keygen with 1024, 2048 and 4096 bit keylength - rsa sign/verify test with 1024, 2048 and 4096 bit keylength - rsa en/decrypt test with 1024, 2048 and 4096 bit keylength - des3 en/decrypt test with ECB and CBC mode - aes en/decrypt test with ECB and CBC mode with 128, 192 and 256 keylength - sha1, sha256 and sha512 Harald Freudenberger 2014-06-18 15:20:37 -05:00
  • a7bb055006 OCK version numbers adjusted to 3.1 Ingo Tuchscherer 2014-06-17 11:18:10 -05:00
  • 2d4ab471d4 EP11: corrected some typos in ep11 README Ingo Tuchscherer 2014-06-17 11:15:32 -05:00
  • 876818830a Add testcases to test C_SignUpdate, C_SignFinal, C_VerifyUpdate and C_VerifyFinal for rsa-pkcs and rsa-pss mechanisms using hashes. Joy Latten 2014-06-11 17:18:33 -05:00
  • 2e0ebcd6cd Add CKM_SHA*_RSA_PKCS_PSS mechanisms to soft token. Joy Latten 2014-06-11 17:04:20 -05:00
  • 14e4d8333a Add hashed pss mechanism testcases to rsa. Joy Latten 2014-06-11 16:52:46 -05:00
  • 6d4c937fca Add CKM_SHA*_RSA_PKCS_PSS mechanisms to sign_mgr and verify_mgr. Joy Latten 2014-06-11 16:42:25 -05:00
  • c4d8beec79 Add various rsa_hash_pss_sign and rsa_hash_pss_verify functions to mech_rsa.c to support CKM_SHA*_RSA_PKCS_PSS mechanisms. Joy Latten 2014-06-11 16:35:13 -05:00
  • cb2b67d681 Add generated test vectors and testcases for rsa-pss. Joy Latten 2014-06-11 16:12:47 -05:00
  • ba2a714d71 Add support for CKM_RSA_PKCS_PSS to soft token. Claudio Carvalho 2014-06-11 16:02:41 -05:00
  • a396c1e94c Add support for CKM_RSA_PKCS_PSS to ica token. Joy Latten 2014-06-11 15:56:03 -05:00
  • 31ac61df1a Add support for CKM_RSA_PKCS_PSS mechanism to opencryptoki. Joy Latten 2014-06-11 15:54:37 -05:00
  • a3eb4db0d3 Add rsa_pss_verify to opencryptoki. Joy Latten 2014-06-11 15:53:44 -05:00
  • 7d5f2a4d9b Add rsa_pss_sign support. Joy Latten 2014-06-11 15:50:42 -05:00
  • 2290b44493 Add emsa-pss-encode and emsa-pss_verify to support rsa-pss encoding scheme. Joy Latten 2014-06-11 15:46:58 -05:00
  • 62dda0d199 Support key wrapping for rsa oaep. Add rsa oaep testcases for key wrapping. Joy Latten 2014-06-11 15:45:44 -05:00
  • 51d6c40843 Format mech list for cca, tpm, and icsf tokens. Joy Latten 2014-06-11 15:44:42 -05:00
  • 31dafd377c Format soft token mechanism list. Joy Latten 2014-06-11 15:43:51 -05:00
  • 345188e6dd Add rsa oaep support to soft token. Joy Latten 2014-06-11 15:42:32 -05:00
  • b5ea9c39a1 Add support for SHA algs to the soft token. Joy Latten 2014-06-11 15:41:15 -05:00
  • e2e5d6a033 RSA_OAEP generated test vectors and testcase for encryption and decryption. Joy Latten 2014-06-11 15:34:56 -05:00
  • 6179b79841 Modulus size should be checked against hashsize for both encrypt and decrypt. Joy Latten 2014-06-11 15:28:46 -05:00
  • 25b0202696 Implement CKM_RSA_PKCS_OAEP (decryption) into ica token. Vicky 2014-06-11 15:25:08 -05:00
  • d358bfb689 Implement EME-OAEP encoding schemes. Vicky 2014-06-11 15:20:42 -05:00
  • 4bfdf368d4 Implement CKM_RSA_PKCS_OAEP into ica token. Vicky 2014-06-11 15:17:40 -05:00
  • f1534cce25 Implement single-part CKM_RSA_PKCS_OAEP into ock infrastructure. Vicky 2014-06-11 15:16:12 -05:00
  • f5723903d9 Add mgf1 function to support rsa mechanisms. Joy Latten 2014-06-11 15:14:09 -05:00
  • 271362813a Add compute_sha() to support computing any specified sha using either software or token implementation. Joy Latten 2014-06-11 15:10:03 -05:00
  • 70d268061c For sha1, support a purely software version and a token specific version. This way, opencryptoki can use purely software version for computing administrative things like PIN. Joy Latten 2014-06-11 15:05:58 -05:00
  • ab2f357c08 Change compute_sha to compute_sha1. Joy Latten 2014-06-11 15:04:29 -05:00
  • 39c40599fc Since ica_stdll/Makefile.am is removed, do not include it in the configure script. Joy Latten 2014-06-11 15:03:13 -05:00
  • 2325c32ebd Remove obsoleted tokens from opencryptoki. Vicky 2014-06-11 14:53:51 -05:00
  • 3ca554380b Add new rsa mechanisms to common/tok_spec_struct.h and tok_specific.h Vicky 2014-06-11 14:51:17 -05:00
  • 8df8287156 ica token failed to update digests because length was not being computed correctly in update function. Joy Latten 2014-06-10 18:05:30 -05:00
  • 40d91feb85 Check that out_data is not NULL and has been allocated in cca sha. Joy Latten 2014-05-19 16:15:40 -05:00
  • 5b8d304e05 ep11 is not building because not setting with_zcrypt correctly. Harald Freudenberger 2014-04-30 11:42:29 -05:00
  • 3cd0b881be In ep11, only set context if m_VerifyInit was successful. Joy Latten 2014-04-30 11:41:06 -05:00
  • b8ed7cdf50 [PATCH 10/10]: ep11 sha hmacs require certain keys lengths. Check for the supported keylens in the hmac digest testcases. Joy Latten 2014-04-30 11:40:28 -05:00
  • a7040f098d [PATCH 9/10]: Additional published test vectors for SHA256, 384 and 512. Joy Latten 2014-04-30 11:39:30 -05:00
  • dcd8dda804 [PATCH 8/10]: Only icsf token supports multi-part hmac. But icsf is only token with no "identifiable" properties, so only run hmac multipart if not the other tokens. Joy Latten 2014-04-30 11:38:33 -05:00
  • 49db1a14e6 [PATCH 7/10]: Add single-part sha to ep11 token. Also, in the shaX_init and sign_init, only add state and set to active if the m_XXX_init call succeeds. Joy Latten 2014-04-30 11:37:47 -05:00
  • fe91c85075 [PATCH 6/10] : Add support for SHA384 and SHA512 to cca token. Joy Latten 2014-04-30 11:37:05 -05:00
  • e1eebb0cb4 [PATCH 5/10]: Add single-part sha2 to cca token. Remove doing single-part sha2 within tokn_specific_sha2_update and final. Made corrections in token_specific_sha2_update and token_specific_sha2_init so that we do not malloc the saved buffer in ctx. No need to do this if we send data once we have a multiple of the blocksize. The CSNBOWH has ability to chain data, so best to use it. Thus saved data is always going to be less than blocksize and don't need to realloc or malloc it. Joy Latten 2014-04-30 11:36:26 -05:00
  • 79118d485f [PATCH 4/10]: Add token-specific single-part shaX to ica token. Remove doing single-part with update and final calls. Now ctx->multi should only be TRUE when doing update and final to indicate was a multi-part operation. Joy Latten 2014-04-30 11:35:43 -05:00
  • e25d09f008 [PATCH 3/10]: Replace calls to ckm_* with their new counterparts. Also to allow the shaX_* calls to be called internally, remove the check for a session. It is done earlier when called from api. Joy Latten 2014-04-30 11:34:57 -05:00
  • 9bb0742a0d [PATCH 2/10]: Remove ckm_* calls and make one call into the hash functions. Add single-part SHAs, instead of calling both update and final to do what should really be one call for the token. Joy Latten 2014-04-30 11:30:14 -05:00
  • c36f956415 [PATCH 1/10]: add new token_specific_shaX calls to the header files. Joy Latten 2014-04-30 11:29:23 -05:00
  • 10f4766cd6 The 31 bit build on s390 showed an build error at initialization of an static long long variable which gets an address assigned. Fixed and tested on 31 and 64 bit. Harald Freudenberger 2014-04-15 13:16:33 -05:00
  • b0fc36e0e1 Small reworks: - Some of the ock testcase c files are tracked by git as 755. Fixed, c code files should appear 644 now. - pkcs11 misc_func test improved to show not just the mechanism number but also the (preprocessor defined) mechanism name. - misc speed test rsa encrypt receive buffer increased so the "buffer size too small" is fixed now. - misc speed test rsa uses now an exponent value of 17 (0x01,0x00,0x01) instead of 3 (0x03). Some tokens (eg. ep11) do not allow such low exponents and reject RSA key generation. Harald Freudenberger 2014-04-14 13:13:11 -05:00