-
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 base64 constant-time functions to the new module #4926
Comments
I'd like to clarify the intention here, and perhaps more generally with Currently, base64.c has 3 functions that are constant-time: Actually, looking at the contents of |
See #3649. Moving common things in one place was only one of the goals. Another goal was to make validation simpler: when reviewing/analyzing/testing, we know immediately what's expected to be constant-time. So it was a conscious decision made last year. It's not an irrevocable decision, we can revisit it. |
Ok, so I read 3649 again, and it seems like you cited two reasons for creating a new module:
I was focused on the second reason, and I think I missed some of the things you see as consequences of the first reason. I fully agree that "if it's in this module, it's expected to be constant-trace", but I don't think we need or want the converse "if it's constant-time, it's in this module" to be true. I mean, I don't think anybody is suggesting moving the implementations of ChachaPoly, all hashes, HMAC, etc. to For example:
I didn't realize at that point we might have different understandings of the decision that was being made. I thought we were all talking about moving the generic constant-time functions for a new module, which I don't think the description explicitly contradicts, and evidently you were also thinking we were all in agreement, or we'd have discussed it then. I'd like to have a discussion about it and see if the rules need to be revisited, or perhaps just written down to avoid future misunderstandings, but right now's probably not the best time (I already spent more time writing this message than I probably should have), considering the other more urgent things on our plates. Let's talk about this later then. (Anyway, 3649 is supposed to have follow-ups.) |
Your point of view makes sense, and I think it would be reasonable to move specific-purpose functions such as I suggest doing that after we've done a pass of rationalizing core functions though. It's easier to do that with all the functions in one place. |
Agreed! Btw, do we already have tickets to track the rationalization pass? |
No. #3649 describes some high-level objectives for these follow-ups. |
#3649 (PR: #4866) moves constant-time functions to a new module. #4814 (PR: #4835) rewrites base64 constant-time functions. To allow the two to proceed in parallel, the base64 work will happen inside
base64.c
and the main constant-time PR not touch the base64 functions.The goal of this task is to move base64 constant-time functions to the new module, once both #3649 and #4814 are resolved.
The text was updated successfully, but these errors were encountered: