-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
Onvej sl/legacy zkp #1897
Onvej sl/legacy zkp #1897
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Haven't given much attention to the build script, but seems OK too.
@onvej-sl : I've noticed a side problem in the current Makefile that is touched by 0b29dbc :
From what I can see, the default Makefile settings assume that Valgrind libraries are installed on the system, and the above mentioned error turns up if they're not. trezor-firmware/crypto/Makefile Lines 53 to 57 in fd0d1ed
Up until the secp256k1-zkp addition, the "normal" build did not require Valgrind libraries outside of the tests. This has now changed when delivering the Note that secp256k1-zkp includes the libraries on I think it is reasonable to require the Valgrind libraries for the regular builds but recommend
|
I am OK with changing our logic from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in firmware/trezor.c
LGTM.
I'm not sure, what you mean by "normal" build. Unless I mess something up, this build of secp256k1-zkp shouldn't be used anywhere other than in tests. |
You're right, I was thinking of other legacy Makefile usage that is unrelated. Other parties may be using the crypto code for more than testing (it was formerly distributed as trezor-crypto for that purpose, after all) but I understand that this is not really supported. We previously discussed this area in the internal ticket no 86, but I think that is not as relevant to this PR. |
I understand. Are you OK with 562164a? If someone wants to compile the code without valgrind, they must use |
I think the
|
71052bb
to
87bf0d6
Compare
87bf0d6
to
ba3c66d
Compare
Implements #1874.
Regarding 05351ea: The size of the context depends on architecture, it's 184 for 32-bit architecture and 208 for 64-bit architecture.
SECP256K1_CONTEXT_SIZE
must be at least the size (but doesn't have to be equal). In 05351ea I setSECP256K1_CONTEXT_SIZE
to 184 for device build and to 208 for emulator build. There is no problem to haveSECP256K1_CONTEXT_SIZE
same for all builds if you think it's better.@hiviah Please review f6268db and the changes in
legacy/firmware/trezor.c
@andrewkozlik Please review the rest.