-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Move constant-time functions into a separate module #4866
Move constant-time functions into a separate module #4866
Conversation
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
9d4c409
to
ada562b
Compare
5c29d58
to
a283f18
Compare
3f8e951
to
0d26967
Compare
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.
I reviewed this PR commit by commit, but since I think f0c2880 needs major rework, I've only made an architectural review for the work done in the subsequent commits. Other than the issue with rsa_private
and the recommendation to delay moving base64 functions until after #4814 is fixed, I agree with the general idea of the changes made, I just haven't fully verified that they're correct.
library/base64.c
Outdated
@@ -65,99 +66,6 @@ static const unsigned char base64_dec_map[128] = | |||
|
|||
#define BASE64_SIZE_T_MAX ( (size_t) -1 ) /* SIZE_T_MAX is not standard */ | |||
|
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.
There is another ongoing work on the Base64 constant-time code (#4835, which I started but @tom-daubney-arm has taken over). To facilitate concurrent work on two moderately complex pull requests, I propose to leave the base64 module alone in this pull request. This way, #4835 and the 3.0 version of it can make progress. Once both this PR and the base64 PR are merged, make another simple PR to move the new base64 functions to the new module.
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
pr-merge passed on 77390dc. Travis and pr-head failed only on known issues. So this PR is good to merge once the backport is ready. |
The latest run of pr-merge fails with seemingly relevant errors. Can you please investigate? |
Hmm. The failure seems to be related to a usage of |
Ok, so that's a conflict (just not the kind that git can notice) so we should handle it like any other conflict and either rebase this branch on current development, or merge current development into this branch, depending on what's most convenient considering this PR's history. Labeling "needs: work" then. |
Given that this PR involves moving code and renaming functions, a rebase would be very painful. So please do a merge, then separate commit(s) to resolve the bugs. |
…o_separate_module
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
685472b
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 - thanks!
Description
Goals (to be done in the order described here, so as to facilitate review):
.c
files with the same name in different subprojects.library
.mbedtls_<modulename>_xxx
). The names should be unique except for functions that have exactly the same prototype and interface.0
/1
or0
/~1
, to maskuint8_t
orsize_t
.Resolves #3649
Requires Backporting
Todos