Blog

Credibility of time synchronization

Time synchronization and trust assurance

To ensure trust in the electronic communications environment you need to ensure accurate time. But the distribution of time itself must ensure the credibility of the source, protecting the integrity from unauthorized change. Because time is extremely important from the point of view of IT systems.

Time synchronization, standardization and precision

Time synchronization is essential both in the local network environment and to ensure trust in the Internet environment. Without time synchronization, it is difficult to verify the validity of certificates of websites, mail servers, or certificates of individual users, without synchronization it is difficult to verify the validity of digital signatures. You simply do not connect, pay, order ... Without the appropriate time, it is also difficult to verify users (e.g. Active Directory or Azure Active Directory), as well as internal synchronization of databases, applications, or industrial protocols. Similarly, in case of time breakdown, it is difficult to determine from records what actually happened on the network.
Because it is a critical service, it is necessary to tell a bit more about its development and capabilities. Almost everyone today uses NTP (Network Time Protocol), in the Microsoft Windows network environment it is then possible to still encounter SNTP (Simple Network Time Protocol). From the point of view of safety and accuracy SNTP is not the top, and in sporting terms, it is somewhere in the middle of a bunch of racers. Therefore, it is advisable to prefer a much more robust environment. But if we talk about time synchronization and its accuracy, it is possible to use PTP (Precision Time Protocol) in extreme cases. Individual versions and corresponding accuracy can be found in the following table.

VersionYearAccuracyStandardPortIP
Daytime1983±1 sRFC 868tcp/13IPv4
Time/Netdate1983±1 sRFC 868tcp/37
udp/37
IPv4
NTP1985LAN: ±10 to ±100 ms
WAN: ±10 ms to ±3 s
RFC 958tcp/123
udp/123
IPv4
NTPv11988LAN: ±10 to ±100 ms
WAN: ±10 ms to ±3 s
RFC 1059tcp/123
udp/123
IPv4
NTPv21989LAN: ±1 to ±50 ms
WAN: ±10 ms to ±1 s
RFC 1119tcp/123
udp/123
IPv4
NTPv31992LAN: ±1 to ±10 ms
WAN: ±10 to ±500 ms
RFC 1305tcp/123
udp/123
IPv4
SNTPv31995LAN: ±10 to ±100 ms
WAN: ±1 to ±2 s
RFC 1769tcp/123
udp/123
IPv4
SNTPv41996LAN: ±10 to ±100 ms
WAN: ±1 to ±2 s
RFC 2030
RFC 4330
tcp/123
udp/123
IPv4
IPv6
PTP2002LAN: ±100 nsIEEE 1588-2002
RFC 4330
udp/319
udp/320
IPv4
IPv6
PTPv22008LAN: ±50 nsIEEE 1588-2008
RFC 4330
udp/319
udp/320
IPv4
IPv6
NTPv42010LAN: ±1 to ±500 µs
WAN: ±10 to ±100 ms
RFC 5905
RFC 5906
RFC 5907
RFC 5908
tcp/123
udp/123
IPv4
IPv6
NTPv4 extension2019LAN: ±1 to ±500 µs
WAN: ±10 to ±100 ms
RFC 8573tcp/123
udp/123
IPv4
IPv6
PTPv2.12019LAN: ±50 nsIEEE 1588-2019
RFC 4330
udp/319
udp/320
IPv4
IPv6
NTS2020LAN: ±1 to ±500 µs
WAN: ±10 to ±100 ms
RFC 8915tcp/123
udp/123
tcp/4060
IPv4
IPv6
NTPv5 draft±1 µsDrafttcp/123
udp/123
IPv4
IPv6

Methods of protecting time synchronization

