This repository contains a library which is used on the token server to deal with crypto related things.
This is done in C++ to be able to deal with multiple processors at the same time, and to have the best possible performances. The underlying library is a patched version of Crypto++, with added code to deal with HKDF derivation.
When you compile the library, it generates a library and an executable binary. The binary is meant to run with powerhose, and the exchanged messages are encoded using protocol buffers.
To run this code, you need to compile it. First, make sure that you have the right version of Crypto++. What we are doing here is generating a derivated secret from a key, using the HKDF algorithm provided by the patched version of Crypto++.
Then, make sure you have the right libraries to run the project. You need to install powerhose on your system and compile it. Once done that, running make should be enough for building the code able to spawn the processes:
You also need to start a consumer for this lib. This code ships with a python consumer. You need to have the pyzmq library installed as well as powerhose. If everything is correct, then you can run the consumer by doing