Class ShamirsProtection

  • All Implemented Interfaces:
    KeyStore.ProtectionParameter, Destroyable

    public class ShamirsProtection
    extends Object
    implements KeyStore.ProtectionParameter, Destroyable
    Protects a KeyStore instance and its entries by applying Shamirs Secret Sharing algorithm. Passwords have been splitted into several secret shares and have to been merged again to recover the original password. In order to create a ShamirsProtection instance someone has to provide access to a certain subset of secret shares, e.g. paths to different slices (JSON files) of shares.
    Author:
    Christof Reichardt
    • Constructor Detail

      • ShamirsProtection

        public ShamirsProtection​(Path[] paths)
        Creates a Shamir protection parameter by providing the paths to the different slices containing the shares.
        Parameters:
        paths - path array to the JSON files (slices) containing the shares
      • ShamirsProtection

        public ShamirsProtection​(Collection<Path> paths)
        Creates a Shamir protection parameter by providing the paths to the different slices containing the shares.
        Parameters:
        paths - a Collection of Paths pointing to the JSON files (slices) containing the shares
      • ShamirsProtection

        public ShamirsProtection​(jakarta.json.JsonArray slices)
        Creates a Shamir protection parameter by providing a JsonArray comprising slices of secret shares.
        Parameters:
        slices - a JsonArray comprising slices of secret shares