Conversation
lukevalenta
reviewed
Jul 15, 2026
lukevalenta
left a comment
Contributor
There was a problem hiding this comment.
Is this worth updating to make this constant-time like crypto/internal/nistec is?
| // - A new method included for double-point multiplication. | ||
| // | ||
| // Note: the scalar-multiplication routines in this package are not fully | ||
| // constant time. |
Contributor
There was a problem hiding this comment.
Just to add a little more detail:
Suggested change
| // constant time. | |
| // constant time. Execution time and memory access can depend on the value of | |
| // the secret scalar, so avoid using these routines with secret scalars where | |
| // timing side-channels are a concern. |
Contributor
There was a problem hiding this comment.
Claude suggested this as a description of where the non-constant timedness comes from. I have not carefully checked though, so if it doesn't sound right please ignore:
// Note: the scalar-multiplication routines in this package are not fully
// constant time. The windowed point arithmetic itself is constant time, but
// the scalar reduction and recoding (reduceScalar and toOdd) use variable-time
// math/big operations, so execution time and memory allocations can depend on
// the value of the secret scalar. Avoid using these routines with secret
// scalars where timing side-channels are a concern.
| } | ||
|
|
||
| // ScalarMult returns (Qx,Qy)=k*(Px,Py) where k is a number in big-endian form. | ||
| // It is not fully constant time. |
Contributor
There was a problem hiding this comment.
Suggested change
| // It is not fully constant time. | |
| // It is not fully constant time; see the package documentation for details. |
|
|
||
| // ScalarBaseMult returns k*G, where G is the base point of the group | ||
| // and k is an integer in big-endian form. | ||
| // and k is an integer in big-endian form. It is not fully constant time. |
Contributor
There was a problem hiding this comment.
Suggested change
| // and k is an integer in big-endian form. It is not fully constant time. | |
| // and k is an integer in big-endian form. It is not fully constant time; | |
| // see the package documentation for details. |
lukevalenta
approved these changes
Jul 15, 2026
Co-authored-by: Luke Valenta <lvalenta@cloudflare.com>
cjpatton
pushed a commit
that referenced
this pull request
Jul 22, 2026
Issue #657 asked for an explicit README-level warning that some experimental CIRCL packages are not constant time. PRs #638 and #651 added per-package constant-time caveats to eight packages, but the README's Security Disclaimer still only mentioned that the library is experimental — it never mentioned constant time. Add a "Constant-Time Caveats" subsection under the existing Security Disclaimer, pointing readers at the per-package notes in group, oprf, blindsign/blindrsa/partiallyblindrsa, secretsharing, tss/rsa, zk/dl, zk/dleq, and ecc/p384. Documentation-only change: no source files touched, no API change, no tests added. Refs: #657
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.