[riot-notifications] [RIOT-OS/RIOT] pkg/edhoc-c: initial commit (#16295)

Francisco notifications at github.com
Tue Jun 8 14:40:39 CEST 2021


Squashed, re-tested:

<details><summary><b> make -C tests/pkg_edhoc_c all test-with-config</b></summary>

```
main(): This is RIOT! (Version: 2021.07-devel-288-gbbe3d-pr_edhoc_c)
[initiator]: load ephemeral key: ONLY FOR TESTING
[initiator]: preset cid: ONLY FOR TESTING
[responder]: load ephemeral key: ONLY FOR TESTING
[responder]: preset cid: ONLY FOR TESTING
Starting the shell
>
>
> ifconfig
ifconfig
Iface  5  HWaddr: 1A:81:A8:28:B7:62
          L2-PDU:1500  MTU:1500  HL:64  RTR
          RTR_ADV
          Source address length: 6
          Link type: wired
          inet6 addr: fe80::1881:a8ff:fe28:b762  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff28:b762

> init handshake fe80::1881:a8ff:fe28:b762 5683
init handshake fe80::1881:a8ff:fe28:b762 5683
[initiator]: sending msg1 (37 bytes):
0x0d 0x00 0x58 0x20 0x8d 0x3e 0xf5 0x6d
0x1b 0x75 0x0a 0x43 0x51 0xd6 0x8a 0xc2
0x50 0xa0 0xe8 0x83 0x79 0x0e 0xfc 0x80
0xa5 0x38 0xa4 0x44 0xee 0x9e 0x2b 0x57
0xe2 0x44 0x1a 0x7c 0x21
[responder]: received an EDHOC message (len 37):
0x0d 0x00 0x58 0x20 0x8d 0x3e 0xf5 0x6d
0x1b 0x75 0x0a 0x43 0x51 0xd6 0x8a 0xc2
0x50 0xa0 0xe8 0x83 0x79 0x0e 0xfc 0x80
0xa5 0x38 0xa4 0x44 0xee 0x9e 0x2b 0x57
0xe2 0x44 0x1a 0x7c 0x21
[responder]: sending msg2 (46 bytes):
0x58 0x20 0x52 0xfb 0xa0 0xbd 0xc8 0xd9
0x53 0xdd 0x86 0xce 0x1a 0xb2 0xfd 0x7c
0x05 0xa4 0x65 0x8c 0x7c 0x30 0xaf 0xdb
0xfc 0x33 0x01 0x04 0x70 0x69 0x45 0x1b
0xaf 0x35 0x37 0x4a 0xa3 0xf1 0xbd 0x5d
0x02 0x8d 0x19 0xcf 0x3c 0x99
[initiator]: received a message (46 bytes):
0x58 0x20 0x52 0xfb 0xa0 0xbd 0xc8 0xd9
0x53 0xdd 0x86 0xce 0x1a 0xb2 0xfd 0x7c
0x05 0xa4 0x65 0x8c 0x7c 0x30 0xaf 0xdb
0xfc 0x33 0x01 0x04 0x70 0x69 0x45 0x1b
0xaf 0x35 0x37 0x4a 0xa3 0xf1 0xbd 0x5d
0x02 0x8d 0x19 0xcf 0x3c 0x99
[initiator]: sending msg3 (20 bytes):
0x37 0x52 0xd5 0x53 0x5f 0x31 0x47 0xe8
0x5f 0x1c 0xfa 0xcd 0x9e 0x78 0xab 0xf9
0xe0 0xa8 0x1b 0xbf
[responder]: received an EDHOC message (len 20):
0x37 0x52 0xd5 0x53 0x5f 0x31 0x47 0xe8
0x5f 0x1c 0xfa 0xcd 0x9e 0x78 0xab 0xf9
0xe0 0xa8 0x1b 0xbf
[responder]: finalize exchange
[responder]: handshake successfully completed
[initiator]: handshake successfully completed
[initiator]: Transcript hash 4 (32 bytes):
0x7c 0xcf 0xde 0xdc 0x2c 0x10 0xca 0x03
0x56 0xe9 0x57 0xb9 0xf6 0xa5 0x92 0xe0
0xfa 0x74 0xdb 0x2a 0xb5 0x4f 0x59 0x24
0x40 0x96 0xf9 0xa2 0xac 0x56 0xd2 0x07

> init oscore
init oscore
OSCORE secret:
0x5b 0xb2 0xae 0xe2 0x5b 0x16 0x0e 0x7c
0x6d 0x26 0x12 ### Issues/PRs references

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->0xb0 0xa6 0x01 0x09 0x16

OSCORE salt:
0x8e 0x44 0x92 0x10 0xe0 0x3b 0xc2 0x9d

resp oscore
> resp oscore
OSCORE secret:
0x5b 0xb2 0xae 0xe2 0x5b 0x16 0x0e 0x7c
0x6d 0x26 0x12 0xb0 0xa6 0x01 0x09 0x16

OSCORE salt:
0x8e 0x44 0x92 0x10 0xe0 0x3b 0xc2 0x9d

>
```
</details>

<details><summary><b> BOARD=samr21-xpro make -C tests/pkg_edhoc_c all test-with-config</b></summary>

```
>
> ifconfig
ifconfig
Iface  5  HWaddr: 2B:07  Channel: 26  Page: 0  NID: 0x23  PHY: O-QPSK

          Long HWaddr: 00:04:25:19:18:01:AB:07
           TX-Power: 0dBm  State: IDLE  max. Retrans.: 3  CSMA Retries: 4
          AUTOACK  ACK_REQ  CSMA  L2-PDU:102  MTU:1280  HL:64  RTR
          6LO  IPHC
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::204:2519:1801:ab07  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff01:ab07

> init handshake fe80::204:2519:1801:ab07 5683
init handshake fe80::204:2519:1801:ab07 5683
[initiator]: sending msg1 (37 bytes):
0x0d 0x00 0x58 0x20 0x8d 0x3e 0xf5 0x6d
0x1b 0x75 0x0a 0x43 0x51 0xd6 0x8a 0xc2
0x50 0xa0 0xe8 0x83 0x79 0x0e 0xfc 0x80
0xa5 0x38 0xa4 0x44 0xee 0x9e 0x2b 0x57
0xe2 0x44 0x1a 0x7c 0x21
[responder]: received an EDHOC message (len 37):
0x0d 0x00 0x58 0x20 0x8d 0x3e 0xf5 0x6d
0x1b 0x75 0x0a 0x43 0x51 0xd6 0x8a 0xc2
0x50 0xa0 0xe8 0x83 0x79 0x0e 0xfc 0x80
0xa5 0x38 0xa4 0x44 0xee 0x9e 0x2b 0x57
0xe2 0x44 0x1a 0x7c 0x21
[responder]: sending msg2 (46 bytes):
0x58 0x20 0x52 0xfb 0xa0 0xbd 0xc8 0xd9
0x53 0xdd 0x86 0xce 0x1a 0xb2 0xfd 0x7c
0x05 0xa4 0x65 0x8c 0x7c 0x30 0xaf 0xdb
0xfc 0x33 0x01 0x04 0x70 0x69 0x45 0x1b
0xaf 0x35 0x37 0x4a 0xa3 0xf1 0xbd 0x5d
0x02 0x8d 0x19 0xcf 0x3c 0x99
[initiator]: received a message (46 bytes):
0x58 0x20 0x52 0xfb 0xa0 0xbd 0xc8 0xd9
0x53 0xdd 0x86 0xce 0x1a 0xb2 0xfd 0x7c
0x05 0xa4 0x65 0x8c 0x7c 0x30 0xaf 0xdb
0xfc 0x33 0x01 0x04 0x70 0x69 0x45 0x1b
0xaf 0x35 0x37 0x4a 0xa3 0xf1 0xbd 0x5d
0x02 0x8d 0x19 0xcf 0x3c 0x99
[initiator]: sending msg3 (20 bytes):
0x37 0x52 0xd5 0x53 0x5f 0x31 0x47 0xe8
0x5f 0x1c 0xfa 0xcd 0x9e 0x78 0xab 0xf9
0xe0 0xa8 0x1b 0xbf
[responder]: received an EDHOC message (len 20):
0x37 0x52 0xd5 0x53 0x5f 0x31 0x47 0xe8
0x5f 0x1c 0xfa 0xcd 0x9e 0x78 0xab 0xf9
0xe0 0xa8 0x1b 0xbf
[responder]: finalize exchange
[responder]: handshake successfully completed
[initiator]: handshake successfully completed
[initiator]: Transcript hash 4 (32 bytes):
0x7c 0xcf 0xde 0xdc 0x2c 0x10 0xca 0x03
0x56 0xe9 0x57 0xb9 0xf6 0xa5 0x92 0xe0
0xfa 0x74 0xdb 0x2a 0xb5 0x4f 0x59 0x24
0x40 0x96 0xf9 0xa2 0xac 0x56 0xd2 0x07samr21-xpeo

> init oscore
init oscore
OSCORE secret:
0x5b 0xb2 0xae 0xe2 0x5b 0x16 0x0e 0x7c
0x6d 0x26 0x12 0xb0 0xa6 0x01 0x09 0x16

OSCORE salt:
0x8e 0x44 0x92 0x10 0xe0 0x3b 0xc2 0x9d

> resp oscore
resp oscore
OSCORE secret:
0x5b 0xb2 0xae 0xe2 0x5b 0x16 0x0e 0x7c
0x6d 0x26 0x12 0xb0 0xa6 0x01 0x09 0x16

OSCORE salt:
0x8e 0x44 0x92 0x10 0xe0 0x3b 0xc2 0x9d

>
```
</details>


<details><summary><b> BOARD=nrf52840-mdk make -C tests/pkg_edhoc_c all test-with-config</b></summary>

```
ifconfig
Iface  5  HWaddr: 4B:38  Channel: 26  NID: 0x23  PHY: O-QPSK
          Long HWaddr: AA:04:81:69:BE:FA:4B:38
           State: IDLE
          ACK_REQ  L2-PDU:102  MTU:1280  HL:64  RTR
          6LO  IPHC
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::a804:8169:befa:4b38  scope: link  VAL
init handshake fe80::a804:8169:befa:4b38 5683
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:fffa:4b38

> init handshake fe80::a804:8169:befa:4b38 5683
[initiator]: sending msg1 (37 bytes):
0x0d 0x00 0x58 0x20 0x8d 0x3e 0xf5 0x6d
0x1b 0x75 0x0a 0x43 0x51 0xd6 0x8a 0xc2
0x50 0xa0 0xe8 0x83 0x79 0x0e 0xfc 0x80
0xa5 0x38 0xa4 0x44 0xee 0x9e 0x2b 0x57
0xe2 0x44 0x1a 0x7c 0x21
[responder]: received an EDHOC message (len 37):
0x0d 0x00 0x58 0x20 0x8d 0x3e 0xf5 0x6d
0x1b 0x75 0x0a 0x43 0x51 0xd6 0x8a 0xc2
0x50 0xa0 0xe8 0x83 0x79 0x0e 0xfc 0x80
0xa5 0x38 0xa4 0x44 0xee 0x9e 0x2b 0x57
0xe2 0x44 0x1a 0x7c 0x21
[responder]: sending msg2 (46 bytes):
0x58 0x20 0x52 0xfb 0xa0 0xbd 0xc8 0xd9
0x53 0xdd 0x86 0xce 0x1a 0xb2 0xfd 0x7c
0x05 0xa4 0x65 0x8c 0x7c 0x30 0xaf 0xdb
0xfc 0x33 0x01 0x04 0x70 0x69 0x45 0x1b
0xaf 0x35 0x37 0x4a 0xa3 0xf1 0xbd 0x5d
0x02 0x8d 0x19 0xcf 0x3c 0x99
[initiator]: received a message (46 bytes):
0x58 0x20 0x52 0xfb 0xa0 0xbd 0xc8 0xd9
0x53 0xdd 0x86 0xce 0x1a 0xb2 0xfd 0x7c
0x05 0xa4 0x65 0x8c 0x7c 0x30 0xaf 0xdb
0xfc 0x33 0x01 0x04 0x70 0x69 0x45 0x1b
0xaf 0x35 0x37 0x4a 0xa3 0xf1 0xbd 0x5d
0x02 0x8d 0x19 0xcf 0x3c 0x99
[initiator]: sending msg3 (20 bytes):
0x37 0x52 0xd5 0x53 0x5f 0x31 0x47 0xe8
0x5f 0x1c 0xfa 0xcd 0x9e 0x78 0xab 0xf9
0xe0 0xa8 0x1b 0xbf
[responder]: received an EDHOC message (len 20):
0x37 0x52 0xd5 0x53 0x5f 0x31 0x47 0xe8
0x5f 0x1c 0xfa 0xcd 0x9e 0x78 0xab 0xf9
0xe0 0xa8 0x1b 0xbf
[responder]: finalize exchange
[responder]: handshake successfully completed
[initiator]: handshake successfully completed
[initiator]: Transcript hash 4 (32 bytes):
0x7c 0xcf 0xde 0xdc 0x2c 0x10 0xca 0x03
0x56 0xe9 0x57 0xb9 0xf6 0xa5 0x92 0xe0
0xfa 0x74 0xdb 0x2a 0xb5 0x4f 0x59 0x24
0x40 0x96 0xf9 0xa2 0xac 0x56 0xd2 0x07
init oscore

> init oscore
OSCORE secret:
0x5b 0xb2 0xae 0xe2 0x5b 0x16 0x0e 0x7c
0x6d 0x26 0x12 0xb0 0xa6 0x01 0x09 0x16

OSCORE salt:
0x8e 0x44 0x92 0x10 0xe0 0x3b 0xc2 0x9d
resp oscore

> resp oscore
OSCORE secret:
0x5b 0xb2 0xae 0xe2 0x5b 0x16 0x0e 0x7c
0x6d 0x26 0x12 0xb0 0xa6 0x01 0x09 0x16

OSCORE salt:
0x8e 0x44 0x92 0x10 0xe0 0x3b 0xc2 0x9d
```
</details>




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16295#issuecomment-856730546
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210608/8678bf97/attachment.htm>


More information about the notifications mailing list