print_packet("PublicKeyProv", prov->conf_inputs.prv_pub_key, 64);
print_packet("PublicKeyDev", prov->conf_inputs.dev_pub_key, 64);
+
+ /* Normalize for debug out -- No longer needed for calculations */
+ swap_u256_bytes(prov->private_key);
print_packet("PrivateKeyLocal", prov->private_key, 32);
+
print_packet("ConfirmationInputs", &prov->conf_inputs,
sizeof(prov->conf_inputs));
print_packet("ECDHSecret", prov->secret, 32);
return;
}
+ /* API delivers Mesh byte order, switch to little endian */
+ swap_u256_bytes(key);
memcpy(prov->private_key, key, 32);
ecc_make_public_key(prov->private_key,
prov->conf_inputs.dev_pub_key);
- /* Convert to Mesh byte order */
+ /* Convert Public key to Mesh byte order */
swap_u256_bytes(prov->conf_inputs.dev_pub_key);
swap_u256_bytes(prov->conf_inputs.dev_pub_key + 32);
print_packet("PublicKeyProv", prov->conf_inputs.prv_pub_key, 64);
print_packet("PublicKeyDev", prov->conf_inputs.dev_pub_key, 64);
+
+ /* Print DBG out in Mesh order */
+ swap_u256_bytes(prov->private_key);
print_packet("PrivateKeyLocal", prov->private_key, 32);
print_packet("ConfirmationInputs", &prov->conf_inputs,
sizeof(prov->conf_inputs));