Commit 2421e11f authored by Flavio Santes's avatar Flavio Santes Committed by Anas Nashif
Browse files

tinycrypt: Update TinyCrypt to version 0.2.5

TinyCrypt 0.2.5 was released a few hours ago:

https://github.com/01org/tinycrypt/releases/tag/v0.2.5



This patch updates some TinyCrypt files, solving the following issues:

- Decryptions using ccm mode can incorrectly fail
- Minor style issues in code documentation

Change-Id: I606cde179888aad7a52fd277d73973f2347d8882
Signed-off-by: default avatarFlavio Santes <flavio.santes@intel.com>
parent a1538a67
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ open source project. The original upstream code can be found at:

https://github.com/01org/tinycrypt

At revision 297706a14d4024d0e98bbbcae45ce0dcfbcc5c4c
At revision c7b1dca2b27070dfb5f92e56dab7a91a7afee18c, version 0.2.5

Any changes to the local version should include Zephyr's TinyCrypt
maintainer in the review.  That can be found via the git history.
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ extern "C" {
 * @return returns TC_CRYPTO_SUCCESS (1) if the key pair was generated successfully
 *         returns TC_CRYPTO_FAIL (0) if:
 *                the private key is 0

 *
 * @param p_publicKey OUT -- the point representing the public key.
 * @param p_privateKey OUT -- the private key.
 * @param p_random IN -- The random number to use to generate the key pair.
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ int32_t tc_sha256_update(TCSha256State_t s,
 *           If your application intends to have sensitive data in this
 *           buffer, remind to erase it after the data has been processed
 *  @param digest unsigned eight bit integer
 *  @param s state struct
 *  @param s Sha256 state struct
 */
int32_t tc_sha256_final(uint8_t *digest, TCSha256State_t s);

+1 −3
Original line number Diff line number Diff line
@@ -196,10 +196,8 @@ int32_t tc_ccm_decryption_verification(uint8_t *out, const uint8_t *associated_d
				       uint32_t alen, const uint8_t *payload,
				       uint32_t plen, TCCcmMode_t c)
{

	/* input sanity check: */
	if ((plen <= alen) ||
	    (out == (uint8_t *) 0) ||
       if ((out == (uint8_t *) 0) ||
	    (c == (TCCcmMode_t) 0) ||
	    ((plen > 0) && (payload == (uint8_t *) 0)) ||
	    ((alen > 0) && (associated_data == (uint8_t *) 0)) ||