Skip to content

Wrap Poulpy's blind selection / retrieval primitives #8

@cedoor

Description

@cedoor

Summary

Expose encrypted array indexing in squid: given a Ciphertext<T> encoding an index, select one Ciphertext<T> from a collection without revealing which element was chosen.

Background

Poulpy's bdd_arithmetic module exposes three primitives for this, each with different trade-offs:

  • GLWEBlindSelection — binary CMux tree over a HashMap; best for random map access
  • GLWEBlindRetriever — stateful streaming accumulator (add / flush); best for large collections processed one element at a time
  • GLWEBlindRetrieval — in-place Cswap butterfly network over a Vec; best when the full collection needs to stay in memory after selection

All three bootstrap on every gate (CMux / Cswap), so they do not accumulate unbounded noise.

Work

  • Define a default path (likely GLWEBlindSelection as the simplest) exposed via ctx.select(&selector, inputs, &ek)
  • Document when users should prefer each of the three alternatives over the default
  • Follow the safe-defaults convention from conventions.mdc

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions