Here you can find the source of getPrivateKey(BigInteger ran, BigInteger publicKey)
public static BigInteger getPrivateKey(BigInteger ran, BigInteger publicKey)
//package com.java2s; //License from project: Apache License import java.math.BigInteger; public class Main { public static BigInteger getPrivateKey(BigInteger ran, BigInteger publicKey) { return publicKey.modInverse(ran); }// ww w .jav a 2s . c o m }