RustCrypto / RustCrypto/traits

universal-hash: parallel block processing

Open
#289 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

univeral-hash
Dominant language
Rust
Stars
755
Forks
256
Avg merge
1h 27m
Merged PRs (30d)
2

Description

SIMD implementations of UHFs are able to process multiple input blocks in parallel. However UniversalHash::update only processes one-block-at-a-time.

There's some precedent for parallel block processing in the block-cipher crate, which has an associated ParBlocks type-level constant which signals how many blocks a given implementation can process in parallel:

https://docs.rs/block-cipher/0.8.0/block_cipher/trait.BlockCipher.html#associatedtype.ParBlocks

I believe @newpavlov wanted to make some changes to how that works, but regardless, universal-hash should have similar support for processing multiple blocks in parallel in SIMD contexts

/cc @str4d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the UniversalHash::update entry point and review the block-cipher ParBlocks precedent linked in the issue. Determine how universal-hash should expose parallel block processing for SIMD implementations, then verify that the resulting API supports multiple input blocks while preserving existing single-block behavior.

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
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.