Example usage for org.bouncycastle.crypto.agreement.jpake JPAKEPrimeOrderGroups NIST_3072

List of usage examples for org.bouncycastle.crypto.agreement.jpake JPAKEPrimeOrderGroups NIST_3072

Introduction

In this page you can find the example usage for org.bouncycastle.crypto.agreement.jpake JPAKEPrimeOrderGroups NIST_3072.

Prototype

JPAKEPrimeOrderGroup NIST_3072

To view the source code for org.bouncycastle.crypto.agreement.jpake JPAKEPrimeOrderGroups NIST_3072.

Click Source Link

Document

From NIST.

Usage

From source file:com.distrimind.util.crypto.P2PJPAKESecretMessageExchanger.java

License:Open Source License

P2PJPAKESecretMessageExchanger(AbstractSecureRandom secureRandom, byte[] participantID, char[] message,
        byte[] salt, int offset_salt, int len_salt)
        throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException {
    super(3, 3);/* w w w .j  a  v a2  s.  c o  m*/
    if (message == null)
        throw new NullPointerException("message");
    if (salt != null && salt.length - offset_salt < len_salt)
        throw new IllegalArgumentException("salt");

    jpake = new JPAKEParticipant(getParticipanIDString(participantID),
            getHashedPassword(message, salt, offset_salt, len_salt), JPAKEPrimeOrderGroups.NIST_3072,
            new SHA512Digest(), secureRandom);
    this.keyMaterial = null;
}

From source file:com.distrimind.util.crypto.P2PJPAKESecretMessageExchanger.java

License:Open Source License

P2PJPAKESecretMessageExchanger(AbstractSecureRandom secureRandom, byte[] participantID, byte[] message,
        int offset, int len, byte[] salt, int offset_salt, int len_salt, boolean messageIsKey)
        throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException {
    super(3, 3);//  www .j a v a 2 s.c o m
    if (message == null)
        throw new NullPointerException("message");
    if (message.length - offset < len)
        throw new IllegalArgumentException("message");
    if (salt != null && salt.length - offset_salt < len_salt)
        throw new IllegalArgumentException("salt");

    jpake = new JPAKEParticipant(getParticipanIDString(participantID),
            getHashedPassword(message, offset, len, salt, offset_salt, len_salt, messageIsKey),
            JPAKEPrimeOrderGroups.NIST_3072, new SHA512Digest(), secureRandom);
    this.keyMaterial = null;
}