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

Network Time Security (NTS) support #9481

Open
ott opened this issue Jul 1, 2018 · 19 comments
Open

Network Time Security (NTS) support #9481

ott opened this issue Jul 1, 2018 · 19 comments
Labels
RFE 🎁 Request for Enhancement, i.e. a feature request timesync

Comments

@ott
Copy link
Contributor

ott commented Jul 1, 2018

At the moment IETF Network Time Protocol working group is standardizing extensions to NTP to add authenticity and confidentiality to NTP. Central to this effort is the Network Time Security (NTS) mechanism.

The proposed NTS-KE protocol and NTP protocol extensions do not seem to be complex and therefore it should be possible to extend systemd-timesyncd to support NTS with medium effort.

Two of the authors of the current draft are employed by Physikalisch-Technische Bundesanstalt (PTB), the German national metrology institute that is also the legal time authority in Germany. So it can perhaps be expected that NTS becomes widely available after the NTS standardization is finished. The PTB also described efforts to formally verify NTS, collaborated in security research about NTS and presented an attack against an earlier version of the protocol. So perhaps it can be expected that NTS provides better security than Autokey.

There also seems to be an ongoing effort to add NTS to ntpd.

So I think it would make sense for systemd-timesyncd to support NTS to allow secure time synchronization which often seems to be a requirement. If there is a consensus to support NTS in systemd-timesyncd, I can have a look whether I'm able to implement it.

@shibumi
Copy link
Contributor

shibumi commented Jul 2, 2018

I would love to see this :) but we should wait until it got standardized.

@poettering
Copy link
Member

Sounds good to me. If this is likely to show up in common infrastructure (i.e. is more than an academic project) then this definitely makes sense.

@poettering poettering added RFE 🎁 Request for Enhancement, i.e. a feature request timesync labels Jul 4, 2018
@poettering
Copy link
Member

(and yupp, patches in this direction would be greatly appreciated)

@ott
Copy link
Contributor Author

ott commented Aug 31, 2018

The reference implementation of NTS switched to CMake a month ago. So it should be possible to build it on GNU/Linux now without effort. I wrote a CMakeLists.txt for it when it was still using Microsoft Visual Studio and was able to build and execute it with just minor changes to the source code. Unfortunately, it requires library versions that are not available in Debian and therefore I'm unable to test it.

@fmarier
Copy link

fmarier commented Jun 21, 2019

Cloudflare now has a public server available which supports the latest NTS draft: https://blog.cloudflare.com/secure-time/ (time.cloudflare.com)

@kim-netnod
Copy link

I'm not sure if this is to any help but some colleagues and friends wrote this client in Go
https://gitlab.com/hacklunch/ntsclient

@ott
Copy link
Contributor Author

ott commented Dec 26, 2019

@kim-netnod Unfortunately, systemd cannot use the client. systemd is written in C and not Go.

@stemid
Copy link

stemid commented Dec 27, 2019

@ott @kim-netnod According to the NEWS file you should be able to set your own custom Go or C based NTP/NTS client to be used by timesyncd datetimectl using the $SYSTEMD_TIMEDATED_NTP_SERVICES environment variable introduced in version 239.

I have yet to test this though. But it feels like the most modular way to handle new clients for protocols like NTS, to just out source it.

@ott
Copy link
Contributor Author

ott commented Mar 1, 2020

@stemid It would replace systemd-timesyncd then. However, the idea behind and architecture systemd is different and this is why systemd-timesyncd exists. It is a controversial aspect of systemd. I also have a mixed opinion about it but I accept things as they are. I assume that such discussion is not wanted here and leads nowhere. So perhaps it's best to keep this discussion about NTS support in systemd-timesyncd and not about which alternatives exist (except for interoperability testing) and how to replace systemd-timesyncd.

@stemid
Copy link

stemid commented Oct 1, 2020

It now seems to be standardized in an RFC at least: https://tools.ietf.org/html/rfc8915

@balki
Copy link

balki commented Oct 30, 2020

Fedora/Chrony now supports NTS: https://fedoramagazine.org/secure-ntp-with-nts/

@ssahani
Copy link
Contributor

ssahani commented Oct 30, 2020

I think we should do this

@ssahani
Copy link
Contributor

ssahani commented Dec 3, 2020

#17778 is ready for testing.

# cat /etc/systemd/timesyncd.conf 
[Time]
NetworkTimeSecurityServer=time.cloudflare.com

@onny
Copy link

onny commented Jan 19, 2022

Unfortunately there seems to be no open PR to support this feature?

@ilf
Copy link

ilf commented Mar 15, 2022

On 2020-09-30 IETF published RFC 8915.

On 2020-11-30 @ssahani opened PR #17778.
On 2021-02-17 @poettering closed this PR, with the comment: "I guess we can close this, and continue discussion in #17943"

On 2020-12-11 @ssahani opened PR #17943.
On 2021-08-11 @ssahani closed this PR, without comment.

Can anyone tell the current status please?

@yuwata
Copy link
Member

yuwata commented Mar 15, 2022

There is no progress, and I guess no one working on this.

@Seirdy
Copy link

Seirdy commented Oct 12, 2022

Curious as to the merits of this effort when Roughtime seems to accomplish more, requiring cryptographic proof of the time server's accuracy.

@ilf
Copy link

ilf commented Oct 12, 2022

@Seirdy: Nothing about the content, but both are products of the same IETF working group on NTP, and NTS is a finished RFC, while Roughtime is still unfinished work-in-progress.

@ku4eto
Copy link

ku4eto commented Mar 9, 2024

Its been 1.5 years since the last response. Do we have any information if NTS is going to be implemented at all in systemd-timesyncd ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFE 🎁 Request for Enhancement, i.e. a feature request timesync
Development

No branches or pull requests