Commit Graph

133 Commits (12edf80e2b75f702132487a0efdeabdf0ddcebe1)

Author SHA1 Message Date
David Garske 8e64d564dc NXP/Freescale K8X MMCAU / LTC core support for RSA, ECC, Ed/Curve25519, AES, DSA, DES3, MD5, RNG, SHA and SHA2. 2016-12-05 09:01:59 -08:00
David Garske 82e8210208 Support for building without SHA256 with NO_OLD_TLS and SHA384/512. Although TLS 1.2 default digest for certs is SHA256 and our test cert signatures use SHA256, so make check will fail. Also requires disabling the P-RNG which uses SHA256. Added missing "wc_InitRng_ex" when using "CUSTOM_RAND_GENERATE_BLOCK". Cleanup of the BuildCertHashes, DoRounds, HashInput, HashOutput and HashOutputRaw return codes. 2016-11-14 12:47:24 -08:00
Jacob Barthelmeh 70e7e34c87 RNG : change to --disable-rng, non-autoconf scenario, help msg 2016-11-01 10:21:29 -06:00
Nickolas Lapp 1792eba1a2 Rename *Mutex Functions with wc_ prefix. Expose these functions for
Stunnel. Various other changes to enable stunnel compling
2016-10-03 16:36:05 -06:00
toddouska 0718aba655 fix comment typo 2016-09-19 13:28:14 -07:00
toddouska c51444bec5 update rdseed to 64bit get, more retries, fallback to /dev/urandom on failure 2016-09-16 18:54:47 -07:00
David Garske a9278fe492 Added check for GetLength result in asn GetIntRsa function. Fixed return code in random.c for "wolfAsync_DevCtxInit" due to copy/paste error. Added RSA wc_RsaCleanup to make sure allocated tmp buffer is always free'd. Eliminated invalid RSA key type checks and "RSA_CHECK_KEYTYPE". 2016-08-23 11:31:15 -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
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
Jacob Barthelmeh 2feee8856e revise static memory and update heap hint 2016-06-04 19:03:48 -06:00
Chris Conlon 8f3e1165a1 add Whitewood netRandom client library support 2016-05-05 15:31:25 -06:00
kaleb-himes 8176c74b3e Merge branch 'embOS-port' of https://github.com/wolfssl/wolfssl into embOS-port 2016-05-04 08:57:06 -07:00
kaleb-himes d184f8b1aa wolfSSL embOS port Initialize
self-review complete

