Earlier quoted context omitted.
Yes, in fact I see hardly any cryptocurrency stuff with rust. I'm building an OS in rust, and write most firmware with rust too.
As an outsider with some good feelings towards Rust and some negative one towards crypto, almost all Rust jobs I’ve seen have been in crypto
Rust Cryptography Should Be Written in Rust
61–70 of 110 posts
Re: Rust Cryptography Should Be Written in Rust
#62What are the language/tooling gaps specifically that prevent this today, and have there been RFCs to close them? Are the gaps primarily "in-language" or missing tooling for formal verification?
Deterministic builds, and inability to ensure constant-time operations are the two that come to mind. The first is a build security / supply chain issue, and the latter is a real vulnerability if the rust compiler "helpfully" optimizes away no-op operations in alternate code paths.
I know constant time operation is important for these algorithms, but couldn't I do this with a timer? Call the algorithm, store the result, return the result exactly one second (an eternity in CPU time) after it was called. Basically put a timer wrapper around the actual cryptography algorithm. It would harm latency, but not throughput.
This is a honest question I'm hoping to have answered.
Re: Rust Cryptography Should Be Written in Rust
#63Crypto code should be written in assembly. Zero ambiguity, zero undefined behavior, 100% verifiable.
Re: Rust Cryptography Should Be Written in Rust
#64Re: Rust Cryptography Should Be Written in Rust
#65Earlier quoted context omitted.
Deterministic builds, and inability to ensure constant-time operations are the two that come to mind. The first is a build security / supply chain issue, and the latter is a real vulnerability if the rust compiler "helpfully" optimizes away no-op operations in alternate code paths.
Whenever I'm wearing my tinfoil hat, I wonder if all the advice to never implement your own crypto is a conspiracy to reduce independent implementations of cryptography algorithms. I know constant time operation is important for these algorithms, but couldn't I do this with a timer? Call the algorithm, store the result, return the result exactly one second (an eternity in CPU time) after it was called. Basically put…
Re: Rust Cryptography Should Be Written in Rust
#66I reckon https://github.com/RustCrypto is an effort in this space.
Re: Rust Cryptography Should Be Written in Rust
#67I can't seem to fathom the why in this. Why is Rust different from, say, Python?
Re: Rust Cryptography Should Be Written in Rust
#68Re: Rust Cryptography Should Be Written in Rust
#69Earlier quoted context omitted.
Deterministic builds, and inability to ensure constant-time operations are the two that come to mind. The first is a build security / supply chain issue, and the latter is a real vulnerability if the rust compiler "helpfully" optimizes away no-op operations in alternate code paths.
Whenever I'm wearing my tinfoil hat, I wonder if all the advice to never implement your own crypto is a conspiracy to reduce independent implementations of cryptography algorithms. I know constant time operation is important for these algorithms, but couldn't I do this with a timer? Call the algorithm, store the result, return the result exactly one second (an eternity in CPU time) after it was called. Basically put…
For instance, a multiply might take slightly more power than an add instruction and that can be monitored.
If you think these attacks are unreasonable, recently there was a post on HN about using the LED of a smart card reader to detect the fluctuations in power usage to gain information about the secret key. These attacks are real
Re: Rust Cryptography Should Be Written in Rust
#70I can't seem to fathom the why in this. Why is Rust different from, say, Python?