Class OwlServerRegistration


  • public class OwlServerRegistration
    extends java.lang.Object
    A server in the Owl key exchange protocol specifically for the user registration phase.

    See OwlClientRegistration for more details on the user registration in Owl.

    This class is stateful and NOT threadsafe. Each instance should only be used for ONE complete Owl registration phase (i.e. a new OwlServerRegistration and OwlClientRegistration should be constructed for each new Owl exchange).

    • Constructor Detail

      • OwlServerRegistration

        public OwlServerRegistration​(java.lang.String serverId)
        Convenience constructor for a new OwlServerRegistration that uses the OwlCurves.NIST_P256 elliptic curve, a SHA-256 digest, and a default SecureRandom implementation.

        After construction, the registrationState will be REGISTRATION_NOT_CALLED.

        Parameters:
        serverId - unique identifier of this server. The server and client in the exchange must NOT share the same id.
        Throws:
        java.lang.NullPointerException - if any argument is null
      • OwlServerRegistration

        public OwlServerRegistration​(java.lang.String serverId,
                                     OwlCurve curve)
        Convenience constructor for a new OwlServerRegistration that uses a SHA-256 digest and a default SecureRandom implementation.

        After construction, the registrationState will be REGISTRATION_NOT_CALLED.

        Parameters:
        serverId - unique identifier of this server. The server and client in the exchange must NOT share the same id.
        curve - elliptic curve See OwlCurves for standard curves.
        Throws:
        java.lang.NullPointerException - if any argument is null
      • OwlServerRegistration

        public OwlServerRegistration​(java.lang.String serverId,
                                     OwlCurve curve,
                                     Digest digest,
                                     java.security.SecureRandom random)
        Construct a new OwlServerRegistration.

        After construction, the registrationState will be REGISTRATION_NOT_CALLED.

        Parameters:
        serverId - unique identifier of this server. The client and server in the exchange must NOT share the same id.
        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 x3 and x4, and for the zero knowledge proofs
        Throws:
        java.lang.NullPointerException - if any argument is null
    • Method Detail

      • getRegistrationState

        public boolean getRegistrationState()
        Check's 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