Function haybale_pitchfork::check_for_ct_violation[][src]

pub fn check_for_ct_violation<'p>(
    funcname: &'p str,
    project: &'p Project,
    args: Option<Vec<AbstractData>>,
    sd: &StructDescriptions,
    config: Config<'p, Backend>,
    pitchfork_config: &PitchforkConfig
) -> ConstantTimeResultForFunction<'p>
Expand description

Checks whether a function is “constant-time” in the secrets identified by the args data structure. That is, does the function ever make branching decisions, or perform address calculations, based on secrets.

args: for each function parameter, an AbstractData describing whether the parameter is secret data itself, public data, a public pointer to secret data (and if so how much), etc; or AbstractData::default() to use the default based on the LLVM parameter type and/or the struct descriptions in sd. Specifying None for args is equivalent to supplying a Vec with only AbstractData::default()s.

sd: a mapping of LLVM struct names to AbstractData descriptions of those structs. These will be used whenever a struct of the appropriate type is found while processing an AbstractData::default(); for more details, see docs on AbstractData::default().

pitchfork_config: see docs on PitchforkConfig.

Other arguments are the same as for haybale::symex_function().