| /u-boot/lib/rsa/ |
| A D | rsa-mod-exp.c | 196 uint32_t val[key->len], acc[key->len], tmp[key->len]; in pow_mod() 201 for (i = 0, ptr = inout + key->len - 1; i < key->len; i++, ptr--) in pow_mod() 219 montgomery_mul(key, acc, val, key->rr); /* acc = a * RR / R mod n */ in pow_mod() 282 if (key.len > RSA_MAX_KEY_BITS || key.len < RSA_MIN_KEY_BITS) { in rsa_mod_exp_sw() 288 uint32_t key1[key.len], key2[key.len]; in rsa_mod_exp_sw() 290 key.modulus = key1; in rsa_mod_exp_sw() 291 key.rr = key2; in rsa_mod_exp_sw() 292 rsa_convert_big_endian(key.modulus, (uint32_t *)prop->modulus, key.len); in rsa_mod_exp_sw() 293 rsa_convert_big_endian(key.rr, (uint32_t *)prop->rr, key.len); in rsa_mod_exp_sw() 294 if (!key.modulus || !key.rr) { in rsa_mod_exp_sw() [all …]
|
| /u-boot/lib/crypto/ |
| A D | rsa_helper.c | 51 key->n = value; in rsa_get_n() 52 key->n_sz = vlen; in rsa_get_n() 63 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_e() 66 key->e = value; in rsa_get_e() 67 key->e_sz = vlen; in rsa_get_e() 78 if (!value || !key->n_sz || !vlen || vlen > key->n_sz) in rsa_get_d() 81 key->d = value; in rsa_get_d() 82 key->d_sz = vlen; in rsa_get_d() 96 key->p = value; in rsa_get_p() 111 key->q = value; in rsa_get_q() [all …]
|
| A D | public_key.c | 48 if (key) in public_key_describe() 49 seq_printf(m, "%s.%s", key->id_type, key->pkey_algo); in public_key_describe() 58 if (key) { in public_key_free() 59 kfree(key->key); in public_key_free() 61 kfree(key); in public_key_free() 133 info.key = pkey->key; in public_key_verify_signature() 219 if (!key) in software_key_query() 221 memcpy(key, pkey->key, pkey->keylen); in software_key_query() 288 if (!key) in software_key_eds_op() 291 memcpy(key, pkey->key, pkey->keylen); in software_key_eds_op() [all …]
|
| A D | asymmetric_type.c | 63 struct key *find_asymmetric_key(struct key *keyring, in find_asymmetric_key() 68 struct key *key; in find_asymmetric_key() local 135 return key; in find_asymmetric_key() 138 key_put(key); in find_asymmetric_key() 266 static bool asymmetric_key_cmp(const struct key *key, in asymmetric_key_cmp() argument 453 static void asymmetric_key_destroy(struct key *key) in asymmetric_key_destroy() argument 475 struct key *key) in asymmetric_restriction_alloc() argument 484 keyres->key = key; in asymmetric_restriction_alloc() 519 struct key *key; in asymmetric_lookup_restriction() local 538 key = NULL; in asymmetric_lookup_restriction() [all …]
|
| A D | Kconfig | 2 bool "Asymmetric (public-key cryptographic) key Support" 5 This option provides support for a key type that holds the data for 6 the asymmetric keys used for public key cryptographic operations such 13 bool "Asymmetric (public-key cryptographic) key Support within SPL" 22 bool "Asymmetric public-key crypto algorithm subtype" 30 bool "Asymmetric public-key crypto algorithm subtype within SPL" 39 bool "RSA public key parser" 47 key. 50 bool "RSA public key parser within SPL" 58 key in the SPL. [all …]
|
| /u-boot/lib/libavb/ |
| A D | avb_rsa.c | 26 IAvbKey* key = NULL; in iavb_parse_key_data() local 57 if (key == NULL) { in iavb_parse_key_data() 64 key->rr = key->n + key->len; in iavb_parse_key_data() 71 key->n[i] = avb_be32toh(((uint32_t*)n)[key->len - i - 1]); in iavb_parse_key_data() 72 key->rr[i] = avb_be32toh(((uint32_t*)rr)[key->len - i - 1]); in iavb_parse_key_data() 74 return key; in iavb_parse_key_data() 77 if (key != NULL) { in iavb_parse_key_data() 78 avb_free(key); in iavb_parse_key_data() 84 avb_free(key); in iavb_free_parsed_key() 134 subM(key, c); in montMulAdd() [all …]
|
| /u-boot/fs/ubifs/ |
| A D | key.h | 87 key->u32[0] = inum; in ino_key_init() 116 key->u32[0] = inum; in lowest_ino_key() 117 key->u32[1] = 0; in lowest_ino_key() 129 key->u32[0] = inum; in highest_ino_key() 147 key->u32[0] = inum; in dent_key_init() 164 key->u32[0] = inum; in dent_key_init_hash() 197 key->u32[0] = inum; in lowest_dent_key() 215 key->u32[0] = inum; in xent_key_init() 248 key->u32[0] = inum; in lowest_xent_key() 264 key->u32[0] = inum; in data_key_init() [all …]
|
| A D | tnc.c | 1564 key = &zbr->key; in ubifs_tnc_get_bu_keys() 1902 key = &znode->zbranch[0].key; in correct_parent_keys() 1983 union ubifs_key *key = &zbr->key, *key1; in tnc_insert() local 2114 zbr->key = zn->zbranch[0].key; in tnc_insert() 2137 zi->zbranch[0].key = znode->zbranch[0].key; in tnc_insert() 2142 zi->zbranch[1].key = zn->zbranch[0].key; in tnc_insert() 2186 key_copy(c, key, &zbr.key); in ubifs_tnc_add() 2357 key_copy(c, key, &zbr.key); in ubifs_tnc_add_nm() 2631 key = &znode->zbranch[n].key; in ubifs_tnc_remove_range() 2649 key = &znode->zbranch[i].key; in ubifs_tnc_remove_range() [all …]
|
| A D | tnc_misc.c | 140 cmp = keys_cmp(c, key, &zbr[mid].key); in ubifs_search_zbranch() 156 ubifs_assert(keys_cmp(c, key, &zbr[0].key) < 0); in ubifs_search_zbranch() 158 ubifs_assert(keys_cmp(c, key, &zbr[*n].key) > 0); in ubifs_search_zbranch() 160 ubifs_assert(keys_cmp(c, key, &zbr[*n + 1].key) < 0); in ubifs_search_zbranch() 301 key_read(c, &br->key, &zbr->key); in read_znode() 325 i, key_type(c, &zbr->key)); in read_znode() 333 type = key_type(c, &zbr->key); in read_znode() 361 key1 = &znode->zbranch[i].key; in read_znode() 454 union ubifs_key key1, *key = &zbr->key; in ubifs_tnc_read_node() local 471 dbg_tnck(key, "key "); in ubifs_tnc_read_node() [all …]
|
| /u-boot/arch/arm/mach-stm32mp/ |
| A D | cmd_stm32key.c | 104 printf("%s OTP %i: [%08x] %08x\n", key->name, key->start + i, in read_key_value() 117 for (i = 0, word = key->start; i < key->size; i++, word++) { in read_key_otp() 149 if (nb_zero == key->size) { in read_key_otp() 193 for (i = 0, word = key->start; i < key->size; i++, word++, addr += 4) { in fuse_key_value() 231 printf("%s : %s\n", key->name, key->desc); in display_key_info() 232 printf("\tOTP%d..%d\n", key->start, key->start + key->size); in display_key_info() 247 const struct stm32key *key; in do_stm32key_select() local 253 display_key_info(key); in do_stm32key_select() 258 key = get_key(i); in do_stm32key_select() 296 key = get_key(i); in do_stm32key_read() [all …]
|
| /u-boot/test/env/ |
| A D | hashtable.c | 24 char key[20]; in htab_fill() local 29 item.data = key; in htab_fill() 31 item.key = key; in htab_fill() 44 char key[20]; in htab_check_fill() local 50 item.data = key; in htab_check_fill() 51 item.key = key; in htab_check_fill() 54 ut_asserteq_str(key, ritem->key); in htab_check_fill() 67 char key[20]; in htab_create_delete() local 73 item.data = key; in htab_create_delete() 74 item.key = key; in htab_create_delete() [all …]
|
| /u-boot/lib/ecdsa/ |
| A D | ecdsa-verify.c | 34 key->size_bits = ecdsa_key_size(key->curve_name); in fdt_get_key() 35 if (key->size_bits == 0) { in fdt_get_key() 36 debug("Unknown ECDSA curve '%s'", key->curve_name); in fdt_get_key() 40 key->x = fdt_getprop(fdt, node, "ecdsa,x-point", &x_len); in fdt_get_key() 41 key->y = fdt_getprop(fdt, node, "ecdsa,y-point", &y_len); in fdt_get_key() 43 if (!key->x || !key->y) in fdt_get_key() 46 if (x_len != (key->size_bits / 8) || y_len != (key->size_bits / 8)) { in fdt_get_key() 48 node, key->curve_name, key->x, x_len, key->y, y_len); in fdt_get_key() 61 struct ecdsa_public_key key; in ecdsa_verify_hash() local 82 ret = fdt_get_key(&key, info->fdt_blob, key_node); in ecdsa_verify_hash() [all …]
|
| /u-boot/common/ |
| A D | menu.c | 28 char *key; member 90 puts(item->key); in menu_item_print() 107 if (item->key) in menu_item_destroy() 108 free(item->key); in menu_item_destroy() 217 if (key) in menu_interactive_choice() 326 if (!item->key) { in menu_item_add() 483 return key; in bootmenu_autoboot_loop() 498 key = BKEY_QUIT; in bootmenu_conv_key() 501 key = BKEY_UP; in bootmenu_conv_key() 523 return key; in bootmenu_conv_key() [all …]
|
| /u-boot/include/crypto/ |
| A D | public_key.h | 27 void *key; member 37 extern void public_key_free(struct public_key *key); 58 struct key; 62 extern int restrict_link_by_signature(struct key *dest_keyring, 65 struct key *trust_keyring); 67 extern int restrict_link_by_key_or_keyring(struct key *dest_keyring, 70 struct key *trusted); 72 extern int restrict_link_by_key_or_keyring_chain(struct key *trust_keyring, 75 struct key *trusted); 83 extern int verify_signature(const struct key *,
|
| /u-boot/fs/btrfs/ |
| A D | subvolume.c | 21 struct btrfs_key key; in get_path_in_subvol() local 37 key.objectid = cur; in get_path_in_subvol() 39 key.offset = (u64)-1; in get_path_in_subvol() 70 cur = key.offset; in get_path_in_subvol() 83 struct btrfs_key key; in list_one_subvol() local 100 key.objectid = cur; in list_one_subvol() 102 key.offset = (u64)-1; in list_one_subvol() 146 cur = key.offset; in list_one_subvol() 163 struct btrfs_key key; in list_subvolums() local 181 key.offset = 0; in list_subvolums() [all …]
|
| A D | inode.c | 25 struct btrfs_key key; in btrfs_readlink() local 29 key.objectid = ino; in btrfs_readlink() 31 key.offset = 0; in btrfs_readlink() 77 struct btrfs_key key; in lookup_root_ref() local 81 key.objectid = rootid; in lookup_root_ref() 83 key.offset = (u64)-1; in lookup_root_ref() 124 struct btrfs_key key; in get_parent_inode() local 153 key.objectid = ino; in get_parent_inode() 575 if (key.offset <= file_offset && key.offset + in lookup_data_extent() 602 if (key.offset <= file_offset && key.offset + in lookup_data_extent() [all …]
|
| A D | dir-item.c | 86 struct btrfs_key key; in btrfs_lookup_dir_item() local 92 key.objectid = dir; in btrfs_lookup_dir_item() 93 key.type = BTRFS_DIR_ITEM_KEY; in btrfs_lookup_dir_item() 95 key.offset = btrfs_name_hash(name, name_len); in btrfs_lookup_dir_item() 111 found_key.offset != key.offset) in btrfs_lookup_dir_item() 121 struct btrfs_key key; in btrfs_iter_dir() local 125 key.objectid = ino; in btrfs_iter_dir() 126 key.type = BTRFS_DIR_INDEX_KEY; in btrfs_iter_dir() 127 key.offset = 0; in btrfs_iter_dir() 129 ret = btrfs_search_slot(NULL, root, &key, &path, 0, 0); in btrfs_iter_dir() [all …]
|
| A D | btrfs.c | 23 struct btrfs_key key; in show_dir() local 44 btrfs_dir_item_key_to_cpu(eb, di, &key); in show_dir() 46 if (key.type == BTRFS_ROOT_ITEM_KEY) { in show_dir() 50 subvol = btrfs_read_fs_root(fs_info, &key); in show_dir() 82 key.objectid); in show_dir() 98 ASSERT(key.type == BTRFS_INODE_ITEM_KEY); in show_dir() 102 if (key.type == BTRFS_INODE_ITEM_KEY) in show_dir() 188 struct btrfs_key key; in btrfs_size() local 204 key.objectid = ino; in btrfs_size() 205 key.type = BTRFS_INODE_ITEM_KEY; in btrfs_size() [all …]
|
| /u-boot/lib/efi_loader/ |
| A D | efi_console.c | 665 struct efi_key_data key; member 887 key->key = pressed_key; in efi_cin_read_key() 903 if (item->key.key.unicode_char || item->key.key.scan_code) { in efi_cin_notify() 904 if (item->key.key.unicode_char != in efi_cin_notify() 906 item->key.key.scan_code != next_key.key.scan_code) in efi_cin_notify() 1228 struct efi_input_key *key) in efi_cin_read_key_stroke() argument 1235 if (!this || !key) { in efi_cin_read_key_stroke() 1250 *key = next_key.key; in efi_cin_read_key_stroke() 1381 struct efi_input_key key; in efi_console_get_u16_string() local 1406 } else if (key.unicode_char == 0x3 || key.scan_code == 23) { in efi_console_get_u16_string() [all …]
|
| /u-boot/scripts/kconfig/lxdialog/ |
| A D | menubox.c | 270 key = wgetch(menu); in dialog_menu() 272 if (key < 256 && isalpha(key)) in dialog_menu() 273 key = tolower(key); in dialog_menu() 295 key == KEY_UP || key == KEY_DOWN || in dialog_menu() 296 key == '-' || key == '+' || in dialog_menu() 297 key == KEY_PPAGE || key == KEY_NPAGE)) { in dialog_menu() 301 if (key == KEY_UP || key == '-') { in dialog_menu() 310 } else if (key == KEY_DOWN || key == '+') { in dialog_menu() 360 switch (key) { in dialog_menu() 386 switch (key) { in dialog_menu() [all …]
|
| /u-boot/doc/usage/fit/ |
| A D | verified-boot.rst | 18 A key point is that it is possible to field-upgrade the software on machines 29 Images are signed using a private key known only to the signer, but can 30 be verified using a public key. As its name suggests the public key can be 42 | RSA key pair | * +---------------+ 43 | .key .crt | * | Public key in | 44 +--------------+ +------> public key ----->| trusted place | 66 The public key from the signer allows us to verify and therefore trust 81 #. Master private key is used by the signer to sign a first-stage image. 82 #. Master public key is placed in read-only memory. 84 #. Secondary public key is placed in first stage images [all …]
|
| /u-boot/lib/ |
| A D | hashtable.c | 156 free((void *)ep->key); in hdestroy_r() 244 && strcmp(item.key, htab->table[idx].entry.key) == 0) { in _compare_and_overwrite_entry() 299 hval += item.key[count]; in hsearch_r() 384 htab->table[idx].entry.key = strdup(item.key); in hsearch_r() 448 free((void *)ep->key); in _hdelete() 463 e.key = (char *)key; in hdelete_r() 475 "%s, skipping it!\n", key); in hdelete_r() 542 return (strcmp(e1->key, e2->key)); in cmpkey() 639 totlen += strlen(ep->key); in hexport_r() 702 s = list[i]->key; in hexport_r() [all …]
|
| /u-boot/include/keys/ |
| A D | asymmetric-type.h | 73 const struct asymmetric_key_ids *asymmetric_key_ids(const struct key *key) in asymmetric_key_ids() argument 75 return key->payload.data[asym_key_ids]; in asymmetric_key_ids() 78 extern struct key *find_asymmetric_key(struct key *keyring,
|
| /u-boot/arch/arm/mach-tegra/ |
| A D | crypto.c | 50 static void sign_object(u8 *key, u8 *key_schedule, u8 *src, u8 *dst, in sign_object() argument 104 static int tegra_crypto_core(u8 *key, enum security_op oper, u8 *src, in tegra_crypto_core() argument 113 aes_expand_key(key, AES128_KEY_LENGTH, key_schedule); in tegra_crypto_core() 136 sign_object(key, key_schedule, src, sig_dst, num_aes_blocks); in tegra_crypto_core() 152 int sign_enc_data_block(u8 *source, unsigned int length, u8 *signature, u8 *key) in sign_enc_data_block() argument 154 return tegra_crypto_core(key, SECURITY_SIGN, source, in sign_enc_data_block() 158 int encrypt_data_block(u8 *source, unsigned int length, u8 *key) in encrypt_data_block() argument 160 return tegra_crypto_core(key, SECURITY_ENCRYPT, source, in encrypt_data_block() 164 int decrypt_data_block(u8 *source, unsigned int length, u8 *key) in decrypt_data_block() argument 166 return tegra_crypto_core(key, SECURITY_DECRYPT, source, in decrypt_data_block()
|
| /u-boot/tools/ |
| A D | key2dtsi.py | 40 key = RSA.importKey(key_data) variable 42 r_squared = (2**key.size_in_bits())**2 % key.n 43 n0_inverse = 2**32 - inverse(key.n, 2**32) 50 out.write('\t\t\talgo = "{},rsa{}";\n'.format(args.hash, key.size_in_bits())) 51 out.write('\t\t\trsa,num-bits = <{}>;\n'.format(key.size_in_bits())) 52 out.write('\t\t\trsa,modulus = [{}];\n'.format(int_to_bytestr(key.n))) 53 out.write('\t\t\trsa,exponent = [{}];\n'.format(int_to_bytestr(key.e, 8)))
|