Esempio n. 1
0
        public void TestDHKeyExchangeTime()
        {
            var c = SrpConstants.Lookup(SrpStrength.Bits1024);

            c.g.ModPow(c.N, c.N);

            DebugStopwatch sw   = new DebugStopwatch();
            var            time = sw.TimeEvent(() => Hash <Sha1Digest> .Compute(c.Nb));

            System.Console.WriteLine(time);
        }
Esempio n. 2
0
 public Srp6Client(SrpConstants param)
 {
     this.param = param;
     random     = new SecureRandom();
 }
 /**
  * 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());
 }