200 Commits

Author SHA1 Message Date
Chris Conlon
5006306bb8 PKCS#7: add support for optional unprotectedAttributes with EncryptedData 2016-12-09 17:02:57 -07:00
Chris Conlon
b5eb8dce2f add PKCS#7/CMS EncryptedContent support 2016-12-09 16:57:31 -07:00
toddouska
b0b80bed78 Merge pull request #657 from cconlon/x963kdf
add ANSI-X9.63-KDF support [SEC1]
2016-12-09 13:29:41 -08:00
Chris Conlon
33e840b01b add AES key wrap support, RFC 3394 2016-12-09 09:30:56 -07:00
Chris Conlon
a5b267087f add ANSI-X9.63-KDF support [SEC1] 2016-12-07 20:26:09 -07:00
toddouska
f922d3f2d6 Merge pull request #624 from SparkiDev/sha224
SHA224 implementation added
2016-11-15 13:53:34 -08:00
Jacob Barthelmeh
0b3d9cbccd revert AESNI padding and handle the case in aes.c 2016-11-11 16:26:29 -07:00
toddouska
a0ee159fa5 Merge pull request #617 from JacobBarthelmeh/Compatibility-Layer
Compatibility layer
2016-11-10 11:47:42 -08:00
Sean Parkinson
fdfc177254 SHA224 implementation added
Added SHA24 implementation and tetss.
Added HMAC-SHA224 implementation and tests.
Added RSA-SHA224 and ECDSA-SHA224.
Added MGF1-SHA224
Added OpenSSL APIs for SHA224
Configuration option to enable SHA224 and it is on by default for x86_64
2016-11-10 15:52:26 +10:00
Jacob Barthelmeh
55401fceb8 adjust alignment of arrays used for case with AESNI 2016-11-09 15:03:26 -07:00
Jacob Barthelmeh
f06a392764 COMPAT. LAYER : DES set key and malloc/free 2016-11-07 13:21:05 -07:00
Chris Conlon
9a735fc873 allow PKCS#7 to be compiled with AES disabled 2016-11-02 12:18:45 -06:00
toddouska
624ec3d492 Merge pull request #607 from cconlon/pkcs7
add AES content encryption support to PKCS#7 EnvelopedData
2016-11-01 12:03:24 -07:00
Jacob Barthelmeh
09c32de412 RNG : option to not use RNG 2016-10-31 16:51:02 -06:00
Chris Conlon
fa9a9175d0 add AES-256-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:45:57 -06:00
Chris Conlon
8c23c3cdd0 add AES-192-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:27:21 -06:00
Chris Conlon
17c184e720 add AES-128-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:27:14 -06:00
John Safranek
849ae72d3a expand the AES-CTR test to 4 blocks for 192 and 256 bit cases 2016-10-27 15:54:22 -07:00
Jacob Barthelmeh
54c51ec4a0 static analysis : Fix warnings with wc_AesCcmSetKey 2016-10-12 10:02:53 -06:00
Jacob Barthelmeh
6d82cba29c ARMv8 : AES-CTR/CBC/GCM speed ups and refactor AES 2016-09-15 22:50:00 +00:00
David Garske
2ecd80ce23 Added support for static memory with wolfCrypt. Adds new "wc_LoadStaticMemory" function and moves "wolfSSL_init_memory_heap" into wolfCrypt layer. Enhanced wolfCrypt test and benchmark to use the static memory tool if enabled. Added support for static memory with "WOLFSSL_DEBUG_MEMORY" defined. Fixed issue with have-iopool and XMALLOC/XFREE. Added check to prevent using WOLFSSL_STATIC_MEMORY with HAVE_IO_POOL, XMALLOC_USER or NO_WOLFSSL_MEMORY defined. 2016-08-29 10:38:06 -07:00
David Garske
bf23b2f9d1 Fix issue with "wc_ecc_set_custom_curve" function not setting index as "ECC_CUSTOM_IDX". Cleanup of the ECC tests to return actual error code (when available) and make sure keys are free'd. Some trailing whitespace cleanup. 2016-08-26 12:35:47 -07:00
David Garske
17a34c5899 Added asynchronous wolfCrypt RSA, TLS client and Cavium Nitrox V support. Asynchronous wolfSSL client support for "DoServerKeyExchange", "SendClientKeyExchange", "SendCertificateVerify" and "DoCertificateVerify". Fixes for async DTLS. Refactor of the wolf event and async handling for use in wolfCrypt. Refactor of the async device support so its hardware agnostic. Added Cavium Nitrox V support (Nitrox tested using SDK v0.2 CNN55XX-SDK with new configure "--with-cavium-v=/dir" option). Moved Nitrox specific functions to new port file "port/cavium/cavium_nitrox.c". RSA refactor to handle async with states. RSA optimization for using dpraw for private key decode. Use double linked list in wolf event for faster/cleaner code. Use typedef for wolf event flag. Cleanup of the async error codes. wolfCrypt test and benchmark support for async RSA. Asynchronous mode enabled using "./configure --enable-asynccrypt". If no async hardware is defined then the internal async simulator (WOLFSSL_ASYNC_CRYPT_TEST) is used. Note: Using async mode requires async.c/h files from wolfSSL. If interested in using asynchronous mode please send email to info@wolfssl.com. 2016-08-15 13:59:41 -06:00
dgarske
b38218a0b9 Merge pull request #524 from kaleb-himes/certs-buffs-and-tests
cert updates, new buffers, new test with buffers
2016-08-14 08:39:37 -07:00
kaleb-himes
da18e463ed remove constraints on inclusion of certs_test.h 2016-08-12 17:00:22 -06:00
kaleb-himes
03295ec6d7 update certs, extend ntru to 1000 days, add der formatted ecc, new ecc buffer test
changes from first review

