CalculateU() публичный статический Метод

public static CalculateU ( IDigest digest, BigInteger N, BigInteger A, BigInteger B ) : BigInteger
digest IDigest
N Org.BouncyCastle.Math.BigInteger
A Org.BouncyCastle.Math.BigInteger
B Org.BouncyCastle.Math.BigInteger
Результат Org.BouncyCastle.Math.BigInteger
Пример #1
0
 public virtual BigInteger CalculateSecret(BigInteger clientA)
 {
     this.A = Srp6Utilities.ValidatePublicValue(this.N, clientA);
     this.u = Srp6Utilities.CalculateU(this.digest, this.N, this.A, this.pubB);
     this.S = this.CalculateS();
     return(this.S);
 }
Пример #2
0
 public virtual BigInteger CalculateSecret(BigInteger serverB)
 {
     this.B = Srp6Utilities.ValidatePublicValue(this.N, serverB);
     this.u = Srp6Utilities.CalculateU(this.digest, this.N, this.pubA, this.B);
     this.S = this.CalculateS();
     return(this.S);
 }
Пример #3
0
 public virtual BigInteger CalculateSecret(BigInteger serverB)
 {
     B = Srp6Utilities.ValidatePublicValue(N, serverB);
     u = Srp6Utilities.CalculateU(digest, N, pubA, B);
     S = CalculateS();
     return(S);
 }
Пример #4
0
 public virtual BigInteger CalculateSecret(BigInteger clientA)
 {
     A = Srp6Utilities.ValidatePublicValue(N, clientA);
     u = Srp6Utilities.CalculateU(digest, N, A, pubB);
     S = CalculateS();
     return(S);
 }
 /**
  * Processes the client's credentials. If valid the shared secret is generated and returned.
  * @param clientA The client's credentials
  * @return A shared secret BigInteger
  * @throws CryptoException If client's credentials are invalid
  */
 public virtual BigInteger CalculateSecret(IDigest digest, BigInteger clientA)
 {
     this.A = Srp6Utilities.ValidatePublicValue(param.N, clientA);
     this.u = Srp6Utilities.CalculateU(digest, param.N, A, pubB);
     this.S = v.ModPow(u, param.N).Multiply(A).Mod(param.N).ModPow(privB, param.N);
     return(S);
 }
Пример #6
0
        /**
         * Generates client's verification message given the server's credentials
         * @param serverB The server's credentials
         * @return Client's verification message for the server
         * @throws CryptoException If server's credentials are invalid
         */
        public virtual BigInteger CalculateSecret(IDigest digest, BigInteger serverB)
        {
            this.B = Srp6Utilities.ValidatePublicValue(param.N, serverB);
            this.u = Srp6Utilities.CalculateU(digest, param.N, pubA, B);
            this.S = CalculateS();

            return(S);
        }