Commit Graph

249 Commits

Author SHA1 Message Date
Jacob Barthelmeh 9d61ba6c62 initial cfb1/cfb8 support added 2020-02-20 17:28:32 -06:00
Jacob Barthelmeh df0d5f3b08 add EVP_aes_*_ofb implementation and tests, add support for inline with OFB 2020-02-20 17:28:32 -06:00
Jacob Barthelmeh e837894578 add AES-OFB mode 2020-02-20 17:28:32 -06:00
Chris Conlon b62064f6a8 Merge pull request #2737 from JacobBarthelmeh/dks7g2
changes for build with s7g2
2020-02-13 14:07:44 -07:00
Jacob Barthelmeh 0814f61b11 fix code formating and turn on HW acc. by default 2020-02-12 10:31:34 -07:00
JacobBarthelmeh 61a5fe3108 add macro for trng and gce driver names 2020-02-06 09:20:07 -08:00
JacobBarthelmeh e75b1b5cb9 add suport for AES acceleration 2020-02-04 16:10:20 -08:00
Sean Parkinson 55ea2facdd Changes to clear issues raised by cppcheck 2020-01-30 14:24:32 +10:00
Chris Conlon 45c5a2d39c update copyright to 2020 2020-01-03 15:06:03 -08:00
John Safranek e7af2d2ba9 Fixed a couple initialization issues scan-build indicated. 2019-12-12 16:50:37 -08:00
David Garske 7e17904c54 Fix for AES GCM Decrypt auth tag. ZD 9507 2019-11-18 06:46:50 -08:00
David Garske a7e415d077 Fix for AEC CTR mode with STM32 and CubeMX. 2019-11-15 12:08:25 -08:00
David Garske 27d95d1dfd Add mutex protection on STM32 RNG, AES/DES and Hashing crypto hardware calls for thread safety. Fixes #2580 2019-11-15 12:08:11 -08:00
Chris Conlon be2cb302ea fix mmCAU classic XFREE on aligned ptr 2019-11-01 09:56:28 -06:00
toddouska 140796d2aa Merge pull request #2504 from ejohnstown/sync-octeon
Synchronous OCTEON Sniffer Support
2019-10-28 12:25:57 -07:00
David Garske 3ac4aa5a9b Merge pull request #2524 from cconlon/cau_iar
mmCAU Classic AES key alignment, IAR warnings fixes
2019-10-24 09:23:20 -07:00
John Safranek 67b11b8ece Fixing some play-nice between sync QAT and sync Octeon. 2019-10-23 09:58:10 -07:00
David Garske 7386bd4df1 Fixes for building with ./configure --enable-asynccrypt --enable-all CFLAGS="-DWC_ASYNC_NO_CRYPT" 2019-10-22 13:37:16 -07:00
Chris Conlon c4afbb3685 align AES key if needed when using MMCAU classic 2019-10-18 14:02:43 -06:00
David Garske 5c07391f1b Various fixes for asynchronous mode:
* Fix for AES CBC issue with IV (QAT only).
* Fix for test cases with QAT.
* Remove poorly placed debug for AES CFB.
2019-10-15 11:18:55 -07:00
Tesfa Mael 74386fd0d0 Initialize GCM AAD in case wc_AesInit() wasn't called 2019-09-20 12:04:33 -07:00
Tesfa Mael 54cdab8005 Initialize AES GCM set key 2019-09-20 10:17:08 -07:00
Jacob Barthelmeh 9fd38dc340 build fix for aesccm + devcrypto=cbc + wpas and afalg 2019-08-30 16:15:48 -06:00
Tesfa Mael a76f719aac Fix review comment 2019-08-28 10:42:57 -07:00
Tesfa Mael 59dddda3a9 Updated with review comments 2019-08-27 15:37:00 -07:00
Tesfa Mael dc5d11fef4 Updated with review comments 2019-08-27 15:14:58 -07:00
Tesfa Mael 5e28dd94a2 OpenSSL compatible APIs:
ASN1_STRING_type
EVP_aes_128_gcm
EVP_CIPHER_CTX_ctrl
EVP_PKEY_sign
EVP_PKEY_sign_init
RSA_print
RSA_NO_PADDING
RSA_PKCS1_PSS_PADDING
2019-08-26 12:20:18 -07:00
toddouska 681de3e41a Merge pull request #2375 from dgarske/stm32_cubemx_halv2
Fixes for STM32F7 and latest CubeMX HAL
2019-08-23 12:28:51 -07:00
David Garske 3f992ce39d Additional STM32F7 fixes with HALv2. 2019-08-16 12:31:28 -07:00
David Garske aee766e11b Minor fixes for AES GCM with GMAC and STM32 HALv2. 2019-08-15 16:57:38 -07:00
Jacob Barthelmeh e8e1d35744 build with devcrypto and aesccm 2019-08-13 14:12:45 -06:00
David Garske e7c6fc221d Fixes to handle byte swapping on Key and IV for STM32F7 with latest CubeMX. 2019-08-09 15:40:26 -07:00
Sean Parkinson 34fe643938 Set the IV to zero when NULL IV and using AESNI 2019-08-09 11:23:14 -06:00
David Garske 8e83fb2e67 Fix to resolve AES GCM auth calucation for GMAC where no in/out data is used. 2019-08-05 14:03:02 -07:00
David Garske f5c1c33dba Fixes for newer STM CubeMX HAL for STM32F7. 2019-08-02 15:12:09 -07:00
toddouska c443116189 Merge pull request #2364 from dgarske/stm32_cube_small_block
Fix for STM32 AES GCM crypto hardware with less than block size
2019-07-22 11:27:04 -07:00
David Garske 7db3f8e2c6 Fixes for STM32 CubeMX AES GCM crypto hardware where less than a block size (16) is used. 2019-07-18 06:09:07 -07:00
John Safranek 9c245b7fc5 Fixes
When building with GCC-8 and enable-intelasm set, GCC reported a memcpy
from and two the same pointer being possible. Added a check for the same
pointer and skipped the copy if the same.
2019-07-17 15:35:12 -07:00
John Safranek e4e6ed3701 AES-NI Fix
Replace some removed constants for AES-NI. They were removed when the
inline assembly that used that was exported to its own file.
For Windows, we're using the C intrinsic AES-NI functions, and those
still needed those constants.
2019-06-20 15:33:30 -07:00
David Garske 6c65550eab Added CryptoCell-310 support
- SHA-256
- AES CBC
- CryptoCell 310 RNG
- RSA sign/verify and RSA key gen
- RSA encrypt/decrypt, decrypt inline
- ECC sign/verify/shared secret
- ECC key import/export and key gen pairs
- Hardware RNG and RTC of nRF52840 for benchmark timing source
- readme doc
2019-04-23 10:04:41 -07:00
David Garske ce43044426 Improvement for STM32 GCM performance. ZD 4712. 2019-04-05 14:06:23 -07:00
John Safranek a59488b299 AES-CTR In Place
Added a temp AES block in case in and out are the same pointer.
2019-04-03 15:02:00 -07:00
John Safranek 246c444b93 Updates for v4.0.0
Update the copyright dates on all the source files to the current year.
2019-03-15 10:37:36 -07:00
David Garske 6361ec2f10 Fix for AES GCM and CCM ex to NOT increment counter or update IV if failure or async response code. Resolves TLS v1.3 with async simulator. 2019-03-13 23:32:53 -07:00
toddouska 57cdbffc2c Merge pull request #2149 from dgarske/cryptocb_ret
Refactor of the crypto callback return code and new API version marker
2019-03-11 16:54:53 -07:00
David Garske 68c04a95e0 Refactor of the crypto callback return code for cases when unavailable to use new error code CRYPTOCB_UNAVAILABLE. Retains support for original NOT_COMPILED_IN error code. Added new CRYPTO_CB_VER define for helping applications handle/detect changes to crypto callback interface (currently no way to determine changes at build-time between release cycles). 2019-03-08 16:50:45 -08:00
David Garske 4f2d4420df Cleanups for hard coded 12 and 16 in AES GCM code. Allow STM32 GCM IV 12 thru 16. 2019-03-01 10:50:08 -08:00
David Garske 164eb30732 Fixes for STM32 AES GCM. Hardware does not correctly compute authTag if input is not a multiple of block size, so fall-back to software for tag only. Hardware also only supports IV of 12 or 16 bytes, so fall-back to software in those cases. ZD 4712 2019-02-27 11:07:03 -08:00
toddouska b8dc772ef8 Merge pull request #2105 from dgarske/fix_stm_aesgcm
Fix for STM32 AES GCM
2019-02-20 09:23:11 -08:00
David Garske ba14564c49 Fix for STM32 AES GCM, which was incorrectly using software crypto when authInSz != 16. The wc_AesGcmEncrypt_STM32 and wc_AesGcmDecrypt_STM32 functions correctly handle all variations of authInSz. 2019-02-19 15:38:09 -08:00