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

Specification of A5/2 keystream generation. More...

#include "const_A52.h"

Go to the source code of this file.

Functions

void keysetup (const byte Kc[SECRETKEY_BITS], const byte frameId[FRAMEID_BITS])
 Initializes the whole system according to the keysetup procedure.
void getKeystream (byte keystream[], const int len)
 Generates the desired amount of keystream.
int keygen_test ()
 Autotests the key generation on a verified set.

Detailed Description

Specification of A5/2 keystream generation.

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

Function Documentation

void getKeystream ( byte  keystream[],
const int  len 
)

Generates the desired amount of keystream.

Parameters:
[out]keystreamKeystream to be generated
[in]lendesired amount of keystream bits

References keygen_clockingUnit(), and keygen_getOutBit().

Referenced by attack_test(), keygen_test(), main(), and matrices_generation_test().

int keygen_test ( )

Autotests the key generation on a verified set.

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

References DEBUG, FRAMEID_BITS, getKeystream(), keysetup(), and SECRETKEY_BITS.

Referenced by main().

void keysetup ( const byte  Kc[SECRETKEY_BITS],
const byte  frameId[FRAMEID_BITS] 
)

Initializes the whole system according to the keysetup procedure.

Parameters:
[in]KcSecret Key
[in]frameIdFrame Id

References FRAMEID_BITS, keygen_clockingUnit(), R1, R1_BITS, R1_INITIAL_CONST_POS, R2, R2_BITS, R2_INITIAL_CONST_POS, R3, R3_BITS, R3_INITIAL_CONST_POS, R4, R4_BITS, R4_INITIAL_CONST_POS, and SECRETKEY_BITS.

Referenced by attack_test(), keygen_test(), main(), and matrices_generation_test().