Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSMA Link-layer security and rpl-border-router #1064

Open
tdesmet opened this issue Sep 17, 2019 · 1 comment · May be fixed by #1065

Comments

@tdesmet
Copy link
Contributor

commented Sep 17, 2019

Problem description

I am trying to get a network up with csma and link-layer security on the cc1310 and am facing some problems on getting it to work with the rpl border router.

The nodes are no problem, I use sensniff and wireshark and can see the secured packets and wireshark is able to decrypt them.

The problem is the rpl border router. It seems that something goes wrong. When I set LLSEC802154_CONF_ENABLED wireshark sees a lot of mallformed packets.

Either I am doing wrong or there is a bug in the code, but since there is no documentation on link-layer security I have no clue.

What I did:

In the project-conf.h of the rpl-border-router and slip-radio example I put

#define LLSEC802154_CONF_ENABLED 1
#define CSMA_CONF_LLSEC_DEFAULT_KEY0 {0x9c, 0x96, 0x98, 0x6d, 0x30, 0xbd, 0x64, 0x86, 0x07, 0x8c, 0x39, 0x9a, 0xa1, 0x37, 0x44, 0xf7 }

Wireshark capture

I added the .txt extension so I could upload it, remove it after downloading to get the pcapng file.

ll-security.pcapng.txt

edit

I think the problem is that csma_security_create_frame calls NETSTACK_FRAMER.create(); and passes the returned header length to aead, but on the slip radio no_framer is used and returns 0, hence the whole packet including the header is being encrypted if I understand correctly what aead does.

@MoonPole

This comment has been minimized.

Copy link

commented Sep 19, 2019

How to encrypt data in Contiki ng in AES 128. Does tsch-security provide it? If so how can it be done?

@tdesmet tdesmet referenced a pull request that will close this issue Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.