| /rk3399_rockchip-uboot/lib/rsa/ |
| H A D | rsa-mod-exp.c | 37 static void subtract_modulus(const struct rsa_public_key *key, uint32_t num[]) in subtract_modulus() argument 42 for (i = 0; i < key->len; i++) { in subtract_modulus() 43 acc += (uint64_t)num[i] - key->modulus[i]; in subtract_modulus() 56 static int greater_equal_modulus(const struct rsa_public_key *key, in greater_equal_modulus() argument 61 for (i = (int)key->len - 1; i >= 0; i--) { in greater_equal_modulus() 62 if (num[i] < key->modulus[i]) in greater_equal_modulus() 64 if (num[i] > key->modulus[i]) in greater_equal_modulus() 81 static void montgomery_mul_add_step(const struct rsa_public_key *key, in montgomery_mul_add_step() argument 89 d0 = (uint32_t)acc_a * key->n0inv; in montgomery_mul_add_step() 90 acc_b = (uint64_t)d0 * key->modulus[0] + (uint32_t)acc_a; in montgomery_mul_add_step() [all …]
|
| H A D | rsa-sign.c | 60 EVP_PKEY *key; in rsa_pem_get_pub_key() local 84 key = X509_get_pubkey(cert); in rsa_pem_get_pub_key() 85 if (!key) { in rsa_pem_get_pub_key() 92 rsa = EVP_PKEY_get1_RSA(key); in rsa_pem_get_pub_key() 99 EVP_PKEY_free(key); in rsa_pem_get_pub_key() 106 EVP_PKEY_free(key); in rsa_pem_get_pub_key() 128 EVP_PKEY *key; in rsa_engine_get_pub_key() local 150 key = ENGINE_load_public_key(engine, key_id, NULL, NULL); in rsa_engine_get_pub_key() 151 if (!key) in rsa_engine_get_pub_key() 155 rsa = EVP_PKEY_get1_RSA(key); in rsa_engine_get_pub_key() [all …]
|
| /rk3399_rockchip-uboot/lib/avb/libavb/ |
| H A D | avb_rsa.c | 49 IAvbKey* key = NULL; in iavb_parse_key_data() local 79 key = (IAvbKey*)(avb_malloc(sizeof(IAvbKey) + 2 * h.key_num_bits / 8)); in iavb_parse_key_data() 80 if (key == NULL) { in iavb_parse_key_data() 84 key->len = h.key_num_bits / 32; in iavb_parse_key_data() 85 key->n0inv = h.n0inv; in iavb_parse_key_data() 86 key->n = (uint32_t*)(key + 1); /* Skip ahead sizeof(IAvbKey) bytes. */ in iavb_parse_key_data() 87 key->rr = key->n + key->len; in iavb_parse_key_data() 93 for (i = 0; i < key->len; i++) { in iavb_parse_key_data() 94 key->n[i] = avb_be32toh(((uint32_t*)n)[key->len - i - 1]); in iavb_parse_key_data() 95 key->rr[i] = avb_be32toh(((uint32_t*)rr)[key->len - i - 1]); in iavb_parse_key_data() [all …]
|
| H A D | avb_property_descriptor.c | 62 const char* key; member 92 data->key, in property_lookup_desc_foreach() 109 const char* key, in avb_property_lookup() argument 115 key_size = avb_strlen(key); in avb_property_lookup() 118 data.key = key; in avb_property_lookup() 137 const char* key, in avb_property_lookup_uint64() argument 146 value = avb_property_lookup(image_data, image_size, key, key_size, NULL); in avb_property_lookup_uint64()
|
| /rk3399_rockchip-uboot/fs/ubifs/ |
| H A D | key.h | 86 union ubifs_key *key, ino_t inum) in ino_key_init() argument 88 key->u32[0] = inum; in ino_key_init() 89 key->u32[1] = UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS; in ino_key_init() 101 union ubifs_key *key = k; in ino_key_init_flash() local 103 key->j32[0] = cpu_to_le32(inum); in ino_key_init_flash() 104 key->j32[1] = cpu_to_le32(UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS); in ino_key_init_flash() 115 union ubifs_key *key, ino_t inum) in lowest_ino_key() argument 117 key->u32[0] = inum; in lowest_ino_key() 118 key->u32[1] = 0; in lowest_ino_key() 128 union ubifs_key *key, ino_t inum) in highest_ino_key() argument [all …]
|
| H A D | tnc.c | 51 static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key, 322 ubifs_assert(is_hash_key(c, &zbr->key)); in lnc_add() 397 ubifs_assert(is_hash_key(c, &zbr->key)); in tnc_read_node_nm() 407 err = fallible_read_node(c, &zbr->key, zbr, node); in tnc_read_node_nm() 499 static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key, in fallible_read_node() argument 504 dbg_tnck(key, "LEB %d:%d, key ", zbr->lnum, zbr->offs); in fallible_read_node() 506 ret = try_read_node(c, node, key_type(c, key), zbr->len, zbr->lnum, in fallible_read_node() 513 key_read(c, &dent->key, &node_key); in fallible_read_node() 514 if (keys_cmp(c, key, &node_key) != 0) in fallible_read_node() 518 dbg_mntk(key, "dangling branch LEB %d:%d len %d, key ", in fallible_read_node() [all …]
|
| H A D | tnc_misc.c | 129 const union ubifs_key *key, int *n) in ubifs_search_zbranch() argument 139 cmp = keys_cmp(c, key, &zbr[mid].key); in ubifs_search_zbranch() 155 ubifs_assert(keys_cmp(c, key, &zbr[0].key) < 0); in ubifs_search_zbranch() 157 ubifs_assert(keys_cmp(c, key, &zbr[*n].key) > 0); in ubifs_search_zbranch() 159 ubifs_assert(keys_cmp(c, key, &zbr[*n + 1].key) < 0); in ubifs_search_zbranch() 300 key_read(c, &br->key, &zbr->key); in read_znode() 316 switch (key_type(c, &zbr->key)) { in read_znode() 324 i, key_type(c, &zbr->key)); in read_znode() 332 type = key_type(c, &zbr->key); in read_znode() 360 key1 = &znode->zbranch[i].key; in read_znode() [all …]
|
| H A D | replay.c | 56 union ubifs_key key; member 198 ino = key_inum(c, &r->key); in trun_remove_range() 217 dbg_mntk(&r->key, "LEB %d:%d len %d deletion %d sqnum %llu key ", in apply_replay_entry() 223 if (is_hash_key(c, &r->key)) { in apply_replay_entry() 225 err = ubifs_tnc_remove_nm(c, &r->key, &r->nm); in apply_replay_entry() 227 err = ubifs_tnc_add_nm(c, &r->key, r->lnum, r->offs, in apply_replay_entry() 231 switch (key_type(c, &r->key)) { in apply_replay_entry() 234 ino_t inum = key_inum(c, &r->key); in apply_replay_entry() 243 err = ubifs_tnc_remove(c, &r->key); in apply_replay_entry() 247 err = ubifs_tnc_add(c, &r->key, r->lnum, r->offs, in apply_replay_entry() [all …]
|
| H A D | gc.c | 129 ubifs_assert(key_type(c, &sa->key) == UBIFS_DATA_KEY); in data_nodes_cmp() 130 ubifs_assert(key_type(c, &sb->key) == UBIFS_DATA_KEY); in data_nodes_cmp() 134 inuma = key_inum(c, &sa->key); in data_nodes_cmp() 135 inumb = key_inum(c, &sb->key); in data_nodes_cmp() 138 unsigned int blka = key_block(c, &sa->key); in data_nodes_cmp() 139 unsigned int blkb = key_block(c, &sb->key); in data_nodes_cmp() 173 ubifs_assert(key_type(c, &sa->key) != UBIFS_DATA_KEY && in nondata_nodes_cmp() 174 key_type(c, &sb->key) != UBIFS_DATA_KEY); in nondata_nodes_cmp() 187 ubifs_assert(key_type(c, &sa->key) == UBIFS_DENT_KEY || in nondata_nodes_cmp() 188 key_type(c, &sa->key) == UBIFS_XENT_KEY); in nondata_nodes_cmp() [all …]
|
| /rk3399_rockchip-uboot/drivers/input/ |
| H A D | rk8xx_pwrkey.c | 17 struct dm_key_uclass_platdata *key; in rk8xx_pwron_rise_handler() local 19 key = dev_get_uclass_platdata(dev); in rk8xx_pwron_rise_handler() 20 key->rise_ms = key_timer(0); in rk8xx_pwron_rise_handler() 22 debug("%s: %llu ms\n", __func__, key->rise_ms); in rk8xx_pwron_rise_handler() 28 struct dm_key_uclass_platdata *key; in rk8xx_pwron_fall_handler() local 30 key = dev_get_uclass_platdata(dev); in rk8xx_pwron_fall_handler() 31 key->fall_ms = key_timer(0); in rk8xx_pwron_fall_handler() 33 debug("%s: %llu ms\n", __func__, key->fall_ms); in rk8xx_pwron_fall_handler() 39 struct dm_key_uclass_platdata *key = dev_get_uclass_platdata(dev); in rk8xx_pwrkey_probe() local 59 key->name = "rk8xx_pwr"; in rk8xx_pwrkey_probe() [all …]
|
| H A D | input.c | 241 int key, int release) in process_modifier() argument 256 if (key == tab->left_keycode || key == tab->right_keycode) in process_modifier() 264 switch (key) { in process_modifier() 309 static int array_search(int *array, int count, int key) in array_search() argument 314 if (array[i] == key) in array_search() 461 int key = keycode[i] & KEY_MASK; in input_keycodes_to_ascii() local 463 if (key >= table->num_entries || table->xlate[key] == 0xff) { in input_keycodes_to_ascii() 464 table = process_modifier(config, key, in input_keycodes_to_ascii() 471 int key = keycode[i]; in input_keycodes_to_ascii() local 478 if (key < table->num_entries) { in input_keycodes_to_ascii() [all …]
|
| H A D | key_matrix.c | 65 struct key_matrix_key *key = &keys[upto]; in key_matrix_decode() local 67 debug(" valid=%d, row=%d, col=%d\n", key->valid, key->row, in key_matrix_decode() 68 key->col); in key_matrix_decode() 69 if (!key->valid) in key_matrix_decode() 71 pos = key->row * config->num_cols + key->col; in key_matrix_decode()
|
| /rk3399_rockchip-uboot/scripts/kconfig/lxdialog/ |
| H A D | menubox.c | 177 int key = 0, button = 0, scroll = 0, choice = 0; in dialog_menu() local 270 while (key != KEY_ESC) { in dialog_menu() 271 key = wgetch(menu); in dialog_menu() 273 if (key < 256 && isalpha(key)) in dialog_menu() 274 key = tolower(key); in dialog_menu() 276 if (strchr("ynmh", key)) in dialog_menu() 282 if (key == tolower(item_str()[j])) in dialog_menu() 289 if (key == tolower(item_str()[j])) in dialog_menu() 296 key == KEY_UP || key == KEY_DOWN || in dialog_menu() 297 key == '-' || key == '+' || in dialog_menu() [all …]
|
| H A D | checklist.c | 109 int key = 0, button = 0, choice = 0, scroll = 0, max_choice; in dialog_checklist() local 196 while (key != KEY_ESC) { in dialog_checklist() 197 key = wgetch(dialog); in dialog_checklist() 201 if (toupper(key) == toupper(item_str()[0])) in dialog_checklist() 205 if (i < max_choice || key == KEY_UP || key == KEY_DOWN || in dialog_checklist() 206 key == '+' || key == '-') { in dialog_checklist() 207 if (key == KEY_UP || key == '-') { in dialog_checklist() 232 } else if (key == KEY_DOWN || key == '+') { in dialog_checklist() 274 switch (key) { in dialog_checklist() 294 button = ((key == KEY_LEFT ? --button : ++button) < 0) in dialog_checklist() [all …]
|
| H A D | yesno.c | 32 int i, x, y, key = 0, button = 0; in dialog_yesno() local 66 while (key != KEY_ESC) { in dialog_yesno() 67 key = wgetch(dialog); in dialog_yesno() 68 switch (key) { in dialog_yesno() 81 button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button); in dialog_yesno() 91 key = on_key_esc(dialog); in dialog_yesno() 101 return key; /* ESC pressed */ in dialog_yesno()
|
| /rk3399_rockchip-uboot/doc/uImage.FIT/ |
| H A D | verified-boot.txt | 15 A key point is that it is possible to field-upgrade the software on machines 25 Images are signed using a private key known only to the signer, but can 26 be verified using a public key. As its name suggests the public key can be 29 works look up "public key cryptography" and "RSA" (a particular algorithm). 38 | RSA key pair | * +---------------+ 39 | .key .crt | * | Public key in | 40 +--------------+ +------> public key ----->| trusted place | 58 The signature algorithm relies only on the public key to do its work. Using 59 this key it checks the signature that it finds in the image. If it verifies 62 The public key from the signer allows us to verify and therefore trust [all …]
|
| H A D | signature.txt | 10 The signature feature allows the hash to be signed with a private key such 11 that it can be verified using a public key later. Provided that the private 12 key is kept secret and the public key is stored in a non-volatile place, 20 Some familiarity with public key cryptography is assumed in this section. 25 - sign the hash with a private key to produce a signature 31 - obtain the public key 34 - verify (with the public key) that the extracted signature matches the 65 Creating an RSA key pair and certificate 67 To create a new public/private key pair, size 2048 bits: 69 $ openssl genpkey -algorithm RSA -out keys/dev.key \ [all …]
|
| /rk3399_rockchip-uboot/cmd/ |
| H A D | bootmenu.c | 27 char key[3]; /* key identifier of number */ member 82 enum bootmenu_key *key, int *esc) in bootmenu_autoboot_loop() argument 105 *key = KEY_NONE; in bootmenu_autoboot_loop() 108 *key = KEY_SELECT; in bootmenu_autoboot_loop() 111 *key = KEY_NONE; in bootmenu_autoboot_loop() 129 *key = KEY_SELECT; in bootmenu_autoboot_loop() 133 enum bootmenu_key *key, int *esc) in bootmenu_loop() argument 149 *key = KEY_NONE; in bootmenu_loop() 156 *key = KEY_NONE; in bootmenu_loop() 166 *key = KEY_NONE; in bootmenu_loop() [all …]
|
| /rk3399_rockchip-uboot/lib/ |
| H A D | hashtable.c | 66 static void _hdelete(const char *key, struct hsearch_data *htab, ENTRY *ep, 154 free((void *)ep->key); in hdestroy_r() 210 if (!strncmp(match, htab->table[idx].entry.key, key_len)) { in hmatch_r() 230 && strcmp(item.key, htab->table[idx].entry.key) == 0) { in _compare_and_overwrite_entry() 238 "%s, skipping it!\n", item.key); in _compare_and_overwrite_entry() 246 htab->table[idx].entry.callback(item.key, in _compare_and_overwrite_entry() 249 "%s, skipping it!\n", item.key); in _compare_and_overwrite_entry() 276 unsigned int len = strlen(item.key); in hsearch_r() 286 hval += item.key[count]; in hsearch_r() 368 htab->table[idx].entry.key = strdup(item.key); in hsearch_r() [all …]
|
| /rk3399_rockchip-uboot/lib/avb/libavb_atx/ |
| H A D | Kconfig | 2 bool "support vbmeta public key verify" 4 Android Things requires specific public key 9 bool "support vbmeta public key verify for SPL" 11 Android Things requires specific public key 16 bool "support vbmeta public key verify for TPL" 18 Android Things requires specific public key
|
| /rk3399_rockchip-uboot/common/ |
| H A D | menu.c | 23 char *key; member 83 puts(item->key); in menu_item_print() 100 if (item->key) in menu_item_destroy() 101 free(item->key); in menu_item_destroy() 140 if (!item_key || !item->key) { in menu_item_key_match() 141 if (item_key == item->key) in menu_item_key_match() 147 if (strcmp(item->key, item_key) == 0) in menu_item_key_match() 212 char *key = m->item_choice(m->item_choice_data); in menu_interactive_choice() local 214 if (key) in menu_interactive_choice() 215 choice_item = menu_item_by_key(m, key); in menu_interactive_choice() [all …]
|
| H A D | attestation_key.c | 203 const uint8_t *key, uint32_t key_size) in write_key() argument 210 (uint8_t *)key, key_size); in write_key() 324 atap_blob key; in load_attestation_key() local 326 if (copy_blob_from_buf(&key_buf, &key) == false) { in load_attestation_key() 333 write_key(KM_ALGORITHM_RSA, key_name, key.data, key.data_length); in load_attestation_key() 360 free_blob(key); in load_attestation_key() 361 if (copy_blob_from_buf(&key_buf, &key) == false) { in load_attestation_key() 367 write_key(KM_ALGORITHM_EC, key_name, key.data, key.data_length); in load_attestation_key() 399 atap_blob key; in read_key_data() local 403 if (copy_blob_from_buf(key_buf, &key) == false) { in read_key_data() [all …]
|
| /rk3399_rockchip-uboot/scripts/kconfig/ |
| H A D | nconf.c | 289 typedef void (*function_key_handler_t)(int *key, struct menu *menu); 290 static void handle_f1(int *key, struct menu *current_item); 291 static void handle_f2(int *key, struct menu *current_item); 292 static void handle_f3(int *key, struct menu *current_item); 293 static void handle_f4(int *key, struct menu *current_item); 294 static void handle_f5(int *key, struct menu *current_item); 295 static void handle_f6(int *key, struct menu *current_item); 296 static void handle_f7(int *key, struct menu *current_item); 297 static void handle_f8(int *key, struct menu *current_item); 298 static void handle_f9(int *key, struct menu *current_item); [all …]
|
| /rk3399_rockchip-uboot/doc/ |
| H A D | README.esbc_validate | 20 $hash_val -Optional. It provides Hash of public/srk key to be 31 QorIQ platforms like B4/T4 have support of srk key table and key 33 The srk key table allows the user to have a key table with multiple 34 keys and revoke any key in case of particular key gets compromised. 35 In case the ISBC code uses the key revocation and srk key table to
|
| /rk3399_rockchip-uboot/drivers/serial/ |
| H A D | serial_efi.c | 23 struct efi_input_key key; member 38 ret = priv->con_in->read_key_stroke(priv->con_in, &priv->key); in serial_efi_get_key() 59 ch = priv->key.unicode_char; in serial_efi_getc() 66 if (!ch && priv->key.scan_code == 8) in serial_efi_getc() 68 debug(" [%x %x %x] ", ch, priv->key.unicode_char, priv->key.scan_code); in serial_efi_getc()
|