Module shamirsecretsharing::hazmat [] [src]

Hazardous materials (key-sharing)

This is the hazmat module. This stands for hazardous materials. This module is only to be used for experts, because it does not have all the straightforward guarantees that the normal API has. E.g. where the normal API prevents tampering with the shares, this API does not do any integrity checks, etc. Only use this module when you are really sure that Shamir secret sharing is secure in your use case! If you are not sure about this, you are probably lost (go back).

Example stuff that you will need to guarantee when using this API (not exhaustive):

  • All shared keys are uniformly random.
  • Keys produced by combine_keyshares are kept secret even if they did not manage to restore a secret.
  • You will check the integrity of the restored secrets (or integrity is not a requirement).

Constants

KEYSHARE_SIZE

Keyshare size from shares produced by create_keyshares

KEY_SIZE

The size of the input data to create_keyshares

Functions

combine_keyshares

Combine a set of key shares and return the original key

create_keyshares

Create a set of key shares