Here you can find the source of isGoodGaAndGb(BigInteger g_a, BigInteger p)
public static boolean isGoodGaAndGb(BigInteger g_a, BigInteger p)
//package com.java2s; /*/*from w w w. j a v a2 s . co m*/ * This is the source code of Telegram for Android v. 2.x.x. * It is licensed under GNU GPL v. 2 or later. * You should have received a copy of the license in this archive (see LICENSE). * * Copyright Nikolai Kudashov, 2013-2015. */ import java.math.BigInteger; public class Main { public static boolean isGoodGaAndGb(BigInteger g_a, BigInteger p) { return !(g_a.compareTo(BigInteger.valueOf(1)) != 1 || g_a.compareTo(p.subtract(BigInteger.valueOf(1))) != -1); } }