Added a simple self test mode where a source and sink key are generated and the
source/sink shared-secret key is generated using the source keys and the sink
keys. The test makes sure those keys are identical.
Apparently the precise precision JavaScript has for storing integers may not
quite be enough. We push this problem downstream by saving the hexadecimal
representation of the key rather than the number itself.
Some refactoring work to split KSV generation from key generation. This, along
with the addition of a transpose function, allows us to generate sink keys too.
The irony of asserting copyright on this code is not lost on me. However, it's
become a trigger response whenever I release anything to the world now :).