vrfInOut method
This function computes the VRF (Verifiable Random Function) input and output
using the provided MerlinTranscript
as the cryptographic context.
The process involves hashing a transcript with the public key to generate a curve point, multiplying this point with the private key, and returning the corresponding VRF input and output.
Implementation
VRFInOut vrfInOut(MerlinTranscript script) {
final publicHashPoint = publicKey().vrfHash(script);
final pM =
Ed25519Utils.pointScalarMult(publicHashPoint.toEdwardBytes(), key());
final p = RistrettoPoint.fromEdwardBytes(pM);
return VRFInOut._(publicHashPoint.toBytes(), p.toBytes());
}