FATE
FATE copied to clipboard
Added SM2 Elliptic Curve for psi based on ecdh
Signed-off-by: circlekkk [email protected]
Fixes ISSUE #xxx
Changes:
1.add file:
- python/federatedml/secureprotol/ecc/sm2.py
2.add SM2 parameters to the following file:
-
python/fate_client/pipeline/param/consts.py
-
python/federatedml/param/intersect_param.py
-
python/federatedml/util/consts.py
3.The following file code has been slightly modified:
- python/federatedml/secureprotol/elliptic_curve_encryption.py
detailed, added SM2 in function def __get_curve_instance
It seems tinyec is not production available?
It seems tinyec is not production available?
It seems tinyec is not production available?
1.The author suggests that this library is not suitable for production because it allows calculation of points outside the curve. When defining points on the curve, if the points are not on the curve, there will be no error and only a warning. 2.In psi based ECDH, the elliptic curve parameters use recommended parameters rather than custom parameters, meaning that there will be no situation where the base point G is not on the curve. 3.In subsequent calculations, only the dot product k * G was used. According to the properties of an elliptical curve, for a point G on an elliptical curve, multiply by an integer to obtain a point that is also on the elliptical curve.
So, it will not involve calculations outside the curve.