Several problems are encountered in time distribution at the same time. The only relief is the possibility of not using content encryption. On the one hand, this information is known to everyone, it further burdens resources and extends processing time. Important problems are in communication, e.g. time signal integrity, i.e. signal integrity along the way. In other words, making sure that the time tag has not been tampered with. On the other hand, it is source verification. Relying purely on source and destination addresses is completely unsatisfactory. Anyone with access to communication could modify this information and the recipient could be shifted in time. Source verification is generally a considerable problem when it is an initial communication. Last, it is about managing who has access to this time source, i.e. authentication. This can be solved easily on the local network, simply by providing a shared secret.
From around 1980 onwards, the daytime command was mainly used for time synchronization. It was gradually replaced by the NTP protocol, which was able to run in the form of a process in the background. Only with gradual development, other functionalities were added, including the protection of the protocol from unauthorized modification. In the past, there were efforts to use asymmetric algorithms, more precisely a digital signature, to ensure the integrity of communication. Under the name "Autokey" was provided a set of algorithms, capable of key exchange and digital signature. Apart from a significant influence on the complexity of the configuration, the accuracy of the synchronization and the computational requirements, unfortunately, it did not yield anything significant. Of interest was only the possibility to use certificates based on the X.509 standard for authentication. The available algorithms were:
   - RSA with key size 512b to 2048b
   - DSA with key size 1024b
   - DH with key size 512b to 2048b

Based on the NTP algorithm, the SNTP algorithm, a simplified version of the NTP protocol, was created. It was mainly used in Microsoft networks. The PTP protocol is available for synchronization of sensitive environments. The latest innovation is the NTS protocol, capable of agreeing on shared secrets using TLS, the said secret is further used for authentication of content.

VersionConfidentialityAutentization / TransformationIntegrityAutokey supportStandard
DaytimeN/AN/AN/ANoRFC 868
Time/NetdateN/AN/AN/ANoRFC 868
NTPN/AN/AN/ANoRFC 958
NTPv1N/AN/AN/ANoRFC 1059
NTPv2N/AN/AN/ANoRFC 1119
NTPv3N/ADES
MD5
MD5NoRFC 1305
SNTPv3N/AN/AN/ANoRFC 1769
SNTPv4N/AN/AMD5NoRFC 2030
RFC 4330
PTPN/AN/AN/ANoIEEE 1588-2002
PTPv2N/AN/AN/ANoIEEE 1588-2008
NTPv4N/AMD5
Update:
- DSA
- DSA-SHA
- MD4
- MD5
- MDC3
- RIPEMD160
- SHA
- SHA1
- SHA224
- SHA256
- SHA384
- SHA512
MD5
Update:
- HMAC-MD5
- HMAC-SHA1
- HMAC-SHA256
YesRFC 5905
RFC 5906
RFC 5907
RFC 5908
NTPv4 extensionN/AAES-CMACAES-CMACYesRFC 8573
PTPv2.1N/ATESLA (RFC 4082)
NTS4PTP
N/ANoIEEE 1588-2019
NTSN/AAES-SIV-CMAC-256AES-128-GCM
AES-256-GCM
AES-128-CCM
AES-256-CCM
AES-128-OCB
AES-256-OCB
ChaCha20/Poly1305
AEGIS128L
AEGIS256
NoRFC 8915
NTPv5 draftN/AN/AN/AN/ADraft

Accuracy of other sources

Radio sources on long, medium and short waves. They contain no signal authentication, their accuracy It reaches up to ±10 ms, usually held in a matter of seconds. Examples are transmitters with the mark ALS162, BBC Radio 4, DCF-77, DCF39, DCF49, HGA22, MSF, WWV, WWVB, WWVH. Verified time sources over NTP protocol can provide time with accuracy ±100 ms, an example is the source provided at CERN and NIST. Global navigation systems may include an authentication channel. Some of them are for military applications only, others for civilian ones. Example of a source with civil channel authentication is Beidou. For the Galileo navigation system, authentication should be used using TESLA, Glonass and GPS algorithms for the civil component verification is not. The accuracy of these channels should be up to ±1 µs. Atomic clocks can reach accuracy up to ±10 ns, thermally stabilised hours thereafter ±50 ns. We have a huge advantage in the Czech Republic. We are one one of the few countries involved in creating a world coordinated UTC time in cooperation with the International Bureau of Weights and Measures (BIPM).


Operational principles

