-
Notifications
You must be signed in to change notification settings - Fork 101
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
Create support for knx data secure #57
Comments
One of the main problem is to choose an aes implementation. |
Found https://github.com/kokke/tiny-AES-c . |
@thelsing I will try to implemented the encryption/decryption with tiny-AES based on the example.
ADATA is "associated data" and PDATA is "payload data". Terms used within AES-CCM. |
KNX Data Secure also does NOT use a new mask version. And also everything related to E-mode device (e.g. SeqNo sync for E-mode) could be left out for now. So only S-mode tool access SeqNo (sync service) handling would be ok for now if I understand it correctly. |
Important note:
Details see here in this presentation. |
Just some info. The "Factory Default Setup Key" (FDSK) entered in ETS is just BASE32 encoded binary data which contains the KNX serial number and the 16 bytes of the toolkey (AES-128). Example can be found here and here. 6 times 6 characters entered into the ETS lead to 36 chars where each char encodes 5 bit: 36*5=180Bit. |
Another finding: |
Prerequite to support data secure:
|
|
Is there nothing in the spec about this? |
It is, already implemented. 😀 https://github.com/thelsing/knx/pull/66/files#diff-00d45c6727ed3cf62043739242374959 |
I think I have reached a state that should be merged.
|
Already merged. |
KNX Data Secure is important for open media like RF or PL.
KNX Data Secure basically adds additional APCI type which signals secure data packets.
The secure data packets then contain the normal application layer packets (nested) with their well-known APCI types. The existing application layer can be reused.
See figure.
The Calimero project also added support for KNX data secure recently.
Latest KNX spec. (AN192?, not publicy available yet) also contains the specification of the so called "security proxy" which is supposed to be part of the KNX TP/RF coupler.
Is allows to translate between unsecure older existing devices and KNX-RF secure devices.
Example encryption steps: here
The proxy adds and removes the outer secure frame of the normal application layer payload.
The text was updated successfully, but these errors were encountered: