TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Rust Cryptography Should Be Written in Rust

116 pointsby bigfish24over 1 year ago

14 comments

hardwaregeekover 1 year ago
I'd love this to be the case, but ring, which the author of the post created, is unfortunately not really maintained. It doesn't build on Windows ARM, which in turn inhibits rustls. It's a shame because I'd prefer to not depend on OpenSSL. Not that it's the author's fault. We shouldn't be reliant on a single person's contributions to have a working Rust cryptography toolchain.
评论 #37275786 未加载
评论 #37275754 未加载
Animatsover 1 year ago
The problem is wanting both fast and constant-time. That&#x27;s so machine level that it is hard to even talk about in a high level language.<p>On the other hand, most of the security problems found in OpenSSL are not in the core cryptographic functions. They&#x27;re in the networking and certificate management machinery. All that should definitely be in Rust.
评论 #37277069 未加载
gnarulaover 1 year ago
I reckon <a href="https:&#x2F;&#x2F;github.com&#x2F;RustCrypto">https:&#x2F;&#x2F;github.com&#x2F;RustCrypto</a> is an effort in this space.
评论 #37276733 未加载
评论 #37275906 未加载
dcsommerover 1 year ago
What are the language&#x2F;tooling gaps specifically that prevent this today, and have there been RFCs to close them? Are the gaps primarily &quot;in-language&quot; or missing tooling for formal verification?
评论 #37275613 未加载
评论 #37276490 未加载
cassepipeover 1 year ago
Related is this effort to write a PGP backend in Rust : <a href="https:&#x2F;&#x2F;sequoia-pgp.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;sequoia-pgp.org&#x2F;</a>
max_over 1 year ago
So far the only solid use case for Rust that I have seen in applications where security is extremely important.<p>Not wonder it is becoming the de-facto language for building applications in the blockchain space.<p>Does anyone else use Rust outside the blockchain&#x2F;cryptography space? What are you working on?
评论 #37275599 未加载
评论 #37275691 未加载
评论 #37276168 未加载
评论 #37275474 未加载
评论 #37275392 未加载
评论 #37275770 未加载
评论 #37275647 未加载
评论 #37275617 未加载
评论 #37275894 未加载
评论 #37275547 未加载
评论 #37275615 未加载
评论 #37275698 未加载
评论 #37275370 未加载
评论 #37275551 未加载
评论 #37279915 未加载
评论 #37277387 未加载
评论 #37275580 未加载
评论 #37275520 未加载
评论 #37279542 未加载
评论 #37275374 未加载
nullcover 1 year ago
&gt; Rust should be improved to provide the necessary building blocks that are needed to write cryptography code that is free from timing side channels and similar hazards<p>I misread that at first as saying it already did and was rushing to the comments to say &quot;like hell it does!&quot;-- but this is a difficult situation given that it doesn&#x27;t really even exist in C where it would be easier to provide.<p>Technically, since Intel and AMD won&#x27;t make guarantees that operations like multiplies won&#x27;t have data dependent timing no language on these popular systems provide what is needed, at least in theory. (In practice things are somewhat better).<p>Ignoring the processor interface issues, it would be totally rad if there were types in rust for secrets that were guaranteed to get suitable handling. But doing so would probably require architectural changes to LLVM...
deterministicover 1 year ago
Nope. Cryptography code should be written using proof assistents. Proving the correctness of the code.<p>Like the Everest project.
astrangeover 1 year ago
I like the part where he says companies should spend money to give him something that&#x27;ll be less secure (because it&#x27;ll be a redundant implementation) to satisfy an aesthetic request.
JoeyBananasover 1 year ago
Forget the naysayers, I for one pray that the crypto graybeards will learn rust and grant the author his wish.
cesarefover 1 year ago
I can&#x27;t seem to fathom the why in this. Why is Rust different from, say, Python?
评论 #37276900 未加载
评论 #37276787 未加载
评论 #37279728 未加载
评论 #37276771 未加载
piwiover 1 year ago
Security is a weak-link problem. Once you decide to solve the bootstrapping challenge, you can use Rust for everything else.
评论 #37275532 未加载
retrocryptidover 1 year ago
But which version of rust?
charsiiover 1 year ago
Crypto code should be written in assembly. Zero ambiguity, zero undefined behavior, 100% verifiable.
评论 #37275627 未加载
评论 #37275411 未加载
评论 #37275430 未加载
评论 #37275638 未加载
评论 #37275419 未加载
评论 #37276711 未加载