Java BigInteger Calculate calculateGx(BigInteger p, BigInteger g, BigInteger x)

Here you can find the source of calculateGx(BigInteger p, BigInteger g, BigInteger x)

Description

Calculate g^x mod p as done in round 1.

License

Open Source License

Declaration

public static BigInteger calculateGx(BigInteger p, BigInteger g,
        BigInteger x) 

Method Source Code

//package com.java2s;
import java.math.BigInteger;

public class Main {
    /**/*  w  w w  .  j  a  va 2  s.c o m*/
     * Calculate g^x mod p as done in round 1.
     */
    public static BigInteger calculateGx(BigInteger p, BigInteger g,
            BigInteger x) {
        return g.modPow(x, p);
    }
}

Related

  1. base128(BigInteger val)
  2. base62Encode(BigInteger number)
  3. bitArrayToUnsignedBigInteger(int[] bits)
  4. bitcoinValueToFriendlyString(BigInteger value)
  5. byte_size(BigInteger bi)
  6. calculateRx_(BigInteger Rx, BigInteger n)
  7. castToBigInteger(Object val)
  8. chop(BigInteger in, int bits)
  9. clip(BigInteger bi, int numberOfBytes)