PandA-2024.02
Macros | Typedefs | Functions | Variables
Keccak.c File Reference

Go to the source code of this file.

Macros

#define nrRounds   24
 
#define GET_KRC_VAL(index)   (KeccakRoundConstants[index])
 
#define nrLanes   25
 
#define index(x, y)   (((x)%5)+5*((y)%5))
 
#define ROL64(a, offset)   ((offset != 0) ? ((((UINT64)a) << offset) ^ (((UINT64)a) >> (64-offset))) : a)
 

Typedefs

typedef unsigned char UINT8
 
typedef unsigned long long int UINT64
 

Functions

void theta (UINT64 *A)
 
void rho (UINT64 *A)
 
void pi (UINT64 *A)
 
void chi (UINT64 *A)
 
void iota (UINT64 *A, unsigned int indexRound)
 
void kekka_coproc (UINT64 A[25])
 

Variables

static UINT64 KeccakRoundConstants [nrRounds]
 
static unsigned char KeccakRhoOffsets [nrLanes]
 

Macro Definition Documentation

◆ GET_KRC_VAL

#define GET_KRC_VAL (   index)    (KeccakRoundConstants[index])

Definition at line 16 of file Keccak.c.

Referenced by iota().

◆ index

#define index (   x,
 
)    (((x)%5)+5*((y)%5))

Definition at line 74 of file Keccak.c.

Referenced by _DEFUN(), level_constructor::add(), conn_binding::add_command_ports(), tree_manager::add_function(), BasicBlocksGraphConstructor::add_vertex(), RawGraph::AddVertex(), graphs_collection::AddVertex(), undirected_graphs_collection::AddVertex(), Bit_Value::backward_transfer(), reg_binding::bind(), fu_binding::bind(), bricks_initialization(), dom_info< GraphObj >::calc_dfs_tree(), InterfaceInfer::ChasePointerInterfaceRecurse(), check_printf(), chi(), CreateAddressTranslation::ComputeAddress(), meilp_solver::copy(), port_o::copy(), mux_connection_binding::create_connections(), tree_manipulation::create_gimple_call(), tree_manipulation::CreateCallExpr(), Loops::DetectLoops(), Schedule::EvaluateCondsMerging(), pragma_manager::ExtractClauses(), fu_binding::fill_array_ref_memory(), memory_allocation::finalize_memory_allocation(), Bit_Value::forward_transfer(), fu_binding::get(), get_dht(), AugmentedVector< T >::get_min(), AugmentedVector< T >::get_min_max(), BehavioralHelper::get_pointed_type(), Schedule::get_spec(), ModuleGeneratorManager::get_specialized_name(), AugmentedVector< T >::get_sum(), BehavioralHelper::GetElements(), AllocationInformation::GetNodeTypePrec(), pragma_manager::GetOmpPragmaType(), PhiOpNode::getSource(), LoadOpNode::getSource(), BehavioralHelper::GetVarFromSsa(), init_stack_free_list(), init_tree_free_list(), AllocationInformation::InitializeDSPDB(), OpOrderComputation::InternalExec(), BBOrderComputation::InternalExec(), TasteInterfaceGeneration::InternalExec(), SwitchFix::InternalExec(), BuildVirtualPhi::InternalExec(), rebuild_initialization::InternalExec(), MultipleEntryIfReduction::InternalExec(), cdfc_module_binding::InternalExec(), iota(), chordal_coloring_register::lex_compare_gt(), rebuild_initialization2::look_for_ROMs(), Bit_Value::lsb_to_zero(), main(), manage_brick_collision(), mmult(), AugmentedVector< T >::normalize(), std_var_pp_functor::operator()(), pointer_var_pp_functor::operator()(), isolated_var_pp_functor::operator()(), Bit_Value_opt::optimize(), pi(), Bit_Value::pointer_resizing(), xml_text_node::print(), AllocationInformation::print(), lut_transformation::ProcessBasicBlock(), register_obj::register_obj(), AugmentedVector< T >::remove(), RawGraph::RemoveVertex(), graphs_collection::RemoveVertex(), undirected_graphs_collection::RemoveVertex(), rho(), InterfaceInfer::setReadInterface(), InterfaceInfer::setWriteInterface(), fu_binding::specialise_fu(), structural_type_descriptor::structural_type_descriptor(), theta(), Vectorize::Transform(), virtual_phi_nodes_split::virtual_split_phi(), fu_binding::write_init(), and verilog_writer::write_vector_port_binding().

