Git Product home page Git Product logo

Comments (9)

djc avatar djc commented on July 18, 2024 1

In general, the issue here is the choice for the RustCrypto project to split the primitives into many crates, while ring provides a monolithic crate API. I would probably create one left-hand entry for Primitives to encompass all of Password Hashing, General-Purpose Hashing, AEAD encryption, RSA and Digital Signatures, with entries for both ring and the RustCrypto project, where the description of these contain links to the top-level pages for RustCrypto and maybe the relevant modules in ring. (But I guess you maybe don't have support for links within project descriptions for now?)

(The fact that RustCrypto splits out rsa as a separate crate is a little odd from a conceptual point of view.)

Putting webpki and ring under See also for TLS/SSL makes sense to me. 👍

from blessed-rs.

nicoburns avatar nicoburns commented on July 18, 2024

I rather agree with your analysis. But I'm not quite sure how they should be presented. Do you think they should just be omitted entirely? For now I've stuck them behind a "see also" section.

from blessed-rs.

oconnor663 avatar oconnor663 commented on July 18, 2024

Kind of a tangent, but I'd lean towards removing MD5 and SHA-1 from the list, since those are broken primitives that shouldn't generally be used in new code. Or if we need to include them for back-compat reasons, I think it's important to clearly mark them as deprecated. I like the way the ring API does this: https://docs.rs/ring/latest/ring/digest/index.html. If I had to pick exactly which digests to include, I'd probably say SHA-2 and SHA-3.

from blessed-rs.

djc avatar djc commented on July 18, 2024

That's also a good point -- I think that's an additional reason not to go into too much detail on a list of primitives.

from blessed-rs.

oconnor663 avatar oconnor663 commented on July 18, 2024

My even edgier opinion is that AEADs like AES-GCM and ChaCha20-Poly1305 aren't suitable for general use, much like unauthenticated ciphers and raw block ciphers aren't suitable for general use. All of these things are too difficult to use correctly without expert help, and the overwhelming majority of applications that need encryption will do better with higher-level protocols like TLS/HTTPS or higher-level tools like full-disk encryption or age. But I accept that this isn't a common opinion, and that it probably makes sense for this list to cater to what developers are actually asking for, rather than what some jerk thinks they should be asking for :)

from blessed-rs.

djc avatar djc commented on July 18, 2024

Can also agree with that one.

from blessed-rs.

nicoburns avatar nicoburns commented on July 18, 2024

While I largely agree with your takes, I think I would like for the most part to keep this guide opinionated about the best implementation of a given algorithm or technique without being too opinionated which algorithms or techniques one ought to use. While I wouldn't choose to use md5 or SHA1 for new code, I've found that I quite frequently do have need for this (to compare with data which is already in those formats or interoperate with 3rd party services that are using them).

it probably makes sense for this list to cater to what developers are actually asking for

Basically this. I'd rather someone thinking "I need to use SHA1, and I'm wondering whether Rust is viable for my project" ends up at "oh great, there's an SHA1 library" than "guess I'll have to use Go or C++".

from blessed-rs.

nicoburns avatar nicoburns commented on July 18, 2024

Having said that, is anyone aware of a higher-level symmetric encryption library in Rust? We could certainly also point people to that if there's a good one.

from blessed-rs.

oconnor663 avatar oconnor663 commented on July 18, 2024

I think the best candidates are either age or crypto_secretstream, but I don't think either of those are widely used enough for this list, and they're not super beginner-friendly either. The set of algorithms you have now seems pretty reasonable.

from blessed-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.