This allows the caller to address nodes by ID instead of by index.
Also contains a few other minor changes that will be needed for
`DynamicHoneyBadger`.
This is a _synchronous_ key generation algorithm. We will use it in
`DynamicHoneyBadger`, on top of `HoneyBadger` to satisfy the synchrony
requirements.
It can also be used independently e.g. on top of a blockchain.