Clock Drift
   HOME

TheInfoList



OR:

Clock drift refers to several related phenomena where a clock does not run at exactly the same rate as a reference clock. That is, after some time the clock "drifts apart" or gradually desynchronizes from the other clock. All clocks are subject to drift, causing eventual divergence unless resynchronized. In particular, the drift of crystal-based clocks used in computers requires some synchronization mechanism for any high-speed communication. Computer clock drift can be utilized to build
random number generator Random number generation is a process by which, often by means of a random number generator (RNG), a sequence of numbers or symbols that cannot be reasonably predicted better than by random chance is generated. This means that the particular outc ...
s. These can however be exploited by
timing attack In cryptography, a timing attack is a side-channel attack in which the attacker attempts to compromise a cryptosystem by analyzing the time taken to execute cryptographic algorithms. Every logical operation in a computer takes time to execute, and ...
s.


In non-atomic clocks

Everyday clocks such as
wristwatches A watch is a portable timepiece intended to be carried or worn by a person. It is designed to keep a consistent movement despite the motions caused by the person's activities. A wristwatch is designed to be worn around the wrist, attached by ...
have finite precision. Eventually they require correction to remain accurate. The rate of drift depends on the clock's quality, sometimes the stability of the power source, the ambient temperature, and other subtle environmental variables. Thus the same clock can have different drift rates at different occasions. More advanced clocks and old mechanical clocks often have some kind of speed trimmer where one can adjust the speed of the clock and thus correct for clock drift. For instance, in
pendulum clock A pendulum clock is a clock that uses a pendulum, a swinging weight, as its timekeeping element. The advantage of a pendulum for timekeeping is that it is a harmonic oscillator: It swings back and forth in a precise time interval dependent on i ...
s the clock drift can be manipulated by slightly changing the length of the
pendulum A pendulum is a weight suspended from a pivot so that it can swing freely. When a pendulum is displaced sideways from its resting, equilibrium position, it is subject to a restoring force due to gravity that will accelerate it back toward th ...
. A
quartz oscillator A crystal oscillator is an electronic oscillator circuit that uses a piezoelectric crystal as a frequency-selective element. The oscillator frequency is often used to keep track of time, as in quartz wristwatches, to provide a stable cloc ...
is less subject to drift due to manufacturing variances than the pendulum in a mechanical clock. Hence most everyday quartz clocks do not have an adjustable drift correction.


Atomic clocks

