README
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 sekishikiIf bundler is not being used to manage dependencies, install the gem by executing:
gem install sekishikiUsage
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:
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).