move to 256 bit defines
2016-08-12 13:00:52 -06:00
Jacob Barthelmeh
b502d9dcf7 help static analysis tools 2016-08-10 14:23:27 -06:00
David Garske
a17bc2a42e Fix build issue with ASN enabled and no HMAC (missing MAX_DIGEST_SIZE). Switch to using WC_MAX_DIGEST_SIZE from hash.h, which is always available. Added small stack option for digest in MakeSignature. Fixed build error with unused "testVerifyCount" if "NO_ECC_SIGN" or "NO_ECC_VERIFY". 2016-08-05 12:19:30 -07:00
Jacob Barthelmeh
e8f7d78fc4 add helper functions for choosing static buffer size 2016-07-21 12:11:15 -06:00
David Garske
e0f2bbd1b4 Added comment about why 0's test is disabled. ECC without Shamir fails with fast or normal math. 2016-07-19 19:12:45 -07:00
David Garske
5e2502fa95 ECC without Shamir has issues testing all zero's digest, so disable this test if not using Shamir method. Fixed comment about "NO_ECC_SECP". 2016-07-19 14:34:32 -07:00
toddouska
7a419ba6d8 Merge pull request #472 from dgarske/ecc_brainpool_koblitz
ECC and TLS support for all SECP, Koblitz and Brainpool curves
2016-07-19 11:44:53 -07:00
toddouska
d235a5f0cc add WC_RSA_BLINDING, wc_RsaSetRNG() for RSA Private Decrypt which doesn't have an RNG 2016-07-18 11:57:47 -07:00
David Garske
7a1acc7e56 Added TLS support for all SECP and Brainpool curves. Added ECC curve specs for all Brainpool, Koblitz and R2/R3. Adds new "HAVE_ECC_BRAINPOOL", "HAVE_ECC_KOBLITZ", "HAVE_ECC_SECPR2" and "HAVE_ECC_SECPR3" options. ECC refactor to use curve_id in _ex functions. NID and ECC Id's match now. Added ability to encode OID (HAVE_OID_ENCODING), but leave off by default and will use pre-encoded value for best performance. 2016-07-07 10:59:45 -07:00
David Garske
dcdc28e014 Remove double call to "wolfCrypt_Init()" in test.c. Appears to have been added in static memory merge on 6/10. 2016-06-30 16:51:13 -07:00
David Garske
5b3a72d482 Cleanup of stdlib function calls in the wolfSSL library to use our cross-platform "X*" style macros in types.h. 2016-06-29 11:11:25 -07:00
toddouska
ac6635593b Revert "Bio" 2016-06-27 10:53:34 -07:00
Jacob Barthelmeh
49934a5c91 Merge https://github.com/wolfSSL/wolfssl into bio 2016-06-24 14:22:14 -06:00
Ludovic FLAMENT
0c43123a01 Fix BIO based on review 2016-06-24 10:54:58 +02:00
John Safranek
ffb537c33f removed dependency on AES-NI for the AES-direct test 2016-06-23 15:34:09 -06:00
David Garske
dd52af0872 ECC cleanup / fixes. Improvements to ECC with fast math enabled to avoid mp_clear on stack variables. Refactor of ECC failure cleanup (fixes possible mem leaks with small stack enabled). Refactor of "fp_is*" response checks to use FP_YES or FP_NO. Pulled libtom enhancement/cleanup of fp_isprime. Fix for compressed keys import with custom curves (still having some issues though). 2016-06-21 15:27:51 -07:00
David Garske
aa1a405dd1 Fixes for compressed keys. Fix to fast math "mp_cnt_lsb" to return proper value, which fixes "mp_jacobi", which fixes "mp_sqrtmod_prime", which fixes compressed keys for 224-bit key. Removed workarounds for compressed keys. Added new configure option "--enable-compkey". Fixed issue with normal math and custom curves where "t2" could be free'd and used. Fixed issue with mp_dump in integer.c, with not allocating correctly sized buffer for toradix. 2016-06-21 14:06:02 -07:00
Jacob Barthelmeh
ea71814518 Merge https://github.com/wolfSSL/wolfssl 2016-06-17 13:58:53 -06:00
David Garske
6da166d83b Enhancement / cleanup of the "wc_ecc_make_key_ex" API so it can be used with "keysize" or "dp" and allows compatibility with existing "wc_ecc_make_key". Note: "wc_ecc_make_key_ex" was not previously public, so changing it at this point is okay. 2016-06-16 10:38:15 -07:00
David Garske
d55663eaee Added ECC API's for using custom curves that are not in the "ecc_sets" list. Added wolfCrypt test to validate/demonstrate custom curve using BRAINPOOL256R1. Exposed "wc_ecc_make_key_ex" and added "wc_ecc_import_x963_ex" / "wc_ecc_import_raw_ex" API's that accept "const ecc_set_type*" for custom curve. Internally use "ECC_CUSTOM_IDX" (-1) to define custom curve is used. Added "--enable-ecccustcurves" option to configure.ac. 2016-06-16 10:09:41 -07:00
David Garske
bb17bac018 Updated the naming for the ECC curve sets. Additional comments for each curve parameter. 2016-06-14 16:56:22 -07:00
toddouska
a156cedabc Merge pull request #435 from JacobBarthelmeh/staticmemory
Staticmemory
2016-06-10 17:03:49 -07:00
Jacob Barthelmeh
e214086dce tlsx with static memory / account for session certs size 2016-06-08 09:18:43 -06:00
toddouska
c48db891d1 Merge pull request #433 from ejohnstown/aes-cmac
Aes cmac
2016-06-07 16:48:46 -07:00
Jacob Barthelmeh
738373038b clean up staticmemory with crl 2016-06-06 17:50:54 -06:00