Atomic clock An atomic clock is a clock that measures time by monitoring the resonant frequency of atoms. It is based on atoms having different energy levels. Electron states in an atom are associated with different energy levels, and in transitions betwe ...
s are very precise and have nearly no clock drift. Even the Earth's rotation rate has more drift and variation in drift than an atomic clock due to
tidal acceleration Tidal acceleration is an effect of the tidal forces between an orbiting natural satellite (e.g. the Moon) and the primary planet that it orbits (e.g. Earth). The acceleration causes a gradual recession of a satellite in a prograde orbit away f ...
and other effects. The principle behind the atomic clock has enabled scientists to re-define the
SI unit The International System of Units, known by the international abbreviation SI in all languages and sometimes pleonastically as the SI system, is the modern form of the metric system and the world's most widely used system of measurement. ...
second in terms of exactly oscillations of the caesium-133 atom. The precision of these oscillations allows atomic clocks to drift roughly only one second in a hundred million years; as of 2015, the most accurate atomic clock loses one second every 15 billion years. The
International Atomic Time International Atomic Time (abbreviated TAI, from its French name ) is a high-precision atomic coordinate time standard based on the notional passage of proper time on Earth's geoid. TAI is a weighted average of the time kept by over 450 ato ...
(TAI)
time standard A time standard is a specification for measuring time: either the rate at which time passes or points in time or both. In modern times, several time specifications have been officially recognized as standards, where formerly they were matters o ...
and its derivatives (such as the
Coordinated Universal Time Coordinated Universal Time or UTC is the primary time standard by which the world regulates clocks and time. It is within about one second of mean solar time (such as UT1) at 0° longitude (at the IERS Reference Meridian as the currently use ...
(UTC)) are based on
weighted average The weighted arithmetic mean is similar to an ordinary arithmetic mean (the most common type of average), except that instead of each of the data points contributing equally to the final average, some data points contribute more than others. The ...
s of atomic clocks worldwide.


Relativity

As Einstein predicted, relativistic effects can also cause clock drift due to
time dilation In physics and relativity, time dilation is the difference in the elapsed time as measured by two clocks. It is either due to a relative velocity between them ( special relativistic "kinetic" time dilation) or to a difference in gravitational ...
. This is because there is no fixed universal time, time being relative to the observer.
Special relativity In physics, the special theory of relativity, or special relativity for short, is a scientific theory regarding the relationship between space and time. In Albert Einstein's original treatment, the theory is based on two postulates: # The laws ...
describes how two clocks held by observers in different
inertial frames In classical physics and special relativity, an inertial frame of reference (also called inertial reference frame, inertial frame, inertial space, or Galilean reference frame) is a frame of reference that is not undergoing any acceleration ...
(i.e. moving with respect to each other but not accelerating or decelerating) will each appear to either observer to tick at different rates. In addition to this,
general relativity General relativity, also known as the general theory of relativity and Einstein's theory of gravity, is the geometric theory of gravitation published by Albert Einstein in 1915 and is the current description of gravitation in modern physics ...
gives us
gravitational time dilation Gravitational time dilation is a form of time dilation, an actual difference of elapsed time between two events as measured by observers situated at varying distances from a gravitating mass. The lower the gravitational potential (the closer ...
. Briefly, a clock in a stronger gravitational field (e.g. closer to a planet) will appear to tick more slowly. People holding these clocks (i.e. those inside and outside the stronger field) would all agree on which clocks appear to be going faster. It is time itself rather than the function of the clock which is affected. Both effects have been experimentally observed. Time dilation is of practical importance. For instance, the clocks in
GPS satellites GPS satellite blocks are the various production generations of the Global Positioning System (GPS) used for satellite navigation. The first satellite in the system, Navstar 1, was launched on 22 February 1978. The GPS satellite constellatio ...
experience this effect due to the reduced gravity they experience (making their clocks appear to run more quickly than those on Earth) and must therefore incorporate relativistically corrected calculations when reporting locations to users. If general relativity were not accounted for, a navigational fix based on the GPS satellites would be false after only 2 minutes, and errors in global positions would continue to accumulate at a rate of about 10 kilometers each day.


Random number generators

Computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
s often need high quality random numbers, especially for
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adver ...
. There are several similar ways clock drift can be used to build
random number generator Random number generation is a process by which, often by means of a random number generator (RNG), a sequence of numbers or symbols that cannot be reasonably predicted better than by random chance is generated. This means that the particular outc ...
s (RNGs). One way to build a
hardware random number generator In computing, a hardware random number generator (HRNG) or true random number generator (TRNG) is a device that generates random numbers from a physical process, rather than by means of an algorithm. Such devices are often based on microscopic ...
is to use two independent clock crystals, one that for instance ticks 100 times per second and one that ticks 1 million times per second. On average the faster crystal will then tick 10,000 times for each time the slower one ticks. But since clock crystals are not precise, the exact number of ticks will vary. That variation can be used to create random bits. For instance, if the number of fast ticks is even, a 0 is chosen, and if the number of ticks is odd, a 1 is chosen. Thus such a 100/1000000 RNG circuit can produce 100 somewhat random bits per second. Typically such a system is biased—it might for instance produce more zeros than ones—and so hundreds of somewhat-random bits are "whitened" to produce a few unbiased bits. There is also a similar way to build a kind of "software random number generator". This involves comparing the timer tick of the operating system (the tick that usually is 100–1000 times per second) and the speed of the CPU. If the OS timer and the CPU run on two independent clock crystals the situation is ideal and more or less the same as the previous example. But even if they both use the same clock crystal the
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management *Business process, activities that produce a specific se ...
/program that does the clock drift measurement is "disturbed" by many more or less unpredictable events in the CPU such as
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted, ...
s and other processes and programs that run at the same time. Thus the measurement will still produce fairly good random numbers. Most hardware random number generators such as the ones described above are fairly slow. Therefore, most programs only use them to create a good seed that they then feed to a
pseudorandom number generator A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers. The PRNG-generate ...
or a
cryptographically secure pseudorandom number generator A cryptographically secure pseudorandom number generator (CSPRNG) or cryptographic pseudorandom number generator (CPRNG) is a pseudorandom number generator (PRNG) with properties that make it suitable for use in cryptography. It is also loosely kno ...
to produce many random numbers fast.


Timing attack

In 2006, a
side channel attack In computer security, a side-channel attack is any attack based on extra information that can be gathered because of the fundamental way a computer protocol or algorithm is implemented, rather than flaws in the design of the protocol or algorit ...
was published Steven J. Murdoch. ''Hot or Not: Revealing Hidden Services by their Clock Skew'', ACM CCS 2006
(pdf)
/ref> that exploited clock skew based on CPU heating. The attacker causes heavy CPU load on a
pseudonymous A pseudonym (; ) or alias () is a fictitious name that a person or group assumes for a particular purpose, which differs from their original or true name ( orthonym). This also differs from a new name that entirely or legally replaces an individu ...
server (
Tor hidden service Tor, short for The Onion Router, is free and open-source software for enabling anonymous communication. It directs Internet traffic through a free, worldwide, volunteer overlay network, consisting of more than seven thousand relays, to conc ...
), causing CPU heating. CPU heating is correlated with clock skew, which can be detected by observing timestamps (under the server's real identity).


See also

* Bit slip *
Clock skew Clock skew (sometimes called timing skew) is a phenomenon in synchronous digital circuit systems (such as computer systems) in which the same sourced clock signal arrives at different components at different times due to gate or, in more advanced ...
* Effects of relativity on GPS *
Injection locking Injection locking and injection pulling are the frequency effects that can occur when a harmonic oscillator is disturbed by a second oscillator operating at a nearby frequency. When the coupling is strong enough and the frequencies near enough, th ...
* Segal's law


References

{{DEFAULTSORT:Clock Drift Global Positioning System Clocks Random number generation Cryptographic attacks