How does a phone use a network abroad?
Abroad, a phone can use a local network that has an agreement with its home operator. The local network finds that operator and asks for help checking the subscriber’s identity.
The check is like answering a fresh question each time. The secure chip and the home network calculate using their stored secret. The local network checks the answer without receiving that long-term secret.
After the check, the networks record where to reach the phone. Internet data may travel through the home network or leave through a local gateway. This film uses a simplified flow mainly based on 4G.
Follow one identity and change one thing at a time
- Choose a network without a roaming agreement. Is a strong signal enough to register?
- Make the identity check fail. Where does the connection process stop?
- Compare home-routed and local-exit data. Follow the same request along each route.
One layer deeper
Further controls and numerical checks
- Select: choose “Manual C”. C has the strongest signal but no agreement with your home operator, so registration is rejected and only emergency calls remain. Then switch the plan to “Roaming not enabled”: this time the local network is willing, but your home network refuses.
- Verify: choose “K off by 1 bit” and drag which bit to flip. The SIM’s check of AUTN fails at once, and even a forced response differs in about half of its 64 bits. “RAND altered” fails the same way. “Old vector replayed” carries a genuine AUTN with a used sequence number, so the SIM refuses to answer and sends a resynchronisation token, AUTS, instead.
- Data: keep the same request and compare the round trip and the address a website sees under home routing and local breakout. Switch to a website at home and the difference almost disappears. Drag the distance between the countries to see which leg grows.
- Call: switch from family at home to a local friend standing next to you. The call still goes home and back.
The numbers are examples: 001-01 is the code 3GPP uses for test networks, while 002 and the three local operators are invented.
Want to check the technical details?
Abroad, a phone uses a local network and asks its home operator to help verify its identity. It is a little like checking an existing membership at a different branch, except that real verification uses cryptographic calculations. This example mainly follows 4G registration, separating network selection, authentication, data and incoming calls. Abroad, every radio mast and core-network node that serves you belongs to a local operator, and that operator never learns your secret key. What it can do is work out which operator you belong to and ask your home network.
The clue is the IMSI stored on your SIM. Under ITU-T E.212 it has at most 15 digits: a three-digit mobile country code (MCC), a two- or three-digit mobile network code (MNC), and your subscriber number inside that operator. From the MCC and MNC, the visited network builds the address of your home core network (the domain format is set by 3GPP TS 23.003) and sends its request over IPX, the private exchange that operators use to reach one another (GSMA IR.34). Only partners with a roaming agreement get through. Even the choice of network follows your home operator: the phone consults the partner list on the SIM before it considers signal strength (TS 23.122).
Authentication itself is a challenge and response. Your SIM and your home network share a 128-bit key, K. It is never transmitted, and the visited network never receives it. Home picks a random number, RAND, uses K to compute the expected response XRES and a network check code AUTN, and hands this “authentication vector” to the visited network. Only RAND and AUTN go to the phone. The SIM first uses K to verify AUTN, which shows that the request truly comes from home and is not an old message replayed, then computes its response, RES. If RES equals XRES, the visited network lets you in (TS 33.102, TS 33.401). This is symmetric: both ends hold the same secret. There is no public key and no signature here, unlike public-key cryptography.
Once you’re authenticated, the visited network sends a location update. Your home network writes into your subscriber record which network now serves you, and returns your subscription profile (TS 29.272). From then on, calls to your number reach home first and are forwarded using that record, and your data either tunnels back to a gateway at home or leaves through a local gateway (TS 23.401, GSMA IR.88).
What exactly does the SIM compute?
This page runs MILENAGE, the 3GPP example algorithm set (TS 35.206). Built around AES-128, it combines K, an operator constant OPc, RAND, a sequence number SQN and a management field AMF into five functions:
f3 and f4 produce the cipher and integrity keys CK and IK. Home sends AUTN = (SQN ⊕ AK) ‖ AMF ‖ MAC; masking the sequence number with AK stops onlookers from tracking you by it. The SIM recovers SQN with f5 and recomputes MAC. Only a party holding the same K can produce a valid MAC, so this step proves that the network is genuine. The SIM then checks that SQN is newer than the last one it accepted, which rules out replays.
K, OP, RAND, SQN and AMF on screen are conformance test set 1 from TS 35.208. The site’s unit tests reproduce every output of test sets 1 and 2. Operators may use other algorithms, such as TUAK, and real subscriber keys are never published.
In 4G, CK and IK are also fed with the visited network’s identity into HMAC-SHA-256 to derive K_ASME (TS 33.401, Annex A). The keys that follow are therefore bound to that one network; a different operator would get a different key.
What changes in 5G?
5G can protect the permanent identity, SUPI (commonly an IMSI), using the home network’s public key to produce a SUCI, while retaining routing information needed to contact home. Concealment depends on the configured scheme: the standard also permits a null scheme that provides no identity concealment. A 5G connection alone does not guarantee it (TS 33.501). 5G AKA keeps the same challenge and response, but the home network’s AUSF also confirms the result, giving home more direct evidence that you are really present. Subscriber data sits in the UDM, the 5G counterpart of the 4G HSS.
How are the round-trip times estimated?
The model counts propagation only: light in fibre covers about 204 km per millisecond (refractive index about 1.47), cable routes are taken as 1.4 times the straight-line distance, radio access plus the visited core adds 25 ms, and each gateway or exchange adds 2 ms. With the countries 8000 km apart, home routing crosses the sea twice to reach a local website, about 250 ms; local breakout takes about 30 ms. These are model estimates. They exclude congestion, queuing and server time, and they do not describe any real operator’s network.
In practice, 4G data roaming has mostly been home-routed: it lets the home operator charge and apply your plan, and services restricted to home addresses keep working. Local breakout needs an extra arrangement between the operators.
Why does a call go home first?
Your number belongs to your home operator’s numbering range, so whoever dials it, the call is delivered to your home network’s gateway exchange. Home looks up your location record, asks the serving network for a temporary roaming number (MSRN), and connects the call to it; the visited network then pages your phone (TS 23.018). That is why a local friend’s call can leave the country and come back, unless both networks support optimal routing. The film shows a classic circuit-switched call, which needs the phone on 2G/3G, or on 4G with a combined EPS/IMSI attach so it can fall back to 2G/3G for the call (CSFB). VoLTE handles calls through IMS and differs in detail, but it also passes through your home network. Afterwards the visited operator reports what you used to your home operator for settlement; you only deal with your home operator.