Skip to content

Commit 2421e11

Browse files
1010101001010101nashif
authored andcommitted
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: Flavio Santes <[email protected]>
1 parent a1538a6 commit 2421e11

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

ext/lib/crypto/tinycrypt/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ open source project. The original upstream code can be found at:
33

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

6-
At revision 297706a14d4024d0e98bbbcae45ce0dcfbcc5c4c
6+
At revision c7b1dca2b27070dfb5f92e56dab7a91a7afee18c, version 0.2.5
77

88
Any changes to the local version should include Zephyr's TinyCrypt
99
maintainer in the review. That can be found via the git history.

ext/lib/crypto/tinycrypt/include/tinycrypt/ecc_dh.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ extern "C" {
8383
* @return returns TC_CRYPTO_SUCCESS (1) if the key pair was generated successfully
8484
* returns TC_CRYPTO_FAIL (0) if:
8585
* the private key is 0
86-
86+
*
8787
* @param p_publicKey OUT -- the point representing the public key.
8888
* @param p_privateKey OUT -- the private key.
8989
* @param p_random IN -- The random number to use to generate the key pair.

ext/lib/crypto/tinycrypt/include/tinycrypt/sha256.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int32_t tc_sha256_update(TCSha256State_t s,
120120
* If your application intends to have sensitive data in this
121121
* buffer, remind to erase it after the data has been processed
122122
* @param digest unsigned eight bit integer
123-
* @param s state struct
123+
* @param s Sha256 state struct
124124
*/
125125
int32_t tc_sha256_final(uint8_t *digest, TCSha256State_t s);
126126

ext/lib/crypto/tinycrypt/source/ccm_mode.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,8 @@ int32_t tc_ccm_decryption_verification(uint8_t *out, const uint8_t *associated_d
196196
uint32_t alen, const uint8_t *payload,
197197
uint32_t plen, TCCcmMode_t c)
198198
{
199-
200199
/* input sanity check: */
201-
if ((plen <= alen) ||
202-
(out == (uint8_t *) 0) ||
200+
if ((out == (uint8_t *) 0) ||
203201
(c == (TCCcmMode_t) 0) ||
204202
((plen > 0) && (payload == (uint8_t *) 0)) ||
205203
((alen > 0) && (associated_data == (uint8_t *) 0)) ||

0 commit comments

Comments
 (0)