770 likes | 2.1k Views
A5 / 1. GSM S tream C ipher A lgorithm. Syed Safi Uddin Qadri BETL/F07/0112. Presented To Sir Adnan Ahmed Siddiqui. A5/1 Encryption Algorithm. A5/1 A stream cipher providing over-the air communication privacy in GSM A5/1 is used in US and Europe, while A5/2 in other countries.
E N D
A5 / 1 GSM Stream Cipher Algorithm Syed Safi Uddin Qadri BETL/F07/0112 Presented To Sir Adnan Ahmed Siddiqui
A5/1 Encryption Algorithm • A5/1 • A stream cipher providing over-the air communication privacy in GSM • A5/1 is used in US and Europe, while A5/2 in other countries. • Implemented very efficiently on hardware • Variants • A5/1 – the strong version • A5/2 – the weak version • A5/3 • GSM Association Security Group and 3GPP design • Based on Kasumi algorithm used in 3G mobile systems
BTS BTS BTS A5 Encryption A5/1 Encryption Mobile Stations Base Station Subsystem Network Management Subscriber and terminal equipment databases OMC Exchange System VLR MSC BSC HLR AUC EIR
BTS Mobile Station Fn (22 bit) Kc (64 bit) Fn (22 bit) Kc (64 bit) A5 A5 114 bit 114 bit Data (114 bit) Ciphertext (114 bit) XOR XOR Data (114 bit) • A5/1 Logical Implementation Real A5 output is 228 bit for both directions
A5/1 Key Generation • The same key Kc is used to encrypt and decrypt the conversation • How is the Kc generated? • Ki – root encryption key • Unique for each subscriber • A3 – authenticate the userto the mobile operator • A8 – Generate Kc
LFSR Structure output new value Feedback Function : XOR • A5/1 based on Linear Feedback Shift Registers: LFSRs • Purpose - to produce pseudo random bit sequence • Consists of two parts : • shift register – bit sequence • feedback function • Tap Sequence : • bits that are input to the feedback function
LFSR Example • Example : • x11+x5+x3+1 corresponds to LFSR of length 12
A5/1 LFSRs Consists of 3 LFSRs of different lengths • 19 bits • x18 + x17 + x16 + x13 + 1 • clock bit 8 • tapped bits: 13, 16, 17, 18 • 22 bits • x21 + x20 + 1 • clock bit 10 • tapped bits 20, 21 • 23 bits • x22 + x21 + x20+ x7 + 1 • clock bit 10 • tapped bits 7, 20, 21, 22
A5/1 Description • Clocking • Clocking mechanism is based on majority function • If the clocking bit agrees with the majority bit • Probability of each register to be clocked is 3/4
A5/1 Description • Algorithm (initial state) • Zero all registers • For each bit of the Kc: Rj[0]=Rj[0]+Kc[i], j=(1,2,3) • Clock the registers ignoring the regular clocking mechanism • For each bit of the Fn: Rj[0]=Rj[0]+Fn[i], j=(1,2,3) • Clock the registers ignoring the regular clocking mechanism • Clock the registers with thenormal clocking mechanismfor 100 rounds and discardthe output
A5/1 Description 18 17 16 21 22 20 0 R1 C1 Clocking Mechanism 21 20 0 R2 C2 0 R3 C3
A5/1 Description • Algorithm (cipher text generation) • Clock the cipher 114 times using the normal stop/go fashion • Produce 114 bits (keystream) by XOR-ing the MSBs of the three registers • This keystream will be used to encrypt the communication between operator and mobile station • XOR the keystream with the initial message to produce the ciphertext • Do the same for the conversation between mobile station and operator
A5/1 Working Example 18 17 16 1 0 1 21 22 20 0 0 1 0 R1 C1 Clocking Mechanism 21 20 0 1 1 1 R2 C2 0 0 R3 C3