Comments (5)
Hi, we already have a description of the safety guarantees in a branch (part of the pre-1.0 work we're doing), it's just not merged yet. I'll close this issue when those changes get merged into the develop
branch.
Use of the nightly
feature only adds additional safeguards that are only possible using Rust; without it, we get exactly the same properties as are available to C implementations. So while the nightly
feature is recommended, it is not required to achieve the same properties as an alternative implementation written in C.
from curve25519-dalek.
@hdevalence From what I can tell, it looked like the nightly
feature in subtle
is (currently) required to prevent the optimizer from breaking the constant-time guarantees, in the same way that C can achieve through things like volatile
or passing through an asm block just like Rust can. Have I missed something in subtle
in that regard?
In any case, I appreciate and anticipate the future documentation from the branch. :)
from curve25519-dalek.
The nightly
feature adds an extra guard that's aimed at preventing the compiler from having enough information to prove that a certain branch-adding optimization would be equivalent, so that the optimizer should not be able to apply that optimization.
Not having this guard doesn't mean that the optimizer breaks the code, it just means that it could be possible for a future compiler to infer more information about the values of some temporary variables, which could allow it to prove that inserting a branch would be equivalent to the code we wrote.
However none of that happens anyways -- the guard is an extra precaution that doesn't meaningfully change the generated code, aside from name mangling and the choice of backend for the clear_on_drop
implementation.
from curve25519-dalek.
In #162 @hdevalence documented more w.r.t. constant-time guarantees, but if anything is still unclear please feel welcome to re-raise this issue.
from curve25519-dalek.
Those changes cover it, thank you!
from curve25519-dalek.
Related Issues (20)
- Pointer width detection in `build.rs` may break for obscure platforms HOT 1
- ed25519_dalek No generate function HOT 2
- Split up crates so end users can get faster compile times HOT 9
- `curve25519_dalek::SubgroupPoint`: missing traits
- Build fails on nightly-2024-02-05 HOT 2
- Crate fails with `nightly-2024-02-06` HOT 3
- How to check a VerifyingKey point is within the prime order subgroup HOT 3
- Support NIST validation criteria for Edwards points HOT 2
- ed25519: support PKCS#8 v1 (for OpenSSL interop)? HOT 2
- Use of unstable library feature 'stdsimd HOT 6
- Use of unstable library feature 'stdsimd' HOT 3
- Incorrect use of cfg to import dependency HOT 1
- docs.rs homepage examples use `rand_core` crate option, but do not mention its existence HOT 2
- [docs request] how to serialize a public key in the format compatible with `~/.ssh/authorized_keys`? HOT 2
- AVX512-IFMA & AVX10 status
- curve25519: nightly CI seems borked w/ warn(unused_imports)
- Impl std::num_traits::{One, Zero} for Scalar types
- Zeroize `SecretKey` on drop HOT 5
- Potential optimization for the torsion check HOT 1
- 4.1.3 release? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curve25519-dalek.