We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#include //security define #define AES_SECURITY 128 #define MR_PAIRING_SSP #include "pairing_1.h" #include "big.h" using namespace std; extern "C" { #include "miracl.h" #include "mirdef.h" } int main() { miracl* mip = mirsys(5000, 16); mip->IOBASE = 16; PFC pfc(AES_SECURITY); //Big mod=pfc.mod; Big m = get_modulus(); G1 P; pfc.random(P); Big a; pfc.random(a); G1 aP = pfc.mult(P, a);//aP Big in_a = inverse(a, m); Big b; pfc.random(b); Big in_b = inverse(b, m);//b-1 G1 abP = pfc.mult(aP, b);//aPb=abP G1 ab_bP = pfc.mult(abP, in_b);//abP*b-1=aP if (aP == ab_bP) { cout << "Success!" << endl; } return 0; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#include
//security define
#define AES_SECURITY 128
#define MR_PAIRING_SSP
#include "pairing_1.h"
#include "big.h"
using namespace std;
extern "C"
{
#include "miracl.h"
#include "mirdef.h"
}
int main()
{
miracl* mip = mirsys(5000, 16);
mip->IOBASE = 16;
PFC pfc(AES_SECURITY);
//Big mod=pfc.mod;
Big m = get_modulus();
G1 P;
pfc.random(P);
Big a;
pfc.random(a);
G1 aP = pfc.mult(P, a);//aP
Big in_a = inverse(a, m);
Big b;
pfc.random(b);
Big in_b = inverse(b, m);//b-1
G1 abP = pfc.mult(aP, b);//aPb=abP
G1 ab_bP = pfc.mult(abP, in_b);//abP*b-1=aP
if (aP == ab_bP)
{
cout << "Success!" << endl;
}
return 0;
}
The text was updated successfully, but these errors were encountered: