"zhongxuan (A)" zhongxuan2@huawei.com writes:
Where should I commit my patch? The access request to fork in Nettle / nettle * GitLab (liu.se)https://git.lysator.liu.se/nettle/nettle was denied.
Hi, I think you asked for "developer access" in the Nettle repo, which would allow you to push any changes you like to the repository. You can't have that, but unfortunately, I couldn't add any explanatory message when pushing the deny button in gitlab.
The usual way to contribute code in gitlab (as well as on github), is that you make your own "fork" of the repository, where you have full permissions. You commit your changes to a branch in that fork, and then create a merge request asking for changes to be merged into the original repo.
Yes, I've tried to make a fork in https://git.lysator.liu.se/nettle/nettle/-/forks/new but failed, it just reports ' An error occurred while forking the project. Please try again. '. I replied a long email but tragically didn’t attach my patch. Here I attach my new patch of ecc-sm2. Besides, could you help me figure out what's wrong with my fork? I preferred to commit in fork mode, too.
See https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html on how to create a fork from the gitlab ui.
When you work with git locally, you can have both your own "fork" repo and the original repo as git "remotes".
And if gitlab doesn't work out for you, you could also send the updated patch to this list.
Best regards, /Niels
-- Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677. Internet email is subject to wholesale government surveillance.
"zhongxuan (A)" zhongxuan2@huawei.com writes:
Yes, I've tried to make a fork in https://git.lysator.liu.se/nettle/nettle/-/forks/new but failed, it just reports ' An error occurred while forking the project. Please try again. '.
Sorry, I don't really know how to troubleshoot. Maybe you can try if it works better on the mirror repo at https://gitlab.com/gnutls/nettle?
I've had a new look at your latest patch. I'm not at all familiar with sm2, and I'm hoping I don't have to fully understand all details, but I am a bit confused.
I think one important part of your patch is about adding support for Weierstrass curves with a different constant than a = -3.
And then I look at the spec at https://datatracker.ietf.org/doc/html/draft-shen-sm2-ecdsa to see how the curve really is defined. It looks like that document gives several examples of curves, including one named "Fp-256", but the one that it looks like you are defining, in eccdata.c, is the one defined in Appendix D "Recommended parameters".
So my first question: Is "sm2" an appropriate name for a single curve, or is there some more specific name for the curve in Appendix D that you use?
Second question, when I look at that curve, it is defined like this:
: A elliptic curve on a prime field of 256 bits is recommended: : : : y^2 = x^3 + ax + b : : : p=FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF : a=FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFC : b=28E9FA9E 9D9F5E34 4D5A9E4B CF6509A7 F39789F5 15AB8F92 DDBCBD41 4D940E93 : n=FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF 7203DF6B 21C6052B 53BBF409 39D54123 : Gx=32C4AE2C 1F198119 5F990446 6A39C994 8FE30BBF F2660BE1 715A4589 334C74C7 : Gy=BC3736A2 F4F6779C 59BDCEE3 6B692153 D0A9877C C62A4740 02DF32E5 2139F0A0
But for this parameters, we have a = p - 3 = -3 (mod p), like for all other Weierstrass curves currently supported by Nettle! Which is good news, since then the same point addition functions can be used, but it also means that maybe you have done some work that isn't really needed?
Regards, /Niels
nettle-bugs@lists.lysator.liu.se