WebAssembly / WebAssembly/wasi-crypto
Batch operations to enable use of multi-buffer libraries on the host?
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 180
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
The current wasi-crypto API definition allows operations to be performed one at a time. There are also "multi-buffer" techniques (e.g. Intel Multi-buffer Cryptography Functions) that leverage SIMD instructions to provide a performance benefit by operating on multiple requests in parallel.
What is the best way to enable these multi-buffer techniques for use with wasi-crypto?
One idea is to add some "batch" API functions to wasi-crypto to supply multiple operations to the host via a single host call. For example: signature_state_sign_many(). This seems to fit reasonably well at the lower level wasi-crypto interface but may break some of the higher level API abstractions. For example, adding a batch signing API to a keypair doesn't really add as much value as being able to perform a batch of signatures using different keypairs.
An alternative idea could be to push the batching down into the host and have an async API at the wasi-crypto level. But this likely requires promises / futures which don't appear to be supported for WASI at the moment.
Thoughts?
Contributor guide
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 with the current wasi-crypto API definition and the linked Intel Multi-buffer Cryptography Functions reference. Compare the proposed batch operations with pushing batching into the host through an async API, including the effect on higher-level abstractions. Done means reaching and documenting a concrete API direction.
Written by the indexing model from the issue text.
Assessment
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100