public static TatePairing nssTate() { BigInt p = new BigInt("8D5006492B424C09D2FEBE717EE382A57EBE3A352FC383E1AC79F21DDB43706CFB192333A7E9CF644636332E83D90A1E56EFBAE8715AA07883483F8267E80ED3", 16); Field field = new Fp(p); //order =2^159+2^17+1 BigInt orderOfGroup = new BigInt("8000000000000000000000000000000000020001", 16); //BigInt orderOfE= new BigInt("11711338024714009669995700965425239711927177698599625717955894184681899877662611539569996945969293708404400344208273812850399351303651875378098503534075638"); //co-factor BigInt cof = new BigInt("11AA00C9256849813A5FD7CE2FDC7054AFD7809E7F7FD948C4B9C1C1E76FFEFF4ECAB83C950112DECB41D6EDA", 16); FieldElement a4 = field.Negate(BigInt.ValueOf(3)); FieldElement a6 = new BigInt("609993837367998001C95B87A6BA872135E26906DB4C192D6E038486177A3EDF6C50B9BB20DF881F2BD05842F598F3E037B362DBF89F0A62E5871D41D951BF8E", 16); EllipticCurve ec = new EllipticCurve(field, field.GetZero(), field.GetZero(), field.GetZero(), a4, a6); return(new TatePairing(ec, orderOfGroup, cof)); }
public void NegateTest() { BigInt e = new BigInt("7765fc3a723080303681660010f14b9bf", 16); Assert.AreEqual(e, field.Negate(a)); }