/* Extract PIN from TOKEN for identity CID */ public static int EXTRACT_PIN(sbyte[] CID, int pin, sbyte[] TOKEN) { ECP P = ECP.fromBytes(TOKEN); if (P.is_infinity()) { return(INVALID_POINT); } sbyte[] h = hashit(0, CID); ECP R = mapit(h); pin %= MAXPIN; R = R.pinmul(pin, PBLEN); P.sub(R); P.toBytes(TOKEN); return(0); }