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

KNX Secure #418

Open
liquid2026 opened this issue Oct 6, 2019 · 18 comments
Open

KNX Secure #418

liquid2026 opened this issue Oct 6, 2019 · 18 comments

Comments

@liquid2026
Copy link

Hi. Did anyone get the specs for KNX-Secure Protocol? I think its recommand in future to support it.

@robertguetzkow
Copy link

robertguetzkow commented Oct 14, 2019

The specification is publicly available. I might be working on this for my Master's thesis, this will be decided in the next couple of weeks.

@smurfix
Copy link
Member

smurfix commented Oct 14, 2019

That would be awesome.

If you do this, please consider replacing the current knxd-specific client protocol with something sensible, e.g. based on protobuf or msgpack.

@robertguetzkow
Copy link

robertguetzkow commented Oct 14, 2019

I'll see what I can do. Please be aware that this is still in very early stages of planning and requires the approval of a proposal by my professor and advisor. Therefore I can't promise that this will actually be the topic of my thesis.

@smurfix
Copy link
Member

smurfix commented Oct 15, 2019

Of course. But you might tell them that you'll have my support.

I don't know whether appealing to their better nature (i.e. it's an upgrade to some semi-critical infrastructure code, thus a public service and not just an academic exercise) would help. ;-)

@robertguetzkow
Copy link

robertguetzkow commented Nov 12, 2019

@smurfix I've got the OK for the project and if it goes well this will be continued in my thesis. Since this will be an academic project the main focus isn't on the implementation though, therefore I can't promise that this will result in a pull request with fully polished code.

I will verify this anyway, but do you know if knxd is conforming to the entire KNXnet/IP Standard 01.04.02?

@smurfix
Copy link
Member

smurfix commented Nov 12, 2019

Nice.

Remote logging is not implemented, neither is remote diagnosis/config, and there's no such thing as an "object server". Also there's no TP bus enumeration. knxd also doesn't handle ROUTING_BUSY or ROUTING_LOST_MESSAGE indications which presumably should be used to slow down transmission.

@nanosonde
Copy link

nanosonde commented Dec 12, 2019

knxd also does not handle KNX RF USB sticks due to missing proper support of open media.

@robertguetzkow
Copy link

robertguetzkow commented Jan 22, 2020

The publicly available version of the specification from 2013 has an early draft of KNXnet/IP Secure, which has several security flaws. In the meantime there have been updates to the protocol's design, currently not released to the public, that are incompatible with the published version. Implementing the published draft likely doesn't allow communication with any certified KNX Secure devices.

I just noticed that the title of this ticket and my replies have been a bit ambiguous and may have caused some confusion. I'm currently working on KNXnet/IP Security (AN 159/13) not KNX Data Security (AN 158/13). Due to the aforementioned changes in the protocol design, which I have been informed of today, it's currently unclear whether I will be able to implement a version in knxd that is compatible to the official implementation in certified devices during my Master's.

@robertguetzkow
Copy link

I won't continue to work on this, but for reference KNXnet/IP Security is specified in ISO 22510:2019 since November 2019.

@sim0nx
Copy link

sim0nx commented Jan 7, 2021

While searching a bit on this topic I found this issue ... looking further it seems that calimero (which openHAB uses to access the knx bus) has support for both IP and Data secure.

Just FYI in case that could be useful as inspiration:
https://github.com/calimero-project/calimero-core

@smurfix
Copy link
Member

smurfix commented Jan 8, 2021

Fun part, the ISO wants €180 (CHF 198) for the standard paper.

Even more fun part, the Serbian standards org wants €56 for the exact same privilege. I just bought a copy. :-/

@kbabioch
Copy link

kbabioch commented Jan 8, 2021

@smurfix Able/willing to share the references to those documents/paper? Also interested in this, and find it interesting how those standards are priced differently in different regions :-).

@smurfix
Copy link
Member

smurfix commented Jan 8, 2021

Just search for "ISO 22510:2019 download".
The Serbian page is here: https://iss.rs/en/publication/show/iss:pub:64222

@Makki1
Copy link

Makki1 commented Jan 10, 2021 via email

@lapo-luchini
Copy link

lapo-luchini commented Sep 29, 2022

Even better: Estonia has it for 52€ and Latvia for 38€.
(multi-user license is needed to avoid DRM)

@robertguetzkow
Copy link

robertguetzkow commented Sep 30, 2022

While it isn't the complete specification, you can see a majority of the interesting parts in my thesis as well without paying anything.
https://www.researchgate.net/publication/362188042_Security_Analysis_of_the_KNXnetIP_Secure_Protocol

@smurfix
Copy link
Member

smurfix commented Oct 1, 2022

Thanks. I guess that reading the last line of your abstract is quite sufficient for deciding that implementing this Secure Protocol probably is not what I'll be doing with my limited time, I'm afraid.

That said, patches will gladly be accepted if somebody else does the work …

@robertguetzkow
Copy link

That is completely understandable.

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

No branches or pull requests

8 participants