ingonyama-zk / icicle

A hardware acceleration library for compute intensive cryptography :ice_cube:
https://dev.ingonyama.com/icicle/overview
MIT License
339 stars 105 forks source link

[FEAT]: Need an example to batch hash bytes arrays of different lengths #657

Closed flyq closed 4 days ago

flyq commented 1 week ago

Description

I find hash field elements in batch in this example, but it seems to assume that the input data has the same length (all elements). If I want to batch calculate the hash of some bytes, and these bytes have 4 types of lengths, can icicle provide this function?

btw, I see the code in merkle example:

    // Zero-padding policy is applied to ensure that input matches the expected size.
    let mut config = MerkleTreeConfig::default();
    config.padding_policy = PaddingPolicy::ZeroPadding; // Zero-padding if input is too small.
                                                        // TODO: Padding not supported in v3.1; will be available in v3.2.

Motivation

Expand the application scenarios of icicle

(optional) CUDA backend branch

cuda-backend-branch: main

ShaniBabayoff commented 1 week ago

@flyq - thank you! I am Shani from Ingonyama - I'd love to chat and learn more about your use case and how we can support it! what's best way to reach out to you? my telegram is @ShaniBb2 and my mail is shanib@ingonyama.com