MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / x

Method x

ECDSA/P256Element.cpp:78–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78P256Element::Scalar P256Element::x() const
79{
80 BIGNUM* x = BN_new();
81#if OPENSSL_VERSION_MAJOR >= 3
82 assert(EC_POINT_get_affine_coordinates(curve, point, x, 0, 0) != 0);
83#else
84 assert(EC_POINT_get_affine_coordinates_GFp(curve, point, x, 0, 0) != 0);
85#endif
86 char* xx = BN_bn2dec(x);
87 Scalar res((bigint(xx)));
88 OPENSSL_free(xx);
89 BN_free(x);
90 return res;
91}
92
93P256Element P256Element::operator +(const P256Element& other) const
94{

Callers 2

signFunction · 0.80
checkFunction · 0.80

Calls 1

bigintClass · 0.50

Tested by

no test coverage detected