This repository consists of the codes or materials that are used in the experiment of the paper titled Random Differential Fault Attacks on the Lightweight Authenticated Encryption Stream Cipher Grain-128AEAD
The experiments were done using SageMath.
-
ANF generation and diff with respect to S
andANF generation and diff with respect to B
- Generates the
Algebraic Normal Form (ANF)
of Grain-128AEAD cipher and determine the linear terms in the equations by differentiating the equations with respect to LFSR and NFSR registers
- Generates the
-
Verification of attack (Table 2)
- This code verifies whether the injected fault at one keystream manages to recover the corresponding register.
-
Numerically_Find_Fault_locations_S_for_unknowns_in_LFSR
- Numerically verify fault injections at S[i] to recovr unknowns in LFSR.
- If any unknowns can be recovered then the output will indicate the corresponding keystream indices, target register, and recovered unknown.
-
Verification_recovery_remaining_bits_in_B_using_Grobner_basis
- This code solves the equations generated to recover the remaining bits.
-
Obtaining Output Indices where the Output Differential = 1
- This code simulates the Grain-128AEAD cipher and compute the output differential and obtains the list of output indices where the results = 1
-
Getting Unique Output Indices for 16 LFSR Bytes
- This code gets the output indices of each byte of registers and obtain the unique output indices (remove duplicated)
-
Get Number of Times of Output Differential = 1 for each Output Indices of Each LFSR Byte
- This code obtains the number of times of output differential = 1 for single bit of output index for each LFSR Byte
-
Get Number of Times for Output Differential = 1 for Pairs of Output Indices of Each LFSR Byte
- This code obtains the number of times of output differential = 1 for pairs of output index for each LFSR Byte
-
Eq_list_diff_*
applies to files with this header- These codes verifies the results in Table 5 in the paper. The results can be found in
results
folder.
- These codes verifies the results in Table 5 in the paper. The results can be found in
-
Average no. of required faults S_byte (moderate control)
- This code calculates the average numbers of faults to recover the registers in each LFSR bytes in moderate control
-
No Control
- This code consists of the implementation of the
DFA
in no control model
- This code consists of the implementation of the
-
Full_Array_of_Output_Differential=1
- This contains an 2D array that has the full data for number of times for output indices till 200 = 1 for each LFSR register
The results and excel files are stored in results
folder. The folder consists of a couple of vb
files that are used to highlight the data obtained for better visualisation of the data.