Radio sources:
- The selected frequency of the source allows propagation beyond the horizon, the time of the signal's flight is usually limited by reflection from the atmosphere to a distance of about 2000km. Every minute, the information valid for the next minute is transmitted so that full synchronization takes place.
Global navigation:
- Each satellite sends its own mark and signaling. The combination of several sources allows the use of the trilateration method which allows the determination of the exact position and time. To explain, one satellite can provide information on the surface of the sphere about the time of the transmitter, two satellites can determine for example the ellipse (intersection of spherical surfaces), three determine two points on this path and a fourth then allows the determination of a specific point and as a bonus, the determination of the exact time at the same time.
NTP protocol:
- Forms a table of several different time sources, their mutual difference and uses the Marzul diagram to find the center for the corresponding time. Thanks to the ability to process even previous deviations, there it gradually specifies the changes caused by the propagation of the signal.
PTP protocol:
- For each time source evaluates several separate parameters and calculates the mean time of communication. Based on the specified priority, accuracy and other data selects the time source closest to the exact time.

Recommendation

It is now advisable to use appropriate algorithms to protect time synchronization using the NTP protocol. Thus, either HMAC-SHA256, AES-CMAC-256, AES-256-GCM, ChaCha20/Poly1305, or AEGIS-256. If possible, it is advisable to use the NTS protocol, which ensures sufficient form of source authentication. For PTP, it is currently still necessary to provide a separate network, or to create a virtual network using e.g. VPN networks. Communication using PTP should therefore be limited within time sources, or for selected applications requiring this level of accuracy.


Conclusion

Time synchronization is a very important service for the operation of any network. Because such a service must be adequately secured against misuse, it is advisable to address its appropriate isolation. Deciding whether you need this isolation is part of the risk (and its impact) analysis. A suitable time source for a network environment should have several inputs themselves which also account for the limitation of their accuracy. These inputs must be compared and secured against possible manipulation.
Small companies can make do with simple synchronization against time sources, but larger companies, or organizations, whose operation requires accurate time, need an appropriate structure. This can mean a thermally stabilized clock or an accurate internal time source with several correction inputs. Correction inputs can use communications over the Internet as well as radio sources. But these sources are susceptible to attackers. Further, influencing communications is part of radio-electronic warfare. By contrast, signal blocking, including GNSS signals, can be used to protect the population. Therefore, it is not possible to rely entirely on the source of time from global navigation sources.

Reference:

  1. Welcome to the home of the Network Time Protocol (NTP) Project
    Source: https://ntp.org/
  2. Welcome to NTPsec
    Source: https://www.ntpsec.org/
  3. chrony package
    Source: https://chrony-project.org/
  4. ptpd package
    Source: https://github.com/
  5. ptpd2 package
    Source: https://sourceforge.net/
  6. OpenNTP package
    Source: https://github.com/
  7. IEEE 1588-2019 (PTP)
    Source: https://ieeexplore.ieee.org
  8. Everything You Have To Know About PTP or Precision Time Protocol?
    Source: https://moniem-tech.com/
  9. NTS4PTP — A comprehensive key management solution for PTP networks
    Source: https://www.sciencedirect.com/

Autor článku:

Jan Dušátko
Jan Dušátko

Jan Dušátko has been working with computers and computer security for almost a quarter of a century. In the field of cryptography, he has cooperated with leading experts such as Vlastimil Klíma or Tomáš Rosa. Currently he works as a security consultant, his main focus is on topics related to cryptography, security, e-mail communication and Linux systems.

1. Introductory Provisions

1.1. These General Terms and Conditions are, unless otherwise agreed in writing in the contract, an integral part of all contracts relating to training organised or provided by the trainer, Jan Dušátko, IČ 434 797 66, DIČ 7208253041, with location Pod Harfou 938/58, Praha 9 (next as a „lector“).
1.2. The contracting parties in the general terms and conditions are meant to be the trainer and the ordering party, where the ordering party may also be the mediator of the contractual relationship.
1.3. Issues that are not regulated by these terms and conditions are dealt with according to the Czech Civil Code, i.e. Act No.89/2012 Coll.
1.4. All potential disputes will be resolved according to the law of the Czech Republic.

2. Creation of a contract by signing up for a course

