All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.tls.crypto.DHGroup Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java APIs for the TLS, including a JSSE provider. The APIs are designed primarily to be used in conjunction with the BC LTS provider but may also be used with other providers providing cryptographic services.

There is a newer version: 2.73.7
Show newest version
package org.bouncycastle.tls.crypto;

import java.math.BigInteger;

/**
 * Carrier class for Diffie-Hellman group parameters.
 */
public class DHGroup
{
    private final BigInteger g, p, q;
    private final int l;

    /**
     * Base constructor with the prime factor of (p - 1).
     *
     * @param p the prime modulus.
     * @param q specifies the prime factor of (p - 1).
     * @param g the base generator.
     */
    public DHGroup(BigInteger p, BigInteger q, BigInteger g, int l)
    {
        this.p = p;
        this.g = g;
        this.q = q;
        this.l = l;
    }

    public BigInteger getG()
    {
        return g;
    }

    public int getL()
    {
        return l;
    }

    public BigInteger getP()
    {
        return p;
    }

    public BigInteger getQ()
    {
        return q;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy