Lines Matching refs:p2
389 * p2 = (MSB) padding || ia || ra (LSB)
391 * p2 = ra || ia || padding
396 void smp_gen_p2_4_confirm(tSMP_CB* p_cb, BD_ADDR remote_bda, BT_OCTET16 p2) {
398 uint8_t* p = (uint8_t*)p2;
412 smp_debug_print_nbyte_little_endian(p2, "p2 = ra || ia || padding", 16);
451 /* generate p2 = padding || ia || ra */
452 BT_OCTET16 p2;
453 smp_gen_p2_4_confirm(p_cb, remote_bda, p2);
454 /* calculate p2' = (p2 XOR e1) */
455 smp_xor_128(p2, output->param_buf);
456 smp_debug_print_nbyte_little_endian((uint8_t*)p2, "p2' = p2 XOR e1", 16);
457 /* calculate: c1 = e(k, p2') */
459 if (!SMP_Encrypt(p_cb->tk, BT_OCTET16_LEN, p2, BT_OCTET16_LEN, output)) {
460 SMP_TRACE_ERROR("%s: failed encryption at e1 = e(k, p2')");
1758 uint8_t* p2;
1760 p2 = p_dev_rec->link_key;
1761 REVERSE_ARRAY_TO_STREAM(p1, p2, 16);