Exemplo n.º 1
0
 protected virtual BigInteger SelectPrivateValue()
 {
     return(Srp6Utilities.GeneratePrivateValue(digest, N, g, random));
 }
Exemplo n.º 2
0
        public virtual BigInteger GenerateVerifier(byte[] salt, byte[] identity, byte[] password)
        {
            BigInteger e = Srp6Utilities.CalculateX(this.digest, this.N, salt, identity, password);

            return(this.g.ModPow(e, this.N));
        }
Exemplo n.º 3
0
        /**
         * Creates a new SRP verifier
         * @param salt The salt to use, generally should be large and random
         * @param identity The user's identifying information (eg. username)
         * @param password The user's password
         * @return A new verifier for use in future SRP authentication
         */
        public virtual BigInteger GenerateVerifier(byte[] salt, byte[] identity, byte[] password)
        {
            BigInteger x = Srp6Utilities.CalculateX(digest, N, salt, identity, password);

            return(g.ModPow(x, N));
        }
Exemplo n.º 4
0
 protected virtual BigInteger SelectPrivateValue()
 {
     return(Srp6Utilities.GeneratePrivateValue(param.N, random));
 }
 /**
  * Initialises the server to accept a new client authentication attempt
  * @param N The safe prime associated with the client's verifier
  * @param g The group parameter associated with the client's verifier
  * @param v The client's verifier
  * @param digest The digest algorithm associated with the client's verifier
  * @param random For key generation
  */
 public Srp6Server(SrpConstants param, BigInteger v)
 {
     this.param = param;
     this.v     = v;
     this.privB = Srp6Utilities.GeneratePrivateValue(param.N, new SecureRandom());
 }