Class OwlClientRegistration

    • Constructor Detail

      • OwlClientRegistration

        public OwlClientRegistration​(java.lang.String clientId,
                                     char[] password)
        Convenience constructor for a new OwlClientRegistration that uses the OwlCurves.NIST_P256 elliptic curve, a SHA-256 digest, and a default SecureRandom implementation.

        After construction, the state will be REGISTRATION_NOT_CALLED.

        Parameters:
        clientId - unique identifier of this client. The server and client in the exchange must NOT share the same id.
        password - shared secret. A defensive copy of this array is made (and cleared once initiateUserRegistration() is called). Caller should clear the input password as soon as possible.
        Throws:
        java.lang.NullPointerException - if any argument is null
        java.lang.IllegalArgumentException - if password is empty
      • OwlClientRegistration

        public OwlClientRegistration​(java.lang.String clientId,
                                     char[] password,
                                     OwlCurve curve)
        Convenience constructor for a new OwlClientRegistration that uses a SHA-256 digest and a default SecureRandom implementation.

        After construction, the state will be REGISTRATION_NOT_CALLED.

        Parameters:
        clientId - unique identifier of this client.. The server and client in the exchange must NOT share the same id.
        password - shared secret. A defensive copy of this array is made (and cleared once initiateUserRegistration() is called). Caller should clear the input password as soon as possible.
        curve - elliptic curve See OwlCurves for standard curves.
        Throws:
        java.lang.NullPointerException - if any argument is null
        java.lang.IllegalArgumentException - if password is empty
      • OwlClientRegistration

        public OwlClientRegistration​(java.lang.String clientId,
                                     char[] password,
                                     OwlCurve curve,
                                     Digest digest,
                                     java.security.SecureRandom random)
        Construct a new OwlClientRegistration.

        After construction, the registrationState will be REGISTRATION_NOT_CALLED.

        Parameters:
        clientId - unique identifier of this client. The server and client in the exchange must NOT share the same id.
        password - shared secret. A defensive copy of this array is made (and cleared once initiateUserRegistration() is called). Caller should clear the input password as soon as possible.
        curve - elliptic curve. See OwlCurves for standard curves
        digest - digest to use during zero knowledge proofs and key confirmation (SHA-256 or stronger preferred)
        random - source of secure random data for x1 and x2, and for the zero knowledge proofs
        Throws:
        java.lang.NullPointerException - if any argument is null
        java.lang.IllegalArgumentException - if password is empty
    • Method Detail

      • getRegistrationState

        public boolean getRegistrationState()
        Get the status of the user registration. I.E. whether or not this server has registered a user already. See the REGSITRATION_* constants for possible values.
        Returns:
        True if the user has been registered or false otherwise