mesh: Normalize endian of public/private ECC keys
authorBrian Gix <brian.gix@intel.com>
Tue, 18 May 2021 23:23:39 +0000 (16:23 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
commit514997b938c044f4fff308e0a040d16caca9d05e
tree7386cda11986bbb5319b90109e376b8a8c5534ee
parent6ba4c1835d6870a44aa670ab856f32737cb170b8
mesh: Normalize endian of public/private ECC keys

The Mesh profile specification defines a Mesh byte order of Big Endian
for Public keys used to calculate shared secrets. Further the
specification sample data also show this same byte order for Private
keys.  However, our internal ECDH shared secret calculation requires
Little Endian byte ordering. This fixes our DBus interface, and
debugging output to use Mesh Byte Ordering (Big Endian) for all human
readable input/output.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
mesh/prov-acceptor.c
mesh/prov-initiator.c