Skip to content
New issue

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

Added SM2 Elliptic Curve for psi based on ecdh #4833

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

circlekkk
Copy link

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

circlekkk and others added 6 commits April 14, 2023 15:03
Signed-off-by: circlekkk <[email protected]>
	修改:     python/federatedml/util/consts.py
Signed-off-by: circlekkk <[email protected]>
Signed-off-by: circlekkk <[email protected]>
@mgqa34
Copy link
Contributor

mgqa34 commented May 6, 2023

It seems tinyec is not production available?

@circlekkk
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants