NTPsec, an improved implementation of NTP

ntpsec

ntpsec logo

NTPsec is an open-source project that focuses on developing a secure and improved implementation of the Network Time Protocol ( NTP) , which is widely used to synchronize the clocks of computer systems on a network, ensuring accurate and consistent time measurement.

These types of components are usually the ones that most users ignore (and I include myself because until a few months ago I had not understood the importance of this small protocol), since being something that is behind our daily lives, it is something that goes unnoticed.

In my case, I discovered the importance of NTP when I wanted to perform a "simple update" on my system (Arco Linux) that I had left untouched for several months. To make a long story short, after all the updates downloaded and were supposed to install, they simply wouldn't install. I kept getting a problem with the OpenPGP keys for the packages, and because the system had been left unused for months, this was going to cause a serious problem.

After doing 101 things and trying everything and even exorcising my computer, I simply couldn't solve my problem and the closest solution was to reinstall the system from scratch, which I didn't like.

Something I noticed throughout the entire process of trying to solve the problem was that my system time was different from my local time. After doing some research, I realized that this slight time difference was causing a problem when trying to import the new keys (just as the blessed Arch wiki mentions ). Upon reading this, I immediately slapped my forehead and proceeded to change the time. I then restarted to verify that the BIOS date and time were correct, which they were. After that, I restarted the system again, preparing to make the change as if it were a normal process in Windows or Android, which was a serious mistake—it was just a matter of habit before analyzing the issue.

No matter how much I tried to solve the problem in one way or another, what was causing the problem on my system was the ntp package in my installation, for some reason that I could never resolve the package was simply causing me problems. This is where I found NTPsec which was my solution after several attempts to solve my problem.

NTPsec is an enhanced implementation of NTP that boasts numerous security improvements , including the implementation of the IETF Network Time Security standard for robust cryptographic authentication of the time service. In total , over 74% of the NTP Classic codebase has been completely removed , with less than 5% of new code added to the security-critical core. There is also more consistent use of nanosecond precision.

Among the security improvements, obsolete modes and functions were removed, the NTP Client Data Minimization RFC standard was adopted , and network time security was incorporated. Additionally, changes were made to time synchronization and improvements were made to client tools, with new utilities such as ntpmon and ntpviz for real-time monitoring and data visualization, respectively.

By explaining this a little, we can understand a little more the importance of this "small" component that, for a normal user, gave several headaches and in critical environments I don't want to imagine the disaster it can generate.

Having given a "not so extensive" explanation of the importance of NTP, the reason for recounting my little "adventure" is because the new version of NTPsec 1.2.3 was recently released:

Improvements in the new version include:

  • Changed alignment of Mode 6 control protocol packets, which could affect support for classic NTP. Mode 6 is used to transmit information about the state of the server and change behavior in real time.
  • The AES encryption algorithm has been implemented by default in ntpq.
  • Using the Seccomp mechanism to block bad system call names.
  • Hourly restart statistics collection has been enabled, with additional logging for NTS, NTS-KE, and ms-sntp.
  • Inclusion of the "update" option in buildprep.
  • Improvements to the presentation of packet delay data in ntpdig JSON output.
  • Added support for the ecdhcurves list.
  • Fixed compilation on platforms that -fstack-protector depend on libssp, such as musl.
  • Fixed ntpdig crash when using 2.ntp.pool.org with a host without IPv6 support.

Finally, if you are interested in learning more about this, you can find the details at the following link.


Add as preferred source in Google