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); }
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); }
public virtual BigInteger CalculateSecret(BigInteger serverB) { B = Srp6Utilities.ValidatePublicValue(N, serverB); u = Srp6Utilities.CalculateU(digest, N, pubA, B); S = CalculateS(); return(S); }
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); }
/** * 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); }