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

Specification of A52 attack. More...

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

Go to the source code of this file.

Data Structures

struct  cipherTextArgs
 Set of arguments to be provided to perform the attack. More...
struct  threadArgs
 Set of arguments related to a thread in a multithreaded attack context. More...

Defines

#define SYNDROME_EMPTY_EQUATIONS   (NEEDED_ENCRYPTED_MESSAGES*SYNDROME_LENGTH - REGS_TOTAL_VARS)
 Number of empty equations remaining after proceeding to Gauss Elimination in (HS × ? = Syndrome)

Functions

void freeRAM ()
 Frees the RAM used to store resolution matrices.
int initializeRAM (const char *filename)
 Initializes the RAM storage of resolution matrices from a given binary file.
int attack (cipherTextArgs *ctArgs, byte secretKey[SECRETKEY_BITS])
 Performs the attack on a given problem, then writes back the solution.
int attack_test ()
 Autotests the attack on a verified set of problem/solution.

Detailed Description

Specification of A52 attack.

Author:
Nicolas Paglieri & Olivier Benjamin
Version:
File Revision #10
Date:
01/12/2011

Function Documentation

int attack ( cipherTextArgs ctArgs,
byte  secretKey[SECRETKEY_BITS] 
)

Performs the attack on a given problem, then writes back the solution.

Parameters:
[in]ctArgsProblem to be solved
[out]secretKeyDeciphered secret key if the attack succeeded, all zeros otherwise
Returns:
0 if the attack is successfull, non-zero otherwise

References ALLMATRICES, attack_launchAttack(), threadArgs::ctArgs, DEBUG, DUMP_CHAR_VECTOR, threadArgs::highindex, threadArgs::keyFound, threadArgs::lowindex, PROCESSING_THREADS, and THREAD_CHUNKSIZE.

Referenced by attack_test(), and main().

int attack_test ( )
int initializeRAM ( const char *  filename)

Initializes the RAM storage of resolution matrices from a given binary file.

Parameters:
[in]filenamePath of the file containing resolution matrices
Returns:
0 if the initialization is successfull, non-zero otherwise

References ALLMATRICES, BUFFER_SIZE, DEBUG, freeRAM(), NEEDED_ENCRYPTED_MESSAGES, RESOLUTION_MATRIX_INT_WIDTH, SYNDROME_LENGTH, and TOTAL_MATRICES.

Referenced by attack_test(), and main().