geToBytes static method

void geToBytes(
  1. List<int> s,
  2. GroupElementP2 h
)

Implementation

static void geToBytes(List<int> s, GroupElementP2 h) {
  final FieldElement recip = FieldElement();
  final FieldElement x = FieldElement();
  final FieldElement y = FieldElement();
  feInvert(recip, h.z);
  feMul(x, h.x, recip);
  feMul(y, h.y, recip);
  feTobytes(s, y);
  s[31] ^= (feIsnegative(x) << 7) & 0xFF;
}