|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
A round candidate constructed from a previously discovered register candidate. More...
#include </home/runner/work/hal/hal/plugins/hawkeye/include/hawkeye/round_candidate.h>

Public Member Functions | |
| RoundCandidate ()=default | |
Default constructor for RoundCandidate. More... | |
| ~RoundCandidate ()=default | |
Default destructor for RoundCandidate. More... | |
| Netlist * | get_netlist () const |
| Get the netlist of the round candidate. The netlist is a partial copy of the netlist of the register candidate. More... | |
| graph_algorithm::NetlistGraph * | get_graph () const |
| Get the netlist graph of the round candidate. More... | |
| u32 | get_size () const |
| Get the size of the candidate, i.e., the width of its registers. More... | |
| const std::set< Gate * > & | get_input_reg () const |
| Get the candidate's input register. More... | |
| const std::set< Gate * > & | get_output_reg () const |
| Get the candidate's output register. More... | |
| const std::set< Gate * > & | get_state_logic () const |
| Get the candidate's combinational logic computing the next state. More... | |
| const std::set< Net * > & | get_state_inputs () const |
| Get the candidate's state inputs to the logic computing the next state. More... | |
| const std::set< Net * > & | get_control_inputs () const |
| Get the candidate's control inputs to the logic computing the next state. More... | |
| const std::set< Net * > & | get_other_inputs () const |
| Get the candidate's other inputs to the logic computing the next state. More... | |
| const std::set< Net * > & | get_state_outputs () const |
| Get the candidate's state outputs from the logic computing the next state. More... | |
| const std::map< Gate *, std::set< Gate * > > & | get_input_ffs_of_gate () const |
| Get a map from each combinational gate of the round function to all the input flip-flops it depends on. More... | |
| const std::map< u32, std::set< Gate * > > & | get_longest_distance_to_gate () const |
| Get a map from an integer distance to all gates that are reachable within at most that distance when starting at any input flip-flop. More... | |
Static Public Member Functions | |
| static Result< std::unique_ptr< RoundCandidate > > | from_register_candidate (RegisterCandidate *candidate) |
| Compute a round candidate from a previously identified register candidate. More... | |
A round candidate constructed from a previously discovered register candidate.
This class holds all information belonging to a round candidate. Round candidates are constructed from register candidates by copying the sub-circuit consisting of the input and (if pipelined) output registers as well as the next-state/round-function logic in between these registers. For round-based implementations, commonly only a single register exists that acts as an input and output register at the same time. In such cases, this register is considered to be the input register of the round function and an exact copy of the register will be appended to the round function outputs so that input and output register are guaranteed to be distinct.
Definition at line 52 of file round_candidate.h.
|
default |
Default constructor for RoundCandidate.
|
default |
Default destructor for RoundCandidate.
|
static |
Compute a round candidate from a previously identified register candidate.
The netlist of this candidate will be a partial copy of the original netlist, comprising only the gates belonging to the registers and the logic computing the next state. In case of a round-based implementation, the output register will be a copy of the input register. All data structures of the round candidate will be initialized in the process.
| [in] | candidate | - The register candidate. |
Definition at line 53 of file round_candidate.cpp.
References hal::combinational, hal::netlist_factory::create_netlist(), hal::data, ERR, hal::ff, hal::graph_algorithm::NetlistGraph::from_netlist(), hal::Endpoint::get_gate(), hal::Netlist::get_gate_library(), hal::hawkeye::RegisterCandidate::get_input_reg(), hal::hawkeye::RegisterCandidate::get_netlist(), hal::hawkeye::RegisterCandidate::get_output_reg(), hal::hawkeye::RegisterCandidate::get_size(), hal::BasePin< T >::get_type(), log_info, and OK.
Referenced by hal::PYBIND11_PLUGIN().
| const std::set< Net * > & hal::hawkeye::RoundCandidate::get_control_inputs | ( | ) | const |
Get the candidate's control inputs to the logic computing the next state.
Definition at line 377 of file round_candidate.cpp.
Referenced by hal::hawkeye::identify_sbox(), and hal::PYBIND11_PLUGIN().
| graph_algorithm::NetlistGraph * hal::hawkeye::RoundCandidate::get_graph | ( | ) | const |
Get the netlist graph of the round candidate.
Definition at line 347 of file round_candidate.cpp.
Referenced by hal::hawkeye::locate_sboxes(), and hal::PYBIND11_PLUGIN().
| const std::map< Gate *, std::set< Gate * > > & hal::hawkeye::RoundCandidate::get_input_ffs_of_gate | ( | ) | const |
Get a map from each combinational gate of the round function to all the input flip-flops it depends on.
Definition at line 392 of file round_candidate.cpp.
Referenced by hal::hawkeye::locate_sboxes(), and hal::PYBIND11_PLUGIN().
| const std::set< Gate * > & hal::hawkeye::RoundCandidate::get_input_reg | ( | ) | const |
Get the candidate's input register.
Definition at line 357 of file round_candidate.cpp.
Referenced by hal::hawkeye::identify_sbox(), hal::hawkeye::locate_sboxes(), and hal::PYBIND11_PLUGIN().
| const std::map< u32, std::set< Gate * > > & hal::hawkeye::RoundCandidate::get_longest_distance_to_gate | ( | ) | const |
Get a map from an integer distance to all gates that are reachable within at most that distance when starting at any input flip-flop.
Definition at line 397 of file round_candidate.cpp.
Referenced by hal::hawkeye::locate_sboxes(), and hal::PYBIND11_PLUGIN().
| Netlist * hal::hawkeye::RoundCandidate::get_netlist | ( | ) | const |
Get the netlist of the round candidate. The netlist is a partial copy of the netlist of the register candidate.
Definition at line 342 of file round_candidate.cpp.
Referenced by hal::hawkeye::identify_sbox(), hal::hawkeye::locate_sboxes(), and hal::PYBIND11_PLUGIN().
| const std::set< Net * > & hal::hawkeye::RoundCandidate::get_other_inputs | ( | ) | const |
Get the candidate's other inputs to the logic computing the next state.
Definition at line 382 of file round_candidate.cpp.
Referenced by hal::hawkeye::identify_sbox(), and hal::PYBIND11_PLUGIN().
| const std::set< Gate * > & hal::hawkeye::RoundCandidate::get_output_reg | ( | ) | const |
Get the candidate's output register.
Definition at line 362 of file round_candidate.cpp.
Referenced by hal::hawkeye::locate_sboxes(), and hal::PYBIND11_PLUGIN().
| u32 hal::hawkeye::RoundCandidate::get_size | ( | ) | const |
Get the size of the candidate, i.e., the width of its registers.
Definition at line 352 of file round_candidate.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| const std::set< Net * > & hal::hawkeye::RoundCandidate::get_state_inputs | ( | ) | const |
Get the candidate's state inputs to the logic computing the next state.
Definition at line 372 of file round_candidate.cpp.
Referenced by hal::hawkeye::identify_sbox(), and hal::PYBIND11_PLUGIN().
| const std::set< Gate * > & hal::hawkeye::RoundCandidate::get_state_logic | ( | ) | const |
Get the candidate's combinational logic computing the next state.
Definition at line 367 of file round_candidate.cpp.
Referenced by hal::PYBIND11_PLUGIN().
| const std::set< Net * > & hal::hawkeye::RoundCandidate::get_state_outputs | ( | ) | const |
Get the candidate's state outputs from the logic computing the next state.
Definition at line 387 of file round_candidate.cpp.
Referenced by hal::PYBIND11_PLUGIN().