2.1. Application means unilateral action of the client addressed to the trainer through a data box with identification euxesuf, e-mailu with address register@cryptosession.cz or register@cryptosession.info, internet pages cryptosession.cz, cryptosession.info or contact phone +420 602 427 840.
2.2. By submitting the application, the Client agrees with these General Terms and Conditions and declares that he has become acquainted with them.
2.3. The application is deemed to have been received at the time of confirmation (within 2 working days by default) by the trainer or intermediary. This confirmation is sent to the data box or to the contact e-mail.
2.4. The standard time for registration is no later than 14 working days before the educational event, unless otherwise stated. In the case of a natural non-business person, the order must be at least 28 working days before the educational event.
2.5. More than one participant can be registered for one application.
2.6. If there are more than 10 participants from one Client, it is possible to arrange for training at the place of residence of the intermediary or the Client.
2.7. Applications are received and processed in the order in which they have been received by the Provider. The Provider immediately informs the Client of all facts. These are the filling of capacity, too low number of participants, or any other serious reason, such as a lecturer's illness or force majeure. In this case, the Client will be offered a new term or participation in another educational event. In the event that the ordering party does not agree to move or participate in another educational event offered, the provider will refund the participation fee. The lack of participants is notified to the ordering party at least 14 days before the start of the planned term.
2.8. The contract between the provider and the ordering party arises by sending a confirmation from the provider to the ordering party.
2.9. The contract may be changed or cancelled only if the legal prerequisites are met and only in writing.

3. Termination of the contract by cancellation of the application

3.1. The application may be cancelled by the ordering party via e-mail or via a data mailbox.
3.2. The customer has the right to cancel his or her application for the course 14 days before the course takes place without any fees. If the period is shorter, the subsequent change takes place. In the interval of 7-13 days, an administrative fee of 10% is charged, cancellation of participation in a shorter interval than 7 days then a fee of 25%. In case of cancellation of the application or order by the customer, the possibility of the customer's participation in an alternative period without any additional fee is offered. The right to cancel the application expires with the implementation of the ordered training.
3.3. In case of cancellation of the application by the trainer, the ordering party is entitled to a full refund for the unrealized action.
3.4. The ordering party has the right to request an alternative date or an alternative training. In such case, the ordering party will be informed about all open courses. The alternative date cannot be enforced or enforced, it depends on the current availability of the course. If the alternative training is for a lower price, the ordering party will pay the difference. If the alternative training is for a lower price, the trainer will return the difference in the training prices to the ordering party.

4. Price and payment terms

4.1. By sending the application, the ordering party accepts the contract price (hereinafter referred to as the participation fee) indicated for the course.
4.2. In case of multiple participants registered with one application, a discount is possible.
4.3. The participation fee must be paid into the bank account of the company held with the company Komerční banka č. 78-7768770207/0100, IBAN:CZ5301000000787768770207, BIC:KOMBCZPPXXX. When making the payment, a variable symbol must be provided, which is indicated on the invoice sent to the client by the trainer.
4.4. The participation fee includes the provider's costs, including the training materials. The provider is a VAT payer.
4.5. The client is obliged to pay the participation fee within 14 working days of receipt of the invoice, unless otherwise stated by a separate contract.
4.6. If the person enrolled does not attend the training and no other agreement has been made, his or her absence is considered a cancellation application at an interval of less than 7 days, i.e. the trainer is entitled to a reward of 25% of the course price. The overpayment is returned within 14 days to the sender's payment account from which the funds were sent. Payment to another account number is not possible.
4.7. An invoice will be issued by the trainer no later than 5 working days from the beginning of the training, which will be sent by e-mail or data box as agreed.

5. Training conditions

5.1. The trainer is obliged to inform the client 14 days in advance of the location and time of the training, including the start and end dates of the daily programme.
5.2. If the client is not a student of the course, he is obliged to ensure the distribution of this information to the end participants. The trainer is not responsible for failure to comply with these terms and conditions.
5.2. By default, the training takes place from 9 a.m. to 5 p.m. at a predetermined location.
5.3. The trainer can be available from 8 a.m. to 9 a.m. and then from 17 a.m. to 6 p.m. for questions from the participants, according to the current terms and conditions.
5.4. At the end of the training, the certificate of absorption is handed over to the end users.
5.5. At the end of the training, the end users evaluate the trainer's approach and are asked to comment on the evaluation of his presentation, the manner of presentation and the significance of the information provided.

6. Complaints

6.1. If the participant is grossly dissatisfied with the course, the trainer is informed of this information.
6.2. The reasons for dissatisfaction are recorded in the minutes in two copies on the same day. One is handed over to the client and one is held by the trainer.
6.3. A statement on the complaint will be submitted by e-mail within two weeks. A solution will then be agreed within one week.
6.4. The customer's dissatisfaction may be a reason for discontinuing further cooperation, or financial compensation up to the price of the training, after deduction of costs.

