A52HackTool 1.3.0
Turnkey & easy to use tool for cracking the GSM A5/2 cipher
Defines | Functions
matrices_generation.h File Reference

Specification of first attack phase: matrices dictionary generation. More...

#include "const_A52.h"
#include "const_code.h"

Go to the source code of this file.

Defines

#define NEEDED_ENCRYPTED_MESSAGES   3
 Number of ciphered messages needed to proceed to decryption.
#define EQN_SYSTEM_SIZE   (NEEDED_ENCRYPTED_MESSAGES*CODEWORD_LENGTH)
 Number of equations to generate.
#define BUFFER_SIZE   (NEEDED_ENCRYPTED_MESSAGES*SYNDROME_LENGTH*REGS_TOTAL_VARS/8)
 Buffer size corresponding to the generated equations.

Functions

void getR4fromIndex (const int index, byte R4[R4_BITS])
 Returns the value of LFSR R4 corresponding to a particular index in [0..TOTAL_MATRICES-1].
int exportAllMatrices (const char *filename)
 Exports all Resolution Matrices into the specified file.
int matrices_generation_test ()
 Autotests the matrices generation on a verified set.

Detailed Description

Specification of first attack phase: matrices dictionary generation.

Author:
Nicolas Paglieri & Olivier Benjamin
Version:
File Revision #13
Date:
24/06/2011

Function Documentation

int exportAllMatrices ( const char *  filename)

Exports all Resolution Matrices into the specified file.

Parameters:
[in]filenamePath of the file to export to
Returns:
0 if the export is successfull, non-zero otherwise

References BUFFER_SIZE, DEBUG, GenerationArgs::highindex, GenerationArgs::lowindex, matrices_generation_launchExport(), PROCESSING_THREADS, and THREAD_CHUNKSIZE.

Referenced by main().

void getR4fromIndex ( const int  index,
byte  R4[R4_BITS] 
)

Returns the value of LFSR R4 corresponding to a particular index in [0..TOTAL_MATRICES-1].

Parameters:
[in]indexConsidered index
[in]R4Corresponding value of R4

References R4, and R4_INITIAL_CONST_POS.

Referenced by attack_decipherSecretKey().

int matrices_generation_test ( )

Autotests the matrices generation on a verified set.

Returns:
0 if the test is successfull, non-zero otherwise

References DEBUG, FRAMEID_BITS, getKeystream(), keysetup(), matrices_generation_processKeystreamEqns(), matrices_generation_solveEquation(), R1, R1_BITS, R2, R2_BITS, R3, R3_BITS, R4_BITS, REGS_TOTAL_VARS, and SECRETKEY_BITS.

Referenced by main().