Project

sekishiki

0.0
The project is in a healthy, maintained state
The Ruby implementation of Sekishiki: The Secure Purpose-Agnostic Network Protocol
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 7.1.2
>= 6.3.0
 Project Readme

README

Sekishiki logo

Sekishiki (Ruby)

The Ruby implementation of Sekishiki: The Secure Purpose-Agnostic Network Protocol.

Why “Sekishiki”?

This question is answered in why_sekishiki.org, but note that it contains spoilers from Saint Seiya (aka Knights of the Zodiac), so read it ONLY if you are okay with that!

TL;DR: it is a Saint Seiya reference.

Installation

Install the gem and add to the application’s Gemfile by executing:

bundle add sekishiki

If bundler is not being used to manage dependencies, install the gem by executing:

gem install sekishiki

Usage

TODO: Write (better) usage instructions here. Since I just wanted to publish this Gem as soon as possible, currently, the only available way to learn how to use Sekishiki is by reading its test files located at the spec directory. For an actual full usage example, check the spec/sekishiki_spec.rb test.

Packet format

The Sekishiki packet format has the following structure:

Sekishiki packet format

where

  • The information inside parenthesis are the size of each field in bytes;
  • The header of Sekishiki packets are 76 bytes long;
  • Green fields should always be filled, since they are required for all Sekishiki packets;
  • The yellow field (OTP code) might be left untouched. However, since it is what provides protection against replay attacks, its usage is highly encouraged. This Sekishiki implementation ships with built-in features to fill it with valid data (check the Usage section); and
  • Blue fields often can be filled with zeros (\x00), since they are reserved for applications which implements Sekishiki. Such fields are handy for transporting feature-specific information or application checks;

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

This section is at TODO state, but the tl;dr is: it is a good practice to first write and test your code by creating RSpec tests at the spec directory, but this procedure is not mandatory (just do not submit broken code).