Package com.nimbusds.srp6

Examples of com.nimbusds.srp6.SRP6CryptoParams


   
    System.out.print("\tEnter public server value 'B' (hex): ");
    BigInteger B = readBigInteger();
    System.out.println();
   
    SRP6ClientCredentials cred;
   
    try {
      cred = client.step2(config, s, B);
     
    } catch (SRP6Exception e) {
View Full Code Here


 
    // Step 1
 
    System.out.println("Client session step 1");
   
    SRP6ClientSession client = new SRP6ClientSession();
   
    User user = getUser("\t");
    client.step1(user.I, user.P);
 
    System.out.println();
   
   
    // Step 2
   
    System.out.println("Client session step 2");
   
    SRP6CryptoParams config = getConfig("\t");
   
    System.out.print("\tEnter salt 's' (hex): ");
    BigInteger s = readBigInteger();
    System.out.println();
   
    System.out.print("\tEnter public server value 'B' (hex): ");
    BigInteger B = readBigInteger();
    System.out.println();
   
    SRP6ClientCredentials cred;
   
    try {
      cred = client.step2(config, s, B);
     
    } catch (SRP6Exception e) {
     
      System.out.println(e.getMessage());
      return;
    }
   
    System.out.println("\tComputed public value 'A' (hex): " + BigIntegerUtils.toHex(cred.A));
    System.out.println("\tComputed evidence message 'M1' (hex): " + BigIntegerUtils.toHex(cred.M1));
    System.out.println();
   
   
    // Step 3
   
    System.out.println("Client session step 3");
   
    System.out.print("\tEnter server evidence message 'M2' (hex): ");
   
    BigInteger M2 = readBigInteger();
   
    try {
      client.step3(M2);
     
    } catch (SRP6Exception e) {
   
      System.out.println(e.getMessage());
      return;
View Full Code Here

   *            The large safe prime in radix10
   * @param g
   *            The safe prime generator in radix10
   */
  public SRP6JavascriptServerSessionSHA256(String N, String g) {
    super(new SRP6CryptoParams(fromDecimal(N), fromDecimal(g), SHA_256));
  }
View Full Code Here

   *            The large safe prime in radix10
   * @param g
   *            The safe prime generator in radix10
   */
  public SRP6JavascriptServerSessionSHA1(String N, String g) {
    super(new SRP6CryptoParams(fromDecimal(N), fromDecimal(g), SHA_1));
  }
View Full Code Here

*/
public class JavaVerifierGenerator {
  private final SRP6CryptoParams config;

  public JavaVerifierGenerator(String N, String g){
    config = new SRP6CryptoParams(SRP6JavascriptServerSession.fromDecimal(N), SRP6JavascriptServerSession.fromDecimal(g),
        SRP6JavascriptServerSessionSHA1.SHA_1);
  }
View Full Code Here

   */
  private void generatePasswordVerifier()
    throws IOException {
   
    System.out.println("Initialize verifier generator");
    SRP6CryptoParams config = getConfig("\t");
   
    SRP6VerifierGenerator vGen = new SRP6VerifierGenerator(config);
   
    User user = getUser("");
    System.out.println();
View Full Code Here

   
    // Step 2
   
    System.out.println("Client session step 2");
   
    SRP6CryptoParams config = getConfig("\t");
   
    System.out.print("\tEnter salt 's' (hex): ");
    BigInteger s = readBigInteger();
    System.out.println();
   
View Full Code Here

    System.out.println("*** Nimbus SRP-6a server ***");
    System.out.println();
   
    // Step INIT
    System.out.println("Initialize server session");
    SRP6CryptoParams config = getConfig("\t");
   
    SRP6ServerSession server = new SRP6ServerSession(config);
   
   
    // Step 1
View Full Code Here

   
    System.out.print(prefix + "Enter hash algorithm 'H' [SHA-1]: ");
    String H = readInput("SHA-1");
    System.out.println();
   
    return new SRP6CryptoParams(N, g, H);
  }
View Full Code Here

   *            cryptographic constants which must match those being used by
   *            the client.
   */
  public SRP6JavascriptServerSession(SRP6CryptoParams srp6CryptoParams) {
    this.config = srp6CryptoParams;
    session = new SRP6ServerSession(config);
    session.setHashedKeysRoutine(new HexHashedURoutine());
    session.setClientEvidenceRoutine(new HexHashedClientEvidenceRoutine());
    session.setServerEvidenceRoutine(new HexHashedServerEvidenceRoutine());
  }
View Full Code Here

TOP

Related Classes of com.nimbusds.srp6.SRP6CryptoParams

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.