◆ nrLanes

#define nrLanes   25

Definition at line 45 of file Keccak.c.

◆ nrRounds

#define nrRounds   24

Definition at line 14 of file Keccak.c.

Referenced by keccak_coproc(), and kekka_coproc().

◆ ROL64

#define ROL64 (   a,
  offset 
)    ((offset != 0) ? ((((UINT64)a) << offset) ^ (((UINT64)a) >> (64-offset))) : a)

Definition at line 75 of file Keccak.c.

Referenced by rho(), and theta().

Typedef Documentation

◆ UINT64

typedef unsigned long long int UINT64

Definition at line 13 of file Keccak.c.

◆ UINT8

typedef unsigned char UINT8

Definition at line 12 of file Keccak.c.

Function Documentation

◆ chi()

void chi ( UINT64 A)

Definition at line 113 of file Keccak.c.

References C, index, and x.

Referenced by keccak_coproc(), and kekka_coproc().

Here is the caller graph for this function:

◆ iota()

void iota ( UINT64 A,
unsigned int  indexRound 
)

Definition at line 126 of file Keccak.c.

References GET_KRC_VAL, and index.

Referenced by keccak_coproc(), and kekka_coproc().

Here is the caller graph for this function:

◆ kekka_coproc()

void kekka_coproc ( UINT64  A[25])

Definition at line 132 of file Keccak.c.

References chi(), iota(), nrRounds, pi(), rho(), and theta().

Here is the call graph for this function:

◆ pi()

void pi ( UINT64 A)

Definition at line 102 of file Keccak.c.

References index, and x.

Referenced by mux_connection_binding::create_connections(), keccak_coproc(), kekka_coproc(), port_o::resize_if_busport(), and port_o::resize_std_port().

Here is the caller graph for this function:

◆ rho()

void rho ( UINT64 A)

Definition at line 94 of file Keccak.c.

References index, KeccakRhoOffsets, ROL64, and x.

Referenced by keccak_coproc(), and kekka_coproc().

Here is the caller graph for this function:

◆ theta()

void theta ( UINT64 A)

Definition at line 77 of file Keccak.c.

References C, D, index, ROL64, and x.

Referenced by keccak_coproc(), and kekka_coproc().

Here is the caller graph for this function:

Variable Documentation

◆ KeccakRhoOffsets

unsigned char KeccakRhoOffsets[nrLanes]
static
Initial value:
= {
0,
1,
62,
28,
27,
36,
44,
6,
55,
20,
3,
10,
43,
25,
39,
41,
45,
15,
21,
8,
18,
2,
61,
56,
14
}

Definition at line 46 of file Keccak.c.

Referenced by rho().

◆ KeccakRoundConstants

UINT64 KeccakRoundConstants[nrRounds]
static
Initial value:
= {
0x0000000000000001ULL,
0x0000000000008082ULL,
0x800000000000808aULL,
0x8000000080008000ULL,
0x000000000000808bULL,
0x0000000080000001ULL,
0x8000000080008081ULL,
0x8000000000008009ULL,
0x000000000000008aULL,
0x0000000000000088ULL,
0x0000000080008009ULL,
0x000000008000000aULL,
0x000000008000808bULL,
0x800000000000008bULL,
0x8000000000008089ULL,
0x8000000000008003ULL,
0x8000000000008002ULL,
0x8000000000000080ULL,
0x000000000000800aULL,
0x800000008000000aULL,
0x8000000080008081ULL,
0x8000000000008080ULL,
0x0000000080000001ULL,
0x8000000080008008ULL
}

Definition at line 18 of file Keccak.c.


Generated on Mon Feb 12 2024 13:02:58 for PandA-2024.02 by doxygen 1.8.13