test-crypto: Add /crypto/sef test
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 21 Dec 2022 23:56:16 +0000 (15:56 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:11:34 +0000 (15:41 +0530)
commit1b10dad4d3adeaebfe8be677bd86c61af7840576
treeff097f30d4c7a7c1e6ec5efca2e1d52cd4cc292c
parent5af4af77d38b54573a0bf0d904445d8dae9bb112
test-crypto: Add /crypto/sef test

This adds test /crypto/sef which validas the implementation of
bt_crypto_sef using the sample data from CSIS[1] spec:

 A.2. sef SIRK Encryption Function

> unit/test-crypto -s "/crypto/sef"
  SIRK:
    cd cc 72 dd 86 8c cd ce 22 fd a1 21 09 7d 7d 45  ..r....."..!.}}E
  K:
    d9 ce e5 3c 22 c6 1e 06 6f 69 48 d4 9b 1b 6e 67  ...<"...oiH...ng
  Expected:
    46 d3 5f f2 d5 62 25 7e a0 24 35 e1 35 38 0a 17  F._..b%~.$5.58..
  Result:
    46 d3 5f f2 d5 62 25 7e a0 24 35 e1 35 38 0a 17  F._..b%~.$5.58..

[1]https://www.bluetooth.com/specifications/csis-1-0-1/
unit/test-crypto.c