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

Should enable Whitening by default #70

Open
madsci1016 opened this issue Apr 1, 2017 · 12 comments
Open

Should enable Whitening by default #70

madsci1016 opened this issue Apr 1, 2017 · 12 comments

Comments

@madsci1016
Copy link

madsci1016 commented Apr 1, 2017

Lost two days debugging my application of sending 41 bytes every 33ms with no ACK. Was getting high packet loss. Forum member finally had me enable whitening with

RF_PACKET1_DCFREE_WHITENING

and problems went away. Why not have this on by default? Is there a drawback to enabling whitening all the time?

@JohnOH
Copy link

JohnOH commented Apr 1, 2017

Could you post a link to the post of the forum?

@madsci1016
Copy link
Author

@JohnOH
Copy link

JohnOH commented Apr 2, 2017

Thanks @madsci1016

@LowPowerLab
Copy link
Owner

Might consider using WHITENING by default at some point but it will require some testing and vetting. I was hesitant to do this because of all the people having lots of deployed nodes that do not use that setting and it's not evident that it was changed, especially if they miss a press release.

@madsci1016
Copy link
Author

I have a feeling most people are using your boards/library to send sensor data or commands which will probably always be non-zero. I was using them for a DMX interface for theatrical lighting control, which must be able to tolerate all channels at 0. Radios were terrible during this case, 50-80% packet loss at 6" until whitening was enabled.

So at the very least, so something positive comes out of my days wasted, maybe an exposed function to enable whitening and a note in the example sketches about having to enable it if most of the paylooad is all 0x00s or 0xFF?

@LowPowerLab
Copy link
Owner

Thank you for your feedback about your packet loss, it's certainly very valuable and I will surely look into making this change. FWIW Usually packets have data which is not DC characterized. It's not unusual to have some bytes that resemble DC but it's not common. Either way WHITENING should probably be implemented asap.

@sraillard
Copy link
Contributor

A remark about whitening: if AES encryption is enabled, there is a good chance that whitening isn't needed as the encrypted bit-stream should be pseudo-random.

@madsci1016: when you experienced the packet loss, did you have AES encryption enabled?

@EternityForest
Copy link

EternityForest commented Jun 23, 2020

Is the whitening semi-standardized across modules from different manufacturers? It looks like several other radios are very similar in the RF data formats they use, keeping compatibility is always nice.

I'm using Golay error correcting encoding and ChaCha encryption, both of which add whitening for free.

Is there any interest in eventually just adding a more comprehensive data format with support for authentication, replay attacks, etc, rather than just making a breaking change to existing work?

@LowPowerLab
Copy link
Owner

IMO at the very least encryption should be enabled which will scramble the payload.
Authentication and replay attacks should be implemented in the application layer and so are beyond the scope of this library.

@EternityForest
Copy link

EternityForest commented Jun 24, 2020 via email

@LowPowerLab
Copy link
Owner

@EternityForest - I suggest opening the datasheet, it can be very enlightening. The encryption is AES128, not ECB.
Also, in computer security, encryption is NOT the same as authentication. They are very different things with very distinct purposes

@EternityForest
Copy link

EternityForest commented Jun 25, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants