Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 72) sorted by relevance

123

/mcuboot-latest/ext/tinycrypt/lib/source/
Dhmac.c37 static void rekey(uint8_t *key, const uint8_t *new_key, unsigned int key_size) in rekey() argument
44 key[i] = inner_pad ^ new_key[i]; in rekey()
45 key[i + TC_SHA256_BLOCK_SIZE] = outer_pad ^ new_key[i]; in rekey()
48 key[i] = inner_pad; key[i + TC_SHA256_BLOCK_SIZE] = outer_pad; in rekey()
52 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key, in tc_hmac_set_key() argument
58 key == (const uint8_t *) 0 || in tc_hmac_set_key()
78 (void)tc_sha256_final(&dummy_state.key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
82 rekey(ctx->key, key, key_size); in tc_hmac_set_key()
85 (void)tc_sha256_update(&ctx->hash_state, key, key_size); in tc_hmac_set_key()
86 (void)tc_sha256_final(&ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
[all …]
Dhmac_prng.c88 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update()
90 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
102 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update()
104 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
125 _set(prng->key, 0x00, sizeof(prng->key)); in tc_hmac_prng_init()
127 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in tc_hmac_prng_init()
/mcuboot-latest/scripts/imgtool/keys/
Decdsa.py26 def __init__(self, key): argument
27 self.key = key
33 return self.key
65 def __init__(self, key): argument
66 self.key = key
69 return self.key.public_key()
136 pem = self.key.private_bytes(
148 def __init__(self, key): argument
149 super().__init__(key)
150 self.key = key
[all …]
Ded25519.py18 def __init__(self, key): argument
19 self.key = key
28 return self.key
66 k = self.key
67 if isinstance(self.key, ed25519.Ed25519PrivateKey):
68 k = self.key.public_key()
77 def __init__(self, key): argument
79 self.key = key
87 return self.key.public_key()
102 pem = self.key.private_bytes(
[all …]
Dx25519.py20 def __init__(self, key): argument
21 self.key = key
30 return self.key
72 def __init__(self, key): argument
74 self.key = key
82 return self.key.public_key()
103 pem = self.key.private_bytes(
112 return self.key.sign(data=digest)
116 k = self.key
117 if isinstance(self.key, x25519.X25519PrivateKey):
[all …]
Drsa.py27 def __init__(self, key): argument
28 self.key = key
31 return self.key.key_size
40 return self.key
77 k = self.key
78 if isinstance(self.key, rsa.RSAPrivateKey):
79 k = self.key.public_key()
90 def __init__(self, key): argument
92 self.key = key
106 return self.key.public_key()
[all …]
/mcuboot-latest/ext/tinycrypt/tests/
Dtest_hmac.c75 const uint8_t key[20] = { in test_1() local
90 (void)tc_hmac_set_key(&h, key, sizeof(key)); in test_1()
101 const uint8_t key[4] = { in test_2() local
117 (void)tc_hmac_set_key(&h, key, sizeof(key)); in test_2()
129 const uint8_t key[20] = { in test_3() local
148 (void)tc_hmac_set_key(&h, key, sizeof(key)); in test_3()
161 const uint8_t key[25] = { in test_4() local
181 (void)tc_hmac_set_key(&h, key, sizeof(key)); in test_4()
193 const uint8_t key[20] = { in test_5() local
209 (void)tc_hmac_set_key(&h, key, sizeof(key)); in test_5()
[all …]
Dtest_ccm_mode.c70 int do_test(const uint8_t *key, uint8_t *nonce, in do_test() argument
84 tc_aes128_set_encrypt_key(&sched, key); in do_test()
136 const uint8_t key[NUM_NIST_KEYS] = { in test_vector_1() local
163 result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), in test_vector_1()
173 const uint8_t key[NUM_NIST_KEYS] = { in test_vector_2() local
200 result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), in test_vector_2()
210 const uint8_t key[NUM_NIST_KEYS] = { in test_vector_3() local
239 result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, in test_vector_3()
249 const uint8_t key[NUM_NIST_KEYS] = { in test_vector_4() local
277 result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), in test_vector_4()
[all …]
Dtest_cbc_mode.c72 const uint8_t key[16] = { variable
114 (void)tc_aes128_set_encrypt_key(&a, key); in test_1_and_2()
132 (void)tc_aes128_set_decrypt_key(&a, key); in test_1_and_2()
/mcuboot-latest/boot/boot_serial/src/
Dzcbor_bulk.c26 struct zcbor_string key; in zcbor_map_decode_bulk() local
30 ok = zcbor_tstr_decode(zsd, &key); in zcbor_map_decode_bulk()
37 if (key.len == dptr->key.len && in zcbor_map_decode_bulk()
38 memcmp(key.value, dptr->key.value, key.len) == 0) { in zcbor_map_decode_bulk()
/mcuboot-latest/boot/cypress/MCUBootApp/
Dkeys.c123 .key = rsa_pub_key,
128 .key = ecdsa_pub_key,
133 .key = NULL,
144 .key = 0,
167 .key = enc_priv_key,
/mcuboot-latest/boot/zephyr/
Dkeys.c55 .key = rsa_pub_key,
58 .key = ecdsa_pub_key,
61 .key = ed25519_pub_key,
72 .key = 0,
83 .key = enc_priv_key,
/mcuboot-latest/testplan/mynewt/keys/ec256/src/
Dkeys.c2 static unsigned char key[] = { variable
15 .key = key,
/mcuboot-latest/testplan/mynewt/keys/rsa/src/
Dkeys.c2 static unsigned char key[] = { variable
30 .key = key,
/mcuboot-latest/sim/mcuboot-sys/csupport/
Dkeys.c163 .key = root_pub_der,
275 .key = enc_key,
296 .key = enc_key,
313 .key = enc_key,
327 .key = enc_key,
/mcuboot-latest/boot/espressif/
Dkeys.c34 .key = rsa_pub_key,
37 .key = ecdsa_pub_key,
40 .key = ed25519_pub_key,
51 .key = 0,
/mcuboot-latest/boot/mbed/
Dapp_enc_keys.c45 .key = rsa_pub_key,
48 .key = ecdsa_pub_key,
51 .key = ed25519_pub_key,
64 .key = enc_priv_key,
/mcuboot-latest/scripts/imgtool/
Dmain.py103 key = keys.load(keyfile)
104 if key is not None:
105 return key
130 def keygen(type, key, password): argument
132 keygens[type](key, password)
148 def getpub(key, encoding, lang, output): argument
156 key = load_key(key)
160 if key is None:
163 key.emit_c_public(file=output)
165 key.emit_rust_public(file=output)
[all …]
Ddumpinfo.py31 TLV_TYPES = dict((value, key) for key, value in image.TLV_VALUES.items())
143 for i, key in enumerate(HEADER_ITEMS):
144 if key == "version":
145 header[key] = "{}.{}.{}+{}".format(*_version)
147 header[key] = _header[i]
261 for key, value in header.items():
262 if key == "flags":
277 print(key, ":", " " * (19 - len(key)), value, sep="")
/mcuboot-latest/boot/bootutil/include/bootutil/crypto/
Daes_kw.h56 …context *ctx, const uint8_t *wrapped_key, uint32_t wrapped_key_len, uint8_t *key, uint32_t key_len) in bootutil_aes_kw_unwrap() argument
59 …return mbedtls_nist_kw_unwrap(ctx, MBEDTLS_KW_MODE_KW, wrapped_key, wrapped_key_len, key, &olen, k… in bootutil_aes_kw_unwrap()
94 …context *ctx, const uint8_t *wrapped_key, uint32_t wrapped_key_len, uint8_t *key, uint32_t key_len) in bootutil_aes_kw_unwrap() argument
106 key[k] = wrapped_key[8 + k]; in bootutil_aes_kw_unwrap()
107 key[8 + k] = wrapped_key[16 + k]; in bootutil_aes_kw_unwrap()
114 B[8 + k] = key[((i-1) * 8) + k]; in bootutil_aes_kw_unwrap()
122 key[((i-1) * 8) + k] = B[8 + k]; in bootutil_aes_kw_unwrap()
Dhmac_sha256.h52 …util_hmac_sha256_set_key(bootutil_hmac_sha256_context *ctx, const uint8_t *key, unsigned int key_s… in bootutil_hmac_sha256_set_key() argument
55 rc = tc_hmac_set_key(ctx, key, key_size); in bootutil_hmac_sha256_set_key()
103 …util_hmac_sha256_set_key(bootutil_hmac_sha256_context *ctx, const uint8_t *key, unsigned int key_s… in bootutil_hmac_sha256_set_key() argument
111 rc = mbedtls_md_hmac_starts(ctx, key, key_size); in bootutil_hmac_sha256_set_key()
/mcuboot-latest/docs/
Dimgtool.md20 or use rsa-3072, ecdsa-p256, or ed25519 for the type. The key type used
23 This key file is what is used to sign images, this file should be
28 time you use the private key.
30 ## [Incorporating the public key into the code](#incorporating-the-public-key-into-the-code)
32 There is a development key distributed with MCUboot that can be used
33 for testing. Since this private key is widely distributed, it should
35 key, as described above, you should replace the public key in the
40 the key file.
44 will extract the public key from the given private key file, and
46 into the key file. However, when the `MCUBOOT_HW_KEY` config option is
[all …]
/mcuboot-latest/boot/bootutil/include/bootutil/
Dsign_key.h37 const uint8_t *key; member
44 uint8_t *key;
/mcuboot-latest/ext/tinycrypt/lib/include/tinycrypt/
Dhmac.h76 uint8_t key[2*TC_SHA256_BLOCK_SIZE]; member
92 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key,
/mcuboot-latest/ptest/src/
Dmain.rs145 let key = fs.textual(); in start() localVariable
146 if self.running.contains(&key) || self.done.contains(&key) { in start()
147 warn!("Duplicate: {:?}", key); in start()
149 debug!("Starting: {} ({} running)", key, self.running.len() + 1); in start()
150 self.running.insert(key); in start()
155 let key = fs.textual(); in done() localVariable
156 self.running.remove(&key); in done()
157 self.done.insert(key.clone()); in done()
182 error!("Failure {} log:{:?} ({} running)", key, logname, in done()
188 error!("Unable to run test {:?} ({:?}", key, err); in done()

123