Removed autogenerated files
2016-05-03 17:09:55 -06:00
Chris Conlon 78e62eddd7 fix visual studio code analysis warnings 2016-04-28 13:08:50 -06:00
Jacob Barthelmeh e60adfc9da better naming of macro and alter misc.c check 2016-03-29 13:42:40 -06:00
Jacob Barthelmeh 2665db73a4 check for compiling misc.c when not needed 2016-03-28 16:03:15 -06:00
David Garske f539a60a40 Adjusted the RNG benchmark to split into smaller requests of max allowed RNG size. 2016-03-25 06:59:35 -07:00
John Safranek d8fb4b6ee7 Merge pull request #352 from dgarske/DRBGSmallStack
Fix to reduce stack usage in the hash-based random number generator h…
2016-03-21 12:20:48 -07:00
Jacob Barthelmeh e99a5b0483 prepare for release v3.9.0 2016-03-17 16:02:13 -06:00
David Garske bda69decc1 Fix to reduce stack usage in the hash-based random number generator health tests when WOLFSSL_SMALL_STACK is defined. 2016-03-16 17:04:07 -07:00
David Garske bf058ef1b9 Fixed Jenkins error reports for mem_track msg, incorrect #ifdef in aes_test and ecc_test_raw_vector response code checking. Fixed C89 compliance with wc_AesSetKey. Fixed nrf_drv_rng_init response checks in RNG code. Reverted comment change in AES. Fixed nRF51 AES CBC Encrypt support. Added response code checking for nrf51_aes_set_key. 2016-03-15 17:18:03 -07:00
David Garske a38183b816 Port for Nordic nRF51 RNG, RTC and AES. Added RNG test for wc_RNG_GenerateBlock 0's check even if HAVE_HASHDRBG is enabled. Added NIST test vectors for ECC P-256, P-384 and P-521. Added helpful debug message in ECC import if issue finding ecc_sets[] for curve. Moved memory tracker into separate file and added support for it to wolfcrypt test and benchmark. Added Ed255519/Curve25519 options for granular control of sign, verify, shared secret, import and export. Added AES options for max key size (AES_MAX_KEY_SIZE), no decrypt (NO_AES_DECRYPT) and no CBC (NO_AES_CBC). 2016-03-15 13:58:51 -07:00
Jacob Barthelmeh 3976a3e2f2 K64F RNGA register 2016-03-10 14:35:55 -07:00
David Garske 08c663a4ac Added new CUSTOM_RAND_GENERATE_BLOCK option that allows override and disabling of the HASHDRBG for customers who have a HW RNG they would like to use instead.
Examples:
"./configure --disable-hashdrbg CFLAGS="-DCUSTOM_RAND_GENERATE_BLOCK= custom_rand_generate_block".
OR
/* RNG */
//#define HAVE_HASHDRBG
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
2016-02-12 11:59:51 -08:00
JacobBarthelmeh 25959bfb62 Merge pull request #279 from dgarske/CustRandGenSeed_OSArg
Added new CUSTOM_RAND_GENERATE_SEED_OS macro
2016-02-05 11:18:18 -07:00
David Garske bc059e12c2 Cleanup to remove trailing whitespace and convert tabs to spaces. 2016-02-04 12:31:08 -08:00
David Garske f8876854f4 Spelling fixes in comments and error strings (ALGO_ID_E, ASN_TIME_E and WOLFSSL_ERROR function). 2016-01-29 16:13:09 -08:00
David Garske 2bc0ae05b5 Added new CUSTOM_RAND_GENERATE_SEED_OS macro to allow custom random generation, which includes the OS_Seed. Opted to create new macro instead of modifying existing CUSTOM_RAND_GENERATE_SEED. 2016-01-28 09:31:36 -08:00
Chris Conlon 0801eeac8d update support for Freescale KSDK 1.3.0 2016-01-25 10:41:26 -07:00
lchristina26 ae92a41512 Update fork to upstream: Merge https://github.com/wolfSSL/wolfssl 2016-01-08 11:59:35 -07:00
lchristina26 efae688120 add entropy steps for VxWorks 2016-01-08 11:43:05 -07:00
lchristina26 4834e2d5cf updates for VxWorks simulator entropy 2016-01-04 14:33:30 -07:00
toddouska ed8a50ce69 Merge pull request #211 from lchristina26/master
GenerateSeed() Function for VxWorks compatibility
2015-12-15 15:59:20 -08:00
lchristina26 3113c8db9b update VXWORKS GenerateSeed() - no printf, error return 2015-12-15 16:52:21 -07:00
lchristina26 6ab9c87f13 add comment to VXWORKS GenerateSeed() 2015-12-11 13:41:05 -07:00
lchristina26 e2456214f4 update random.c for better entropy with VXWORKS 2015-12-11 13:22:33 -07:00
lchristina26 cb73064c10 format changes to VXWORKS GenerateSeed() 2015-12-09 13:22:13 -07:00
lchristina26 38ac17864e added entropy, wc_GenerateSeed() for VxWorks 2015-12-09 13:18:42 -07:00
David Garske 05f4c83b98 Optimizations to improve random number generation performance and provide additional ways to implement custom versions of custom random handlers. Added new "CUSTOM_RAND_TYPE" to define the datatype for the "CUSTOM_RAND_GENERATE" function. Added new "CUSTOM_RAND_GENERATE_SEED" option for anyone who wants to implement their own equivalent "wc_GenerateSeed()" function. Added generic FREESCALE_RNGA and FREESCALE_RNGB options. 2015-11-05 22:20:11 -08:00
David Garske 16ba3138a1 Added support for the Rowley CrossWorks for ARM IDE. Added new "WOLFSSL_ROWLEY_ARM" setting define. Added a sample solution (wolfssl.hzp) for building the WolfSSL library and sample test/benchmark applications. The sample applications are written for the Freescale Kinetis K64, but easily be customized for any Kinetis or further extended to support other ARM micro-controllers. 2015-10-06 10:45:46 -07:00
Takashi Kojo 0a530c1b70 #pragma worning for Visual Studio 2015-09-26 08:49:03 +09:00
Takashi Kojo f450ac0684 settings.h: GenSeed for test only option 2015-09-26 08:03:49 +09:00
Chris Conlon be5ac590b7 Freescale: Add KSDK FreeRTOS build, using fastmath 2015-09-01 15:37:11 -06:00
toddouska 31500d0d12 Merge branch 'MDK5' of https://github.com/kojo1/wolfssl into kojo-mdk5 2015-09-01 11:35:58 -07:00
toddouska f8445193a4 add idirect generate seed 2015-08-31 13:55:56 -07:00
Takashi Kojo f5ee6d616c Merge remote-tracking branch 'origin/MDK5' into MDK5 2015-08-29 21:24:44 +09:00
Takashi Kojo 6ff9f96809 inline to INLINE 2015-08-29 14:07:55 +09:00
Takashi Kojo df2216d092 Fixed file access mode 2015-08-29 11:32:30 +09:00
Takashi Kojo e459bb2e23 Fixed file access mode 2015-08-29 11:08:07 +09:00
Chris Conlon 5e95740d93 Freescale: Add KSDK Bare Metal build, TRNG support 2015-08-27 11:45:40 -06:00
Chris Conlon 34ac1a33f3 Freescale: Add support for KSDK (FREESCALE_KSDK_MQX) 2015-08-14 15:21:23 -06:00
Chris Conlon 5d40c5f566 Rename RNG to WC_RNG for Freescale, add NO_OLD_RNGNAME define to completely remove RNG type usage 2015-08-07 11:53:19 -06:00
lchristina26 9397b9e10f move MBED GenerateSeed() due to duplicated code 2015-08-06 16:40:36 -06:00
John Safranek 8fa258c657 fix scan-build warning 2015-06-15 17:52:30 -07:00
John Safranek 5976296a77 removed a comment from random.c 2015-06-15 07:37:05 -07:00
John Safranek 067f11ff34 Added a known answer test inside the HashDRBG that is called when
creating a new instance of a DRBG, at reseed time.
Added a check that the freed DRBG's state actually gets cleared.
2015-06-05 14:46:48 -07:00
John Safranek 0b1ea204b7 cleaned up Windows build warnings 2015-05-12 11:59:07 -07:00
toddouska 513b43baae update CUSTOM_RAND_GENERATE to not include dev random files 2015-05-11 12:03:53 -07:00
toddouska 22afce8609 fixup intel avx request 2015-03-26 14:26:25 -07:00
Takashi Kojo 9ddf775afa Intel RdSeed, no Rand with hash DRBG 2015-03-26 09:08:02 +09:00
Takashi Kojo 3c55971ffa Removed Intel RD from Hash DRBG 2015-03-25 18:31:08 +09:00
Takashi Kojo 28109b01f7 Intel rdrand/rdseed: fixed error check, separated rdrand and rdseed 2015-03-24 15:13:11 +09:00
Takashi Kojo 7e3c310ec9 random.c, runtime switch between Intel RD and software version 2015-03-23 19:40:35 +09:00
Takashi Kojo 2a2bf81c15 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into IntelAVX 2015-03-23 18:43:01 +09:00
John Safranek 9f2454fc78 Added a noop function wc_FreeRng() for when not using the HashDRBG to keep
the calls to InitRng and FreeRng simple and balanced.
2015-03-20 14:19:35 -07:00
Takashi Kojo 7d6f169e29 random.c for Intel rdseed/rdrand 2015-03-17 21:48:59 +09:00
John Safranek b02622d1d0 optimize hashDRBG internal state 2015-03-10 18:16:44 -07:00
toddouska ef0a918072 optimize hash-drbg layout, save 12 bytes on 64bit 2015-03-07 09:46:14 -08:00
John Safranek 874fa8c1f9 fix freeing a failed RNG 2015-03-06 09:51:29 -08:00
toddouska 1caaeb8355 tiddy whitespace 2015-02-28 11:29:42 -08:00
Takashi Kojo 6f08459264 uITRON and uT-Kernel, wc-prot.c 2015-02-28 11:24:16 +09:00
John Safranek 795a32446b fix github issue #13, DRBG type-punning 2015-02-24 16:47:00 -08:00
toddouska 608da64ece add ForceZero() to force memset(0) 2015-02-20 15:51:21 -08:00
kaleb-himes 1ebaf41808 random.c updated, conflict with TIRTOS 2015-01-09 16:01:22 -07:00
Jacob Barthelmeh d366599285 adding comment to header and _fips to c files 2015-01-08 10:42:01 -07:00
kaleb-himes a389620a29 Copyright (C) updates 2015-01-08 09:39:04 -07:00
Jacob Barthelmeh 02f16b9232 going through wolfcrypt 2015-01-07 13:36:11 -07:00
kaleb-himes 639637278d CYASSL -> WOLFSSL macros 2015-01-07 13:17:57 -07:00
Jacob Barthelmeh b91934f065 change to header files and update of function calls in src folder 2015-01-01 14:48:33 -07:00
Jacob Barthelmeh 5365bdb06c debugging on name change 2015-01-01 07:33:07 -07:00
Jacob Barthelmeh e3c82842a5 rsa des3 random : update 2014-12-31 15:31:50 -07:00
Jacob Barthelmeh a5529b124d moving over more files 2014-12-19 09:56:51 -07:00
Jacob Barthelmeh 50eee6afdf wolf c files for des, hmac, random, and rsa 2014-12-18 11:10:55 -07:00