/simple_nts_client

Simple NTS(Network Time Security) Client

Primary LanguageRubyMIT LicenseMIT

simple_nts_client

Gem Version CI Maintainability

simple_nts_client is CLI that is simple NTS(Network Time Security) Client implementation. This CLI prints the now timestamp got with NTS. Current implementation is based on:

Installation

The gem is available at rubygems.org. You can install it the following:

$ gem install simple_nts_client

Usage

$ simple_nts_client --help
Usage: simple_nts_client [options]
    -s, --server VALUE               NTS-KE server name (default time.cloudflare.com)
    -p, --port VALUE                 NTS-KE port number (default 4460)
    -v, --verbose                    verbose mode       (default false)

You can run it the following:

$ simple_nts_client
2020-10-30 20:00:00 +0900

If you need to access other NTS-KE server or port, you can run it the following:

$ simple_nts_client --server YOURSERVER --port YOURPORT
2020-10-30 20:00:00 +0900

How "simple" client?

  • The CLI supports only AEAD_AES_SIV_CMAC_256 as AEAD algorithms to protect the NTPv4 packet.
  • The CLI sends the first one of the received cookies via the response of the New Cookie for NTPv4 record and discards cookies that didn't send.
  • The CLI just prints the timestamp adjusted by calculated system clock offset.

License

The gem is available as open source under the terms of the MIT License.