Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Make structs platform agnostic #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@
*.d
*.exe
*.a
tests/test_aes
tests/test_cbc_mode
tests/test_ccm_mode
tests/test_cmac_mode
tests/test_ctr_mode
tests/test_ctr_prng
tests/test_ecc_dh
tests/test_ecc_dsa
tests/test_hmac
tests/test_hmac_prng
tests/test_sha256
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be written:

tests/test_*
!tests/test_*.c

Hopefully without side-effects, and with no need of updates when new tests are added. And I would add tags to .gitignore as well!

2 changes: 1 addition & 1 deletion lib/include/tinycrypt/aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extern "C" {
#define TC_AES_KEY_SIZE (Nb*Nk)

typedef struct tc_aes_key_sched_struct {
unsigned int words[Nb*(Nr+1)];
uint32_t words[Nb*(Nr+1)];
} *TCAesKeySched_t;

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/include/tinycrypt/ecc.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ typedef int16_t bitcount_t;
/* defining data type for comparison result: */
typedef int8_t cmpresult_t;
/* defining data type to store ECC coordinate/point in 32bits words: */
typedef unsigned int uECC_word_t;
typedef uint32_t uECC_word_t;
/* defining data type to store an ECC coordinate/point in 64bits words: */
typedef uint64_t uECC_dword_t;

Expand Down
2 changes: 1 addition & 1 deletion lib/include/tinycrypt/sha256.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extern "C" {
#define TC_SHA256_STATE_BLOCKS (TC_SHA256_DIGEST_SIZE/4)

struct tc_sha256_state_struct {
unsigned int iv[TC_SHA256_STATE_BLOCKS];
uint32_t iv[TC_SHA256_STATE_BLOCKS];
uint64_t bits_hashed;
uint8_t leftover[TC_SHA256_BLOCK_SIZE];
size_t leftover_offset;
Expand Down