Wolf Walter
a47eeec145
fixed sigRs length
...
atmel_ecc_sign and atmel_ecc_verify expect sigRS length to be 64 Byte (32 Byte each).
2018-10-26 16:43:03 +02:00
David Garske
e53694b351
Fix for shared secret callback for client side, where it was not using the provided peer's public key. Fix for ATECC508A to put it into idle mode after operations to prevent watchdog fault mode (can be disabled by defining WOLFSSL_ATECC508A_NOIDLE). Fixes for callbacks to support using software for non P-256 curves (can be disabled by defining WOLFSSL_ATECC508A_NOSOFTECC).
2018-10-15 16:01:04 -07:00
David Garske
bd57f5b385
Fix to resolve possible buffer overflow with atmel_get_rev_info when using byte.
2018-10-15 14:17:43 -07:00
David Garske
177bf49fa6
Updates to the atmel.c code to allow easier customization of the hardware interface.
2018-10-15 14:17:43 -07:00
David Garske
bb737ec99d
Fixes for building against latest CryptoAuthLib. Refactor to eliminate the atcatls function calls, since these have been removed from latest CryptoAuthLib. Cleanup of the slot assignment handling.
2018-10-15 14:17:43 -07:00
David Garske
ba9f21bad6
Improvements to the ATECC508A README.md.
2018-10-15 14:17:42 -07:00
David Garske
53c2264327
Fix for checking the inLen when setting raw public key len for hardware. Finished the ATECC508A ECC functions to support native TLS with the WOLFSSL_ATECC508A option and SECP256R1. Added slot type for alloc/free. Added helper functions for setting the PK callbacks and custom content. Updated the README.md with build options. Added support for overriding the ATECC_MAX_SLOT. Added overridable define for encryption slot number ATECC_SLOT_I2C_ENC. Added new build option WOLFSSL_ATECC_PKCB for using just the reference PK callbacks.
2018-10-15 14:17:42 -07:00
David Garske
7074625048
Added slot callbacks. Improvements for the Atmel time support. Fix to make sure read encryption key is cleared from stack buffer.
2018-10-15 14:17:42 -07:00
David Garske
e78ddfce75
Fix for wc_ecc_import_x963_ex to handle ATECC508A raw public key. Cleanup of the ATECC508A encryption key support. Added new macro ATCA_TLS_GET_ENC_KEY to allow setting your own function at build-time for getting the encryption key.
2018-10-15 14:17:42 -07:00
David Garske
be318abbc2
Fixes for building with WOLFSSL_ATECC508A with latest atca.
2018-10-15 14:17:42 -07:00
Jacob Barthelmeh
fe2f9d4aa4
minor adjustments and add README
2018-09-20 15:59:29 -06:00
Jacob Barthelmeh
96a7e366bc
testing with valgrind and static analysis tools
2018-09-19 14:29:33 -06:00
Jacob Barthelmeh
2e88151cfd
crypto only sha256 cryptodev
...
formating and refactoring
update configure for devcrypto
add AES algorithms to cyrptodev port
increase structure size for compatibility AES with cryptodev
add wc_devcrypto.h to install path
2018-09-19 10:41:29 -06:00
Daniele Lacamera
27555d6eb7
Fix old-style function definitions
2018-09-07 09:13:20 +02:00
David Garske
347fdccf1c
Added missing README.md.
2018-08-24 11:11:30 -07:00
David Garske
c96aeb4550
Added documentation and benchmarks for STM32 and STSAFE-A100 support.
2018-08-24 11:03:14 -07:00
David Garske
88e6bd2915
Added ST-Safe server side PK callback example for key gen. Added helper API's for setting up the PK callbacks and custom context.
2018-08-23 15:57:14 -07:00
David Garske
57d72028f6
Fix for missing return code on wc_Pic32HashFree.
2018-08-22 16:38:55 -07:00
David Garske
53af520911
Fix to resolve issue with PIC32MZ crypto hardware (AES/DES3 only) where an unaligned input/output buffer was not handled correctly. This results in a BUFFER_E. This was seen with DTLS v1.0 and TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA cipher suite. Fix is to allocate a dynamic buffer from heap if the input/output are not aligned. Tested and verified with a PIC32MZ2048EFM144 and the wolfssl_udp_client example for Harmony using DTLS v1.0 and the setudppacketoptions 192.168.0.107 11111 hello -> sendudppacket commands. Cleanups in older ctoacrypt/settings.h for PIC32MZ.
2018-08-22 13:39:03 -07:00
David Garske
c6e075f077
Fixes for building with Atmel ASF and no ECC508A.
2018-08-15 12:00:44 -07:00
Jacob Barthelmeh
30e787b10c
create buffer with structure copy and set fd after close
2018-08-03 16:46:15 -06:00
Jacob Barthelmeh
7726786998
fix comment and remove duplicate free
2018-08-03 15:04:37 -06:00
JacobBarthelmeh
cb756397b3
inital AES-CBC with af_alg
...
progress on AES-GCM with AF_ALG and add SHA256
add aes-gcm test cases and finish logic of aes-gcm with AF_ALG
formating of tabs and white space
add files to dist
adding ecb and ctr mode with af_alg
make length of buffers for ctr be AES_BLOCK_SIZE
formating and add support for sha256 copy/gethash
sanity checks on arguments
cast return values and valgrind tests
make it easier to use sha256 with af_alg
remove hard tabs
add endif for after rebase
2018-08-01 08:54:20 -06:00
David Garske
0f86494161
* Added support for STM32L4 AES hardware crypto.
...
* Added reference PK callbacks functions for ECC sign, verify and shared secret used by TLS in `wolfcrypt/src/port/st/stsafe.c`.
* Fix for wolfcrypt_test to not require args to be provided.
* Fix for wolfCrypt `ecc_test_buffers` to poperly init ecc_key (resolves devId issue).
* Fix for STM32 AES CBC Decrypt with CubeMX, which was not capturing the first input block for next IV.
* Refactor to combine STM32 hardware init code.
2018-07-30 13:58:19 -07:00
toddouska
335f467b8c
Merge pull request #1714 from dgarske/pic32hashleak
...
Fixes for PIC32MZ hash memory leak
2018-07-30 13:48:59 -07:00
Naruto TAKAHASHI
861fec1dc6
porting mynewt
2018-07-28 18:03:20 +09:00
David Garske
beceab2734
Fix for leak with WOLFSSL_PIC32MZ_HASH and TLS. The PIC32 update cache buffer was not always being free'd.
2018-07-25 11:22:03 -07:00
David Garske
74c391d138
Added reference PK callbacks (HAVE_PK_CALLBACKS) for ATECC508A device for wolfSSL TLS.
2018-07-17 19:02:56 -07:00
Jacob Barthelmeh
c8e118cd12
adjust macro guards for additional functions
2018-07-03 16:52:29 -06:00
David Garske
44c4e33290
Fix ARMv8 AES code to use the shared aes.h CTR_SZ and GCM_NONCE_MID_SZ.
2018-06-29 10:22:25 -07:00
David Garske
7ae9e4359d
Added support for the STM32L4 with AES/SHA hardware acceleration. Fixed a few minor compiler warnings with mis-matched enum types.
2018-06-27 19:40:03 -07:00
John Safranek
586874b997
Rename INLINE
...
1. Renamed the macro INLINE as WC_INLINE.
2. For FIPS and the "selftest" build, define INLINE as WC_INLINE. Allows the FIPS code to work unchanged.
2018-06-26 15:17:46 -07:00
David Garske
c83e63853d
Refactor unqiue hash types to use same internal values (ex WC_MD5 == WC_HASH_TYPE_MD5). Refactor the Sha3 types to use wc_ naming.
2018-04-09 13:28:15 -07:00
Jacob Barthelmeh
815219b589
fix pic32 AES-CBC and add test case
2018-04-04 16:09:11 -06:00
David Garske
8c4bfd825a
Support for building the ATECC508A without WOLFSSL_ATMEL defined, which enables features specific to Atmel Studio Framework (ASF) and an embedded target. This allows for building with WOLFSSL_ATECC508A defined on other targets such as Linux.
2018-03-22 09:39:21 -07:00
Takashi Kojo
1de291be8d
macro INLINE
2018-03-14 07:14:07 +09:00
Jacob Barthelmeh
4614bd4e56
scan-build warning and AES key size builds for ARMv8
2018-02-19 17:32:39 -07:00
David Garske
0be1c10fcd
Moved the STM32 functions to their own .c file. Added GPL header. Finished testing on STM32 CubeMX with F4 and F7 and StdPeriLib with F4.
2018-02-05 12:57:06 -08:00
David Garske
a4a5f4f27a
STM32 refactor to move hashing code into wolfssl/wolfcrypt/port/stm32.h. Supports CubeMX HAL or StdPeriLib with MD5, SHA1, SHA224 and SHA256. Detects if hardware supports SHA2. Adds hashing context save/restore and hashing clock/power optimizations. Fix for building *.c in wolfcrypt/src/port for caam_driver.c. Fix for warning with wolfSSL_CryptHwMutexUnLock when no threading defined and return code not checked.
2018-01-31 11:25:20 -08:00
Jacob Barthelmeh
01f603ad65
add documentation, macro for no AES hw or HASH hw, use usleep when waiting for entropy
2018-01-02 15:00:35 -07:00
Jacob Barthelmeh
84ecf94263
spelling mistakes, formatting, and change error name
2017-12-27 15:24:14 -07:00
Jacob Barthelmeh
6d3166316b
set input size constraints for AES-ECB mode with driver
2017-12-23 14:44:31 -07:00
Jacob Barthelmeh
fe7dec0edb
refactor input/output with AES and fix sizes passed in
2017-12-22 12:18:04 -07:00
Jacob Barthelmeh
b3eef2b10e
formating and removing white space, also added sanity check on blob arguments
2017-12-21 14:26:22 -07:00
Jacob Barthelmeh
28582ad5d9
remove HMAC from driver, it was never completely stable yet
2017-12-20 14:21:15 -07:00
Jacob Barthelmeh
20e69460b0
minor change of variable name and add settings check
2017-12-20 13:59:20 -07:00
Jacob Barthelmeh
351a673ec0
Add AES-CCM hardware acceleration support and other fixes
2017-12-20 11:16:11 -07:00
Jacob Barthelmeh
3a6d5b8f90
formating / add c files to distro / remove unneeded macros
2017-12-20 11:16:11 -07:00
Jacob Barthelmeh
5fa9455bf9
add CAAM with INTEGRITY support
2017-12-20 11:16:11 -07:00
kaleb-himes
9ce73cf1a6
Add stub functions for Aes/Des Init/Free in TI_CRYPT
2017-11-14 15:30:16 -07:00