Class AccountEntropyPool

  • All Implemented Interfaces:

    
    public class AccountEntropyPool
    
                        

    The randomly-generated user-memorized entropy used to derive the backup key, with other possible future uses.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static String generate() Generate a new entropy pool and return the canonical string representation.
      static boolean isValid(String accountEntropyPool) Checks whether a string can be used as an account entropy pool.
      static Array<byte> deriveSvrKey(String accountEntropyPool) Derives an SVR key from the given account entropy pool.
      static BackupKey deriveBackupKey(String accountEntropyPool) Derives a backup key from the given account entropy pool.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AccountEntropyPool

        AccountEntropyPool()
    • Method Detail

      • generate

         static String generate()

        Generate a new entropy pool and return the canonical string representation.

        This pool contains log_2(36^64) = ~330 bits of cryptographic quality randomness.

        Returns:

        A 64 character string containing randomly chosen digits from [a-z0-9].

      • isValid

         static boolean isValid(String accountEntropyPool)

        Checks whether a string can be used as an account entropy pool.

        Returns:

        true if the string is a structurally valid account entropy value.

      • deriveSvrKey

         static Array<byte> deriveSvrKey(String accountEntropyPool)

        Derives an SVR key from the given account entropy pool.

        accountEntropyPool must be a **validated** account entropy pool; passing an arbitrary string here is considered a programmer error.

      • deriveBackupKey

         static BackupKey deriveBackupKey(String accountEntropyPool)

        Derives a backup key from the given account entropy pool.

        accountEntropyPool must be a **validated** account entropy pool; passing an arbitrary string here is considered a programmer error.