[LEAPSECS] stale leap second information
Poul-Henning Kamp
phk at phk.freebsd.dk
Sat Jan 17 03:24:32 EST 2015
I played a bit with the idea this morning, and I think this is how I would
do it:
+-------+-----------+-----+---------------------+---------------+
|1 1 1 1|M M M M M M M M M|L L L L L L L L L|D D|C C C C C C C C|
+-------+-----------+-----+---------------------+---------------+
3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
The first four bits are constant 0xf putting the resulting IPv4 in
the "Class-E" segment which is reserved. This should give us 100%
certainty in detecting meddling DNS resolvers.
The "M" field is nine bit unsigned month number:
(year - 1972) * 12 + month - 1
The "L" field the eight bit signed(!) TAI-UTC difference before the
start of the indicated month.
The "D" field is two bit signed TAI-UTC change before the start of
the indicated month.
The "C" field is a CRC8 with poly=0xcf (found by exhaustive search)
Here are how recent Bulletin-C's would look:
YYYY MM before after encoded crc IP Decoded
-------------------------------------------------------------------------
2012 1 34 34 f7808800 65 247.128.136.101 -> OK 2012 1 +34 +0
2012 7 34 35 f7988900 66 247.152.137.102 -> OK 2012 7 +34 +1
2013 1 35 35 f7b08c00 0b 247.176.140.11 -> OK 2013 1 +35 +0
2013 7 35 35 f7c88c00 58 247.200.140.88 -> OK 2013 7 +35 +0
2014 1 35 35 f7e08c00 69 247.224.140.105 -> OK 2014 1 +35 +0
2014 7 35 35 f7f88c00 f3 247.248.140.243 -> OK 2014 7 +35 +0
2015 1 35 35 f8108c00 be 248.16.140.190 -> OK 2015 1 +35 +0
2015 7 35 36 f8288d00 fa 248.40.141.250 -> OK 2015 7 +35 +1
-------------------------------------------------------------------------
Attached is a proof of concept in python.
You can poke the result at my test-domain "leap.net-tid.dk"
Poul-Henning
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leap.py
Type: text/x-python
Size: 2918 bytes
Desc: leap.py
URL: <https://pairlist6.pair.net/pipermail/leapsecs/attachments/20150117/853c51f8/attachment.py>
More information about the LEAPSECS
mailing list