RustCrypto / RustCrypto/traits
Async traits
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 755
- Forks
- 256
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 2
Description
Several crates in this repo could benefit from having async equivalents. There are several use cases for async, such as communicating with network services which implement a particular cryptographic primitive (Cloud KMS, NetHSM), or things like cryptographic tokens, SmartCards, non-networked HSMs (e.g. PCI cards, USB devices), or embedded cryptographic accelerators.
Unfortunately Rust doesn't natively support async traits yet. The most commonly used solution at the moment is @dtolnay's async-trait crate. This provides an ergonomic syntax which should hopefully be easy to transition to hypothetical future natively supported async traits, however at the moment it requires std and uses Box to store Futures. There's some discussion about improving this happening on rust-internals right now.
I think it'd be useful to start defining some async traits, even if they presently depend on std. Here's a tracking list of crates that could benefit from async traits:
-
aead: embedded cryptographic accelerators -
cipher: embedded cryptographic accelerators -
async-signature: Cloud KMS/NetHSM services and embedded cryptographic accelerators
Others? (please leave a note in the comments if you have a use case and I'll update)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the async-signature work and the remaining tracking items for aead and cipher. Read the linked async-trait and Rust internals discussions to understand current constraints; the issue needs a decided crate scope and design before completion can be defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100