pub trait DecryptionTable: Send + Sync {
// Required methods
fn lookup(
&self,
key: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<Option<u32>>> + Send + 'static>>;
fn store(
&self,
key: [u8; 32],
value: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>;
// Provided method
fn initialize(
&self,
k: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>> { ... }
}
Expand description
A (possibly asynchronous) access to a discrete-log lookup table.
The keys of the table are 32-byte encodings of group elements, and the values are 32-bit integer discrete logarithms.
Before use, the decryption table should have been initialized with all
discrete logarithms up to the maximum possible bitsize that can occur in
decryption: 2^{16 + lg(N)}
, where N
is the number of ciphertexts to
aggregate (e.g., aggregating up to 64 ciphertexts requires a table of size
2^{16 + 6} = 2^22
). The provided initialize
method will generate the
necessary calls to store
to initialize the table.