This is how to get the curve25519 basepoint in monero (use js console at https://xmr.llcoins.net/)
> var identity = "0100000000000000000000000000000000000000000000000000000000000000"
> var base = ge_scalarmult_base(identity)
> base
"5866666666666666666666666666666666666666666666666666666666666666"
The C++ implementation gives the same string (using rct::scalarmultBase(rct::identity())).
In java, there's a standard crypto library called bouncycastle (maven: org.bouncycastle:bcprov-debug-jdk15on:1.59). The java code in the research lab uses bouncycastle: https://github.com/monero-project/research-lab.git
This is how to print the basepoint using bouncycastle:
ECParameterSpec curve = ECNamedCurveTable.getParameterSpec("curve25519");
ECPoint base = curve.getG();
byte[] bytes = base.getEncoded(true);
for (int i = 0; i < bytes.length; i++) {
System.out.format("%02x", bytes[i]);
}
// 032aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad245a
So the basepoint looks a bit different this time. Apparently these are different ways to encode the same curve point. Is there a way to convert one form to the other?