7. Copyright of the provided materials

7.1. The training materials provided by the trainer in the course of the training meet the characteristics of a copyrighted work in accordance with Czech Act No 121/2000 Coll.
7.2. None of the training materials or any part thereof may be further processed, reproduced, distributed or used for further presentations or training in any way without the prior written consent of the trainer.

8. Liability

8.1. The trainer does not assume responsibility for any shortcomings in the services of any third party that he uses in the training.
8.2. The trainer does not assume responsibility for injuries, damages and losses incurred by the participants in the training events or caused by the participants. Such costs, caused by the above circumstances, shall be borne exclusively by the participant in the training event.

9. Validity of the Terms

9.1 These General Terms and Conditions shall be valid and effective from 1 October 2024.

Consent to the collection and processing of personal data

According to Regulation (EU) No 2016/679 of the European Parliament and of the Council on the protection of individuals with regard to the processing of personal data and on the free movement of such data and repealing Directive 95/46/EC (General Data Protection Regulation, hereinafter referred to as "the Regulation"), the processor xxx (hereinafter referred to as "the Controller") processes personal data. Individual personal data that are part of the processing during specific activities at this web presentation and in the course of trade are also broken down.
Although the collection of data is ubiquitous, the operation of this website is based on the right to privacy of each user. For this reason, the collection of information about users takes place to the extent absolutely necessary and only if the user decides to contact the operator. We consider any further collection and processing of data unethical.

Information about the records of access to the web presentation

This website does not collect any cookies. The site does not use any analytical scripts of third parties (social networks, cloud providers). For these reasons, an option is also offered for displaying the map in the form of a link, where the primary source is OpenStreet and alternatives then the frequently used Maps of Seznam, a.s., or Google Maps of Google LLC Inc. The use of any of these sources is entirely at the discretion of the users of this site. The administrator is not responsible for the collection of data carried out by these companies, does not provide them with data about users and does not cooperate on the collection of data.
Logging of access takes place only at the system level, the reason being the identification of any technical or security problems. Other reasons are overview access statistics. No specific data is collected or monitored in this area and all access records are deleted after three months.

Information about contacting the operator of the site

The form for contacting the operator of the site (administrator) contains the following personal data: name, surname, e-mail. These data are intended only for this communication, corresponding to the address of the user and are kept for the time necessary to fulfil the purpose, up to a maximum of one year, unless the user determines otherwise.

Information about the order form

In case of an interest in the order form, the form contains more data, i.e. name, surname, e-mail and contact details for the organisation. These data are intended only for this communication, corresponding to the address of the user and are kept for one year, unless the user determines otherwise. In the event that a business relationship is concluded on the basis of this order, only the information required by Czech law on the basis of business relations (company name and address, bank account number, type of course and its price) will continue to be kept by the administrator.

Information about the course completion document

Within the course, a course completion document is issued by the processor. This document contains the following data: student's name and surname, the name and date of the course completion and the employer's name. The information is subsequently used for the creation of a linear hash tree (non-modifiable record). This database contains only information about the provided names and company names, which may or may not correspond to reality and is maintained by the processor for possible re-issuance or verification of the document's issuance.

Rights of the personal data subject

The customer or visitor of this website has the possibility to request information about the processing of personal data, the right to request access to personal data, or the right to request the correction or deletion of any data held about him. In the case of deletion, this requirement cannot be fulfilled only if it is not data strictly necessary in the course of business. The customer or visitor of this website also has the right to obtain explanations regarding the processing of his personal data if he finds out or believes that the processing is carried out in violation of the protection of his private and personal life or in violation of applicable legislation, and the right to request removal of the resulting situation and to ensure the correction.
Furthermore, the customer/visitor of this website may request restriction of processing or object to the processing of personal data and has the right to withdraw his/her consent to the processing of personal data at any time in writing, without prejudice to the lawfulness of their processing prior to such withdrawal. For this purpose, the contact e-mail address support@cryptosession.cz is used.
The customer/visitor has the right to file a complaint against the processing of personal data with the supervisory authority, which is the Office for Personal Data Protection.