Construct a Function from a user-defined callback. Can be used to build a postprocessor.
Source:R/core.R
new_function.RdRequired features: contrib, honest-but-curious
Details
new_function in Rust documentation.
Why honest-but-curious?:
An OpenDP function must satisfy two criteria.
These invariants about functions are necessary to show correctness of other algorithms.
First, function must not use global state.
For instance, a postprocessor that accesses the system clock time
can be used to build a measurement that reveals elapsed execution time,
which escalates a side-channel vulnerability into a direct vulnerability.
Secondly, function must only raise data-independent exceptions.
For instance, raising an exception with the value of a DP release will both
reveal the DP output and cancel the computation, potentially avoiding privacy accounting.