Stream ciphers

A5-1

The GSM voice-encryption stream ciphers A5/1 to A5/4, two of them broken and two legacy

broken Root API only Copyleft feature
Broken tier.

Practical attacks exist. Present for compatibility and research only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About A5-1

A5-1 is one of 4 A5 (GSM stream ciphers) variants in the NextSSL registry, a stream cipher. It uses an 8-byte (64-bit) key and a 4-byte nonce. Its registry entry cites GSM 03.20. NextSSL lists it in the broken tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

A5 is the family of stream ciphers used to encrypt GSM and early 3G voice traffic, listed here as A5/1, A5/2, A5/3 and A5/4. A5/1 and A5/2 are broken, and A5/3 and A5/4 are legacy. NextSSL carries all four variants with 8-byte or 16-byte keys and 4-byte frame nonces.

A5 is the family of stream ciphers specified for GSM mobile telephony, where it encrypts each radio frame under a session key. A5/1 was the main GSM cipher, and A5/2 was a deliberately weakened export variant. Both are based on irregularly clocked linear feedback shift registers, and both have been broken by published attacks on the keystream.

NextSSL carries four variants. A5/1 and A5/2 have 8-byte keys and 4-byte nonces and are marked broken. A5/3 and A5/4 are specified in 3GPP TS 55.216 and the GSM 03.20 documents, have 8-byte and 16-byte keys respectively and 4-byte nonces, and are marked legacy. A5/3 is the KASUMI-based cipher used in 3G, and KASUMI itself has published related-key attacks.

The family is kept for historical comparison and for interoperability with legacy networks. It should not protect new communication, and any system still running A5 should be treated as exposed.

History

1987–2009
  1. A5/1 designed for GSM

  2. A5/1 design leaks

  3. A5/1 and A5/2 fully reverse engineered

  4. A5/3 (KASUMI) specified

  5. Rainbow-table attacks on A5/1 published

How it works

  1. The session key and a 4-byte frame number are loaded into the cipher's state.
  2. The cipher clocks its registers or block cipher for each frame and generates a keystream for that frame.
  3. The keystream is XORed with the plaintext for the frame, and the receiver regenerates it from the same key and frame number.

Security notes

A5/1 and A5/2 are broken by published ciphertext-only and known-plaintext attacks. A5/3 and A5/4 are legacy, and their KASUMI basis has related-key attacks in the literature. Do not use any A5 variant for new systems.

Typical uses

Analysis of legacy GSM and 3G securityInteroperability testing for legacy network equipmentTeaching examples of broken stream ciphers

Sizes

FieldBytesMeaning
key8Secret key
nonce4Nonce / IV

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'broken' is reachable from the root API only
ct = root.call("stream_apply", "a5-1", None, key, nonce, b"secret")[0]   # same call decrypts

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Other A5 (GSM stream ciphers) variants

3

Similar names

Looking for something else?

Frequently asked questions

What is A5-1?

A5-1 is a stream cipher in the A5 (GSM stream ciphers) family. A5 is the family of stream ciphers used to encrypt GSM and early 3G voice traffic, listed here as A5/1, A5/2, A5/3 and A5/4.

What are the A5-1 sizes?

In NextSSL, A5-1 uses: key 8 bytes, nonce 4 bytes.

Which standards define A5-1?

A5-1 is referenced by GSM 03.20.

Is A5-1 safe to use?

A5-1 is in the broken tier. Practical attacks exist. Present for compatibility and research only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).

What other A5 (GSM stream ciphers) variants are there?

NextSSL also registers a5-2, a5-3, a5-4 in the A5 (GSM stream ciphers) family.