Update ECCKiila generated implementations of secp521r1 and secp384r1
Categories
(NSS :: Libraries, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: iaroslav.gridin, Assigned: iaroslav.gridin)
Details
(Whiteboard: [nss-fx])
Attachments
(1 file, 1 obsolete file)
Actual results:
Implementations are out of date
| Assignee | ||
Comment 1•3 years ago
|
||
Bernstein-Yang constant-time field inversion for P-384, replacing FLT
Explicitly initialize curve point data structures
Various fiat-crypto upstream changes
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Hi Iaroslav, thanks for updating that code, could you add a benchmark of both old and new versions of the code here, please? TY!
Comment 3•3 years ago
|
||
Ben, would we like to have intel intrinsics code instead of their uint128 addition and subtraction?
| Assignee | ||
Comment 4•3 years ago
|
||
(In reply to Benjamin Beurdouche [:beurdouche] from comment #2)
Hi Iaroslav, thanks for updating that code, could you add a benchmark of both old and new versions of the code here, please? TY!
I ran ecperf with both versions. Any other specific benchmark that could be useful?
Updated code
Testing NIST-P384 using freebl implementation...
ECDH_Derive count:100000 sec: 168.96 op/sec: 591.86
ECDSA_Sign count:100000 sec: 33.09 op/sec: 3021.97
ECDHE max rate = 903.46
ECDSA_Verify count:100000 sec: 99.94 op/sec: 1000.65
... okay.
Testing NIST-P521 using freebl implementation...
ECDH_Derive count:100000 sec: 89.69 op/sec: 1114.89
ECDSA_Sign count:100000 sec: 31.51 op/sec: 3173.39
ECDHE max rate = 1072.07
ECDSA_Verify count:100000 sec: 62.48 op/sec: 1600.39
... okay.
current code
Testing NIST-P384 using freebl implementation...
ECDH_Derive count:100000 sec: 170.91 op/sec: 585.09
ECDSA_Sign count:100000 sec: 33.76 op/sec: 2961.80
ECDHE max rate = 886.72
ECDSA_Verify count:100000 sec: 101.02 op/sec: 989.92
... okay.
Testing NIST-P521 using freebl implementation...
ECDH_Derive count:100000 sec: 89.08 op/sec: 1122.58
ECDSA_Sign count:100000 sec: 31.33 op/sec: 3191.73
ECDHE max rate = 1078.58
ECDSA_Verify count:100000 sec: 61.46 op/sec: 1627.07
... okay.
Comment 5•3 years ago
|
||
This looks perfectly fine, no other benchmark needed : ) Thank you Iaroslav !
Comment 6•3 years ago
|
||
Awesome! Thanks a lot!
| Comment hidden (off-topic) |
Comment 8•3 years ago
|
||
Sorry, there was a problem with the detection of inactive users. I'm reverting the change.
| Assignee | ||
Comment 9•3 years ago
|
||
Comment 10•3 years ago
|
||
I have a small idea:
For HACL* code we have a docker that checks that the code is the same as in the hacl* master. Would we be interested in having the same for ECCKiila?
As the first step, when you have updated the code, where does it come from? Is it somewhere in github?
| Assignee | ||
Comment 11•3 years ago
|
||
The code is generated by ECCKiila templates https://gitlab.com/nisec/ecckiila/-/blob/master/README.md, so a way to do this
| Assignee | ||
Comment 12•3 years ago
|
||
...would be to incorporate the ECCKiila itself in some way.
Comment 13•3 years ago
|
||
Hi,
why do you have two patches? They seem to be changing the same files...
| Assignee | ||
Comment 14•3 years ago
|
||
Not sure how the second one got submitted, but now I've updated the D135765 and that one should be merged (couldn't find a way to delete the other one from Phabricator)
Comment 15•3 years ago
|
||
You have "Abandon the revision" (or something like this) in the action panel (right after the code changes).
Updated•3 years ago
|
Comment 16•3 years ago
|
||
(In reply to Iaroslav Gridin from comment #12)
...would be to incorporate the ECCKiila itself in some way.
I think this could be a nice thing to have (if one wishes to implement that) <- Leaving for future.
Comment 17•3 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:iaroslav.gridin, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
| Assignee | ||
Comment 19•3 years ago
|
||
Thank you. I will also make the docker image later.
Comment 20•3 years ago
|
||
Comment 21•3 years ago
|
||
(In reply to Iaroslav Gridin from comment #19)
Thank you. I will also make the docker image later.
Ok, thanks :)
Updated•3 years ago
|
Description
•