Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 56) sorted by relevance

123

/mcuboot-3.7.0/ext/tinycrypt/lib/source/
Dcmac_mode.c97 int tc_cmac_setup(TCCmacState_t s, const uint8_t *key, TCAesKeySched_t sched) in tc_cmac_setup() argument
101 if (s == (TCCmacState_t) 0 || in tc_cmac_setup()
107 _set(s, 0, sizeof(*s)); in tc_cmac_setup()
108 s->sched = sched; in tc_cmac_setup()
111 tc_aes128_set_encrypt_key(s->sched, key); in tc_cmac_setup()
114 _set(s->iv, 0, TC_AES_BLOCK_SIZE); in tc_cmac_setup()
115 tc_aes_encrypt(s->iv, s->iv, s->sched); in tc_cmac_setup()
116 gf_double (s->K1, s->iv); in tc_cmac_setup()
117 gf_double (s->K2, s->K1); in tc_cmac_setup()
120 tc_cmac_init(s); in tc_cmac_setup()
[all …]
Daes_decrypt.c62 int tc_aes128_set_decrypt_key(TCAesKeySched_t s, const uint8_t *k) in tc_aes128_set_decrypt_key() argument
64 return tc_aes128_set_encrypt_key(s, k); in tc_aes128_set_decrypt_key()
81 static inline void inv_mix_columns(uint8_t *s) in inv_mix_columns() argument
85 mult_row_column(t, s); in inv_mix_columns()
86 mult_row_column(&t[Nb], s+Nb); in inv_mix_columns()
87 mult_row_column(&t[2*Nb], s+(2*Nb)); in inv_mix_columns()
88 mult_row_column(&t[3*Nb], s+(3*Nb)); in inv_mix_columns()
89 (void)_copy(s, sizeof(t), t, sizeof(t)); in inv_mix_columns()
92 static inline void add_round_key(uint8_t *s, const unsigned int *k) in add_round_key() argument
94 s[0] ^= (uint8_t)(k[0] >> 24); s[1] ^= (uint8_t)(k[0] >> 16); in add_round_key()
[all …]
Dsha256.c39 int tc_sha256_init(TCSha256State_t s) in tc_sha256_init() argument
42 if (s == (TCSha256State_t) 0) { in tc_sha256_init()
52 _set((uint8_t *) s, 0x00, sizeof(*s)); in tc_sha256_init()
53 s->iv[0] = 0x6a09e667; in tc_sha256_init()
54 s->iv[1] = 0xbb67ae85; in tc_sha256_init()
55 s->iv[2] = 0x3c6ef372; in tc_sha256_init()
56 s->iv[3] = 0xa54ff53a; in tc_sha256_init()
57 s->iv[4] = 0x510e527f; in tc_sha256_init()
58 s->iv[5] = 0x9b05688c; in tc_sha256_init()
59 s->iv[6] = 0x1f83d9ab; in tc_sha256_init()
[all …]
Daes_encrypt.c70 int tc_aes128_set_encrypt_key(TCAesKeySched_t s, const uint8_t *k) in tc_aes128_set_encrypt_key() argument
79 if (s == (TCAesKeySched_t) 0) { in tc_aes128_set_encrypt_key()
86 s->words[i] = (k[Nb*i]<<24) | (k[Nb*i+1]<<16) | in tc_aes128_set_encrypt_key()
91 t = s->words[i-1]; in tc_aes128_set_encrypt_key()
95 s->words[i] = s->words[i-Nk] ^ t; in tc_aes128_set_encrypt_key()
101 static inline void add_round_key(uint8_t *s, const unsigned int *k) in add_round_key() argument
103 s[0] ^= (uint8_t)(k[0] >> 24); s[1] ^= (uint8_t)(k[0] >> 16); in add_round_key()
104 s[2] ^= (uint8_t)(k[0] >> 8); s[3] ^= (uint8_t)(k[0]); in add_round_key()
105 s[4] ^= (uint8_t)(k[1] >> 24); s[5] ^= (uint8_t)(k[1] >> 16); in add_round_key()
106 s[6] ^= (uint8_t)(k[1] >> 8); s[7] ^= (uint8_t)(k[1]); in add_round_key()
[all …]
Decc_dsa.c105 uECC_word_t s[NUM_ECC_WORDS]; in uECC_sign_with_k() local
106 uECC_word_t *k2[2] = {tmp, s}; in uECC_sign_with_k()
119 carry = regularize_k(k, tmp, s, curve); in uECC_sign_with_k()
146 s[num_n_words - 1] = 0; in uECC_sign_with_k()
147 uECC_vli_set(s, p, num_words); in uECC_sign_with_k()
148 uECC_vli_modMult(s, tmp, s, curve->n, num_n_words); /* s = r*d */ in uECC_sign_with_k()
151 uECC_vli_modAdd(s, tmp, s, curve->n, num_n_words); /* s = e + r*d */ in uECC_sign_with_k()
152 uECC_vli_modMult(s, s, k, curve->n, num_n_words); /* s = (e + r*d) / k */ in uECC_sign_with_k()
153 if (uECC_vli_numBits(s, num_n_words) > (bitcount_t)curve->num_bytes * 8) { in uECC_sign_with_k()
157 uECC_vli_nativeToBytes(signature + curve->num_bytes, curve->num_bytes, s); in uECC_sign_with_k()
[all …]
/mcuboot-3.7.0/ext/tinycrypt-sha512/lib/source/
Dsha512.c39 int tc_sha512_init(TCSha512State_t s) in tc_sha512_init() argument
42 if (s == (TCSha512State_t) 0) { in tc_sha512_init()
52 _set((uint8_t *) s, 0x00, sizeof(*s)); in tc_sha512_init()
53 s->iv[0] = 0x6a09e667f3bcc908; in tc_sha512_init()
54 s->iv[1] = 0xbb67ae8584caa73b; in tc_sha512_init()
55 s->iv[2] = 0x3c6ef372fe94f82b; in tc_sha512_init()
56 s->iv[3] = 0xa54ff53a5f1d36f1; in tc_sha512_init()
57 s->iv[4] = 0x510e527fade682d1; in tc_sha512_init()
58 s->iv[5] = 0x9b05688c2b3e6c1f; in tc_sha512_init()
59 s->iv[6] = 0x1f83d9abfb41bd6b; in tc_sha512_init()
[all …]
/mcuboot-3.7.0/ext/tinycrypt/tests/
Dtest_sha256.c65 struct tc_sha256_state_struct s; in test_1() local
67 (void)tc_sha256_init(&s); in test_1()
68 tc_sha256_update(&s, (const uint8_t *) m, strlen(m)); in test_1()
69 (void)tc_sha256_final(digest, &s); in test_1()
90 struct tc_sha256_state_struct s; in test_2() local
92 (void)tc_sha256_init(&s); in test_2()
93 tc_sha256_update(&s, (const uint8_t *) m, strlen(m)); in test_2()
94 (void) tc_sha256_final(digest, &s); in test_2()
113 struct tc_sha256_state_struct s; in test_3() local
115 (void)tc_sha256_init(&s); in test_3()
[all …]
Dtest_aes.c89 struct tc_aes_key_sched_struct s; in test_1() local
93 if (tc_aes128_set_encrypt_key(&s, nist_key) == 0) { in test_1()
100 result = check_result(1, expected.words, sizeof(expected.words), s.words, in test_1()
101 sizeof(s.words)); in test_1()
126 struct tc_aes_key_sched_struct s; in test_2() local
131 (void)tc_aes128_set_encrypt_key(&s, nist_key); in test_2()
132 if (tc_aes_encrypt(ciphertext, nist_input, &s) == 0) { in test_2()
149 TCAesKeySched_t s) in var_text_test() argument
155 (void)tc_aes_encrypt(ciphertext, in, s); in var_text_test()
159 if (tc_aes_decrypt(decrypted, ciphertext, s) == 0) { in var_text_test()
[all …]
Dtest_cmac_mode.c54 static void show(const char *label, const uint8_t *s, size_t slen) in show() argument
60 TC_PRINT("%02x", s[i]); in show()
68 struct tc_cmac_struct s) in verify_gf_2_128_double() argument
90 tc_aes_encrypt(L, zero, s.sched); in verify_gf_2_128_double()
118 static int verify_cmac_null_msg(TCCmacState_t s) in verify_cmac_null_msg() argument
130 (void) tc_cmac_init(s); in verify_cmac_null_msg()
131 (void) tc_cmac_update(s, (const uint8_t *) 0, 0); in verify_cmac_null_msg()
132 (void) tc_cmac_final(Tag, s); in verify_cmac_null_msg()
145 static int verify_cmac_1_block_msg(TCCmacState_t s) in verify_cmac_1_block_msg() argument
161 (void) tc_cmac_init(s); in verify_cmac_1_block_msg()
[all …]
Dtest_hmac_prng.c54 void show(const char *label, const uint8_t *s, size_t len) in show() argument
59 printf ("%02x", s[i]); in show()
64 void printBinaryFile(const uint8_t *s, unsigned int slen) in printBinaryFile() argument
68 fwrite(s, slen, 1, write_ptr); in printBinaryFile()
/mcuboot-3.7.0/ext/tinycrypt/lib/include/tinycrypt/
Dcmac_mode.h142 int tc_cmac_setup(TCCmacState_t s, const uint8_t *key,
153 int tc_cmac_erase(TCCmacState_t s);
163 int tc_cmac_init(TCCmacState_t s);
176 int tc_cmac_update(TCCmacState_t s, const uint8_t *data, size_t dlen);
188 int tc_cmac_final(uint8_t *tag, TCCmacState_t s);
Daes.h79 int tc_aes128_set_encrypt_key(TCAesKeySched_t s, const uint8_t *k);
94 const TCAesKeySched_t s);
110 int tc_aes128_set_decrypt_key(TCAesKeySched_t s, const uint8_t *k);
124 const TCAesKeySched_t s);
Dsha256.h87 int tc_sha256_init(TCSha256State_t s);
105 int tc_sha256_update (TCSha256State_t s, const uint8_t *data, size_t datalen);
123 int tc_sha256_final(uint8_t *digest, TCSha256State_t s);
/mcuboot-3.7.0/ext/tinycrypt-sha512/lib/include/tinycrypt/
Dsha512.h87 int tc_sha512_init(TCSha512State_t s);
105 int tc_sha512_update (TCSha512State_t s, const uint8_t *data, size_t datalen);
123 int tc_sha512_final(uint8_t *digest, TCSha512State_t s);
/mcuboot-3.7.0/ext/fiat/src/
Dcurve25519.c119 static void fe_frombytes_strict(fe *h, const uint8_t s[32]) { in fe_frombytes_strict()
121 assert((s[31] & 0x80) == 0); in fe_frombytes_strict()
122 fiat_25519_from_bytes(h->v, s); in fe_frombytes_strict()
126 static void fe_frombytes(fe *h, const uint8_t s[32]) { in fe_frombytes()
128 memcpy(s_copy, s, 32); in fe_frombytes()
133 static void fe_tobytes(uint8_t s[32], const fe *f) { in fe_tobytes()
135 fiat_25519_to_bytes(s, f->v); in fe_tobytes()
321 uint8_t s[32]; in fe_isnonzero() local
322 fe_tobytes(s, &tight); in fe_isnonzero()
325 return CRYPTO_memcmp(s, zero, sizeof(zero)) != 0; in fe_isnonzero()
[all …]
/mcuboot-3.7.0/ext/mbedtls-asn1/include/mbedtls/
Dplatform.h217 int mbedtls_platform_win32_snprintf( char *s, size_t n, const char *fmt, ... );
221 extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... );
231 int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n,
253 int mbedtls_platform_win32_vsnprintf( char *s, size_t n, const char *fmt, va_list arg );
258 extern int (*mbedtls_vsnprintf)( char * s, size_t n, const char * format, va_list arg );
267 int mbedtls_platform_set_vsnprintf( int (*vsnprintf_func)( char * s, size_t n,
Decdsa.h169 int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
214 mbedtls_mpi *s, const mbedtls_mpi *d,
256 const mbedtls_mpi *s);
/mcuboot-3.7.0/ext/tinycrypt/tests/include/
Dtest_utils.h87 static inline void show_str(const char *label, const uint8_t *s, size_t len) in show_str() argument
93 TC_PRINT("%02x", s[i]); in show_str()
/mcuboot-3.7.0/boot/cypress/MCUBootApp/
DExternalMemory.md14 The design is based on using SFDP command's auto-discovery functionality of memory module IC and Cy…
16 It is assumed that user's design meets following:
21 This corresponds to PSoC6's SMIF (Serial Memory InterFace) IP block mapping.
57 MCUBootApp's `main.c` contains the call to Init-SFDP API which performs required GPIO configuration…
66 …o `cy_flash_map.c` and check if secondary slot start address and size meet the application's needs.
78 `ERASED_VALUE` defines the memory cell contents in erased state. It is `0x00` for PSoC6's internal …
86 ${OPENOCD}/bin/openocd -s ${OPENOCD}/scripts \
/mcuboot-3.7.0/docs/
Dreadme-mynewt.md3 Due to small differences between Mynewt's bundled bootloader and MCUboot,
21 Then update your app's `pkg.yml` adding the extra dependency:
28 Also remove any dependency on `boot/bootutil` (mynewt's bundled bootloader)
DSECURITY.md48 - Issues will be entered into MCUboot's [security advisory
52 - The release notes will contain a reference to any allocated CVE(s).
/mcuboot-3.7.0/samples/zephyr/bad-keys/
DREADME.md5 the demo keys's public keys in the bootloader should result in it not
/mcuboot-3.7.0/samples/zephyr/hello-world/
DREADME.rst6 application's code.
/mcuboot-3.7.0/boot/mbed/
DCMakeLists.txt50 # The cross-dependency requires that bootutil have access to the mbed port's
/mcuboot-3.7.0/ext/nrf/
DREADME.md5 …b.com/NordicPlayground/nrfxlib) next to the MCUboot root folder. So that it's located `../nrfxlib`…

123