public class SM9Pairing
extends java.lang.Object
This is a correctness-first reference implementation: the Miller loop runs in F_p12 on the twist image, and the Frobenius/final exponentiation are ordinary F_p12 exponentiations. It is deliberately straightforward, not optimised.
| Modifier and Type | Method and Description |
|---|---|
static Fp12 |
pairing(ECPoint p,
SM9G2Point q)
e(P, Q) for P in G1 (a point of E(F_q)) and Q in G2 (a point of the twist).
|
static byte[] |
toBytes(Fp12 z)
Serialize a G_T element to bytes per GM/T 0044.5: high dimension first,
recursively over the 1-2-4-12 tower (w^2, w^1, w^0; then v^1, v^0; then
u^1, u^0), 32 bytes per F_q component; 384 bytes total.
|
public static Fp12 pairing(ECPoint p, SM9G2Point q)
public static byte[] toBytes(Fp12 z)