Is No, Much Gooc! A cioser lock at the A5 GSM Eneryption Algorithm ( >From sci.crypt Fri Jun l 7 17:11~49 1994 From: na14@cl.cam.ac.uk (Ross Anderson) Date: 17 Jun 1994 13:43:28 GMT Newsgroups sci. crypt,alt.security,uk.telecom Subject: A5 (Was: HACKING DIGITAL PHONES) The GSM encryption algorithm, A5, is not much good. Its effec- tive key length is at most five bytes; and anyone with the time and energy to look for faster attacks can find source code for it at the bottom of this post. The politics of all this is bizarre. Readers may recall that there was a fuss last year about whether GSM phones could be expor- ted to the Middle East; the official line then was that A5 was too good for the likes of Saddam Hussein. However, a couple of weeks ago, they switched from saying that A5 was too strong to disclose, to saying that it was too weak to disclose! The government line now pleads that discussing it might harm export sales. Maybe all the fuss was just a ploy to get Saddam to buy A5 chips on the black market; but Occam's razor saggests that we are really seeing the results of the usual blundering, infighting and incompetence of bloated government departments. Indeed, rny spies inform me that there was a terrific row bet- ween the NATO signals agencies in the mid 1980's over whether GSM encryption should be strong or not. The Germans said it should be, as they shared a long border with the Evil Empire; \ ~ n1 \N Kabelsalat ,~` \ C~, ist gesund ÄrG\~O~/ W'~,. but the other countries didn't feel this way, and the algoritEm as now fielded is a French design. A5 is a stream cipher, and the keystream is the xor of three clock controlled registers. The clock control of each register is that register's own middle bit, xor'ed with a thresholrl function of the middle bits of all three registers (ie if two or more of the middle bits are 1, then invert each of these bits; otherwise just use them as they are). The register lengths are 19, 22 and 23, and all the feedback polynomials are sparse. Readers will note tbat there is a trivial 2A40 attack (guess the contents of registers 1 and 2, work out register 3 from the key- stream, and then step on to check whether the guess was right). 2A40 trial encryptions could take weeks on a workstation, but the low gate count of the algorithm means that a Xiliox chip can easily be programmed to do keysearch, and an A5 cracker might have a few dozen of these running at maybe 2 keys per micros- econd each. Of course, if all you want to do is break the Royal Family's keys for sale to News International, then software would do fine. It is thus clear tbat A5 should be free of all export controls, just like CDMF and the 40-bit versions of 1r.rb hci' licomie hri~u~hrn k~ina S'lzial`'er~ ~hera 1t. ~u z`Lhlell. ~ D! I ' 1 1~'l, I`li' Ah~L~h~lll'`f' urJ hl,~:l' |i cuer. jc ~lach Eir=~' Ak P'c~mier l;cinL Kbodigung. gutc Aller``ersorguag Writ~re Ird~ b'l ,..."l..;.A~/.,,.~ ~pl, lFrir~n®~l~. ~a ~.~4 ~ '1~.n t ~ `~.lvI7v'~ I {.7 `'Ie~r bri ~L ~ .,rl(, .I~.~..IdA. ~L~ Hr~ed~ vwr~ úunuuuunn-uu-uuu ~ie~Qten~c~leuber#~56 0ic~nten~c~leu~er#.~6 úuunu.----~--.