blob: 39ccac8f822f8d0534a9ad7a182c65376a9e0e13 [file] [log] [blame]
Harald Welte9d63d6f2020-04-11 10:18:34 +02001= Specification for IMSI Pseudonymization on the Radio Interface for 2G/3G/4G
Oliver Smith5c95bc92020-04-03 14:03:24 +02002
3== Introduction
4
Oliver Smithbf33c752020-04-06 15:46:29 +02005=== Protecting the IMSI on the Radio Interface is Desirable
6
Oliver Smith5c95bc92020-04-03 14:03:24 +02007A long-standing issue in the 3GPP specifications is, that mobile phones and
8other mobile equipment (ME) have to send the International Mobile Subscriber
Harald Welte4dc664d2020-04-11 10:18:57 +02009Identity (IMSI) unencrypted over the air. Each IMSI is a unique identifier for
Oliver Smitha2814642020-04-14 14:31:29 +020010the subscriber. Therefore most people can be uniquely identified by recording
11the IMSI that their ME is sending. The 3GPP specifications provide means for
Harald Welte4dc664d2020-04-11 10:18:57 +020012implementations to send the IMSI less often by using the Temporary Mobile
13Subscriber Identity (TMSI) where possible.
Oliver Smith5c95bc92020-04-03 14:03:24 +020014
15But this is not enough. So-called IMSI catchers were invented and are used to
16not only record IMSIs when they have to be sent. But also to force ME to send
Harald Welte9d63d6f2020-04-11 10:18:34 +020017their IMSI by imitating a Base Transceiver Station (BTS). IMSI catchers have
Oliver Smith5c95bc92020-04-03 14:03:24 +020018become small and affordable, even criminals actors without much budget can use
19them to track anybody with a mobile phone.
20
Oliver Smithefe5c982020-04-15 10:29:21 +0200215G addresses this problem with the Subscriber Concealed Identifier (SUCI),
22which uses public-key cryptography to ensure that the permanent subscriber
23identity can only be read by the home network (3GPP TS 33.501, Section 6.12.2).
24A comparable, but different approach to conceal the IMSI for 2G, 3G and 4G is
25provided in this specification.
26
Oliver Smithbf33c752020-04-06 15:46:29 +020027=== Summary of Proposed Solution
28
Oliver Smith5c95bc92020-04-03 14:03:24 +020029The solution presented in this document is to periodically change the IMSI of
30the ME to a new pseudonymous IMSI allocated by the Home Location Register (HLR)
Oliver Smithbf33c752020-04-06 15:46:29 +020031or Home Subscriber Service (HSS). The next pseudonymous IMSI is sent to the SIM
32via Short Message Service (SMS), then a SIM applet overwrites the IMSI of the
33SIM with the new value. The only component that needs to be changed in the
Oliver Smith763232b2020-04-15 11:14:11 +020034network besides the SIM/USIM is the HLR/HSS, therefore it should be possible
35even for a Mobile Virtual Network Operator (MVNO) to deploy this privacy
Oliver Smith5c95bc92020-04-03 14:03:24 +020036enhancement.
37
Oliver Smithbf33c752020-04-06 15:46:29 +020038=== Summary of Existing Location Updating Procedures in RAN and CN
Oliver Smith5c95bc92020-04-03 14:03:24 +020039
Oliver Smith6f9f2182020-04-06 14:29:34 +020040The subscriber's SIM is provisioned with the IMSI and cryptographic keys of a
41subscriber, after the subscriber was added with the same data to the HLR/HSS.
42In the Remote Access Network (RAN), the IMSI is sent over the air interface and
43then transmitted to the Core Network (CN), where it is validated by the
44HLR/HSS. The involved components vary by the generation of the network and
45whether the SIM is attempting a Circuit Switched (CS) or Packet Switched (PS)
46connection, but the principle is the same. This document uses 2G CS Location
47Updating for reference, as in <<figure-imsi-regular>>.
Oliver Smith7afd7012020-04-06 11:59:59 +020048
49The IMSI is transmitted in the Location Updating Request from ME. The VLR
50needs an authentication challenge specific to the secret keys on the SIM to
51authenticate the SIM, and looks the authentication challenges up by the IMSI.
52If the VLR does not have any more authentication challenges for the IMSI (as it
53happens when the VLR sees the IMSI for the first time), the VLR requests new
54authentication challenges from the HLR. Then the HLR verifies that the IMSI is
55known and, if it is unknown, sends back an error that will terminate the
56Location Updating procedure.
57
58After the VLR found the authentication challenge, it authenticates the SIM, and
59performs a Classmark Enquiry and Physical Channel Reconfiguration. Then the VLR
60has the required information to finish the Location Updating, and continues
Oliver Smith206a0fa2020-04-07 14:30:07 +020061with Process Update_Location_HLR (3GPP TS 29.002). Afterwards, the VLR assigns
62a new TMSI with the Location Updating Accept, which is acknowledged by the TMSI
63Reallocation Complete. In following Location Updates with the same MSC, the ME
64sends the TMSI instead of the IMSI in the Location Updating Request.
Oliver Smith7afd7012020-04-06 11:59:59 +020065
66[[figure-imsi-regular]]
67.Location Updating in 2G CS with IMSI
68["mscgen"]
69----
70msc {
71 hscale="1.75";
72 ME [label="ME"], BTS [label="BTS"], BSC [label="BSC"], MSC [label="MSC/VLR"],
73 HLR [label="HLR"];
74
75 // BTS <=> BSC: RSL
76 // BSC <=> MSC: BSSAP, RNSAP
77 // MSC <=> HLR: MAP (process Update_Location_HLR, 3GPP TS 29.002)
78
79 ME => BTS [label="Location Updating Request"];
80 BTS => BSC [label="Location Updating Request"];
81 BSC => MSC [label="Location Updating Request"];
82
Oliver Smith7e33ef52020-04-07 15:05:11 +020083 --- [label="If necessary: VLR requests new authentication challenges for this IMSI"];
Oliver Smith7afd7012020-04-06 11:59:59 +020084 MSC => HLR [label="Send Auth Info Request"];
85 MSC <= HLR [label="Send Auth Info Result"];
86 ---;
87
88 BSC <= MSC [label="Authentication Request"];
89 BTS <= BSC [label="Authentication Request"];
90 ME <= BTS [label="Authentication Request"];
91 ME => BTS [label="Authentication Response"];
92 BTS => BSC [label="Authentication Response"];
93 BSC => MSC [label="Authentication Response"];
94 BSC <= MSC [label="Classmark Enquiry"];
95 BTS <= BSC [label="Classmark Enquiry"];
96 ME <= BTS [label="Classmark Enquiry"];
97 ME => BTS [label="Classmark Change"];
98 BTS => BSC [label="Classmark Change"];
99 BSC => MSC [label="Classmark Update"];
100 BSC <= MSC [label="Physical Channel Reconfiguration"];
101 BTS <= BSC [label="Ciphering Mode Command"];
102 ME <= BTS [label="Ciphering Mode Command"];
Oliver Smith8c81b552020-04-07 08:44:56 +0200103 ME => BTS [label="Ciphering Mode Complete"];
Oliver Smith7afd7012020-04-06 11:59:59 +0200104 BTS => BSC [label="Ciphering Mode Complete"];
105 BSC => MSC [label="Ciphering Mode Complete"];
106
Oliver Smith206a0fa2020-04-07 14:30:07 +0200107 --- [label="Process Update_Location_HLR (3GPP TS 29.002)"];
Oliver Smith7afd7012020-04-06 11:59:59 +0200108 MSC => HLR [label="Update Location Request"];
109 MSC <= HLR [label="Insert Subscriber Data Request"];
110 MSC => HLR [label="Insert Subscriber Data Result"];
111 MSC <= HLR [label="Update Location Result"];
Oliver Smith206a0fa2020-04-07 14:30:07 +0200112 ---;
Oliver Smith7afd7012020-04-06 11:59:59 +0200113
114 BSC <= MSC [label="Location Updating Accept"];
115 BTS <= BSC [label="Location Updating Accept"];
116 ME <= BTS [label="Location Updating Accept"];
117 ME => BTS [label="TMSI Reallocation Complete"];
118 BTS => BSC [label="TMSI Reallocation Complete"];
Oliver Smith2c8a19c2020-04-06 14:04:13 +0200119 BSC => MSC [label="TMSI Reallocation Complete"];
Oliver Smith7afd7012020-04-06 11:59:59 +0200120}
121----
122
Oliver Smithbf33c752020-04-06 15:46:29 +0200123<<<
Oliver Smith2c8a19c2020-04-06 14:04:13 +0200124== Required Changes
Oliver Smith6f9f2182020-04-06 14:29:34 +0200125
Oliver Smith64d154c2020-04-08 08:36:18 +0200126[[hlr-imsi-pseudo-storage]]
Oliver Smithbf33c752020-04-06 15:46:29 +0200127=== Pseudonymous IMSI Storage in the HLR
128
129The HLR must store up to two pseudonymous IMSIs (imsi_pseudo) and their related
130counters (imsi_pseudo_i) per subscriber. Each subscriber initially has one
131pseudonymous IMSI allocated. A subscriber has two valid pseudonymous IMSIs
132only during the transition phase from the old pseudonymous IMSI to the new one.
133The amount of available IMSIs must be higher than the amount of subscribers
134registered with the HLR. If the amount of available IMSIs is too short, the HLR
135can delay assigning new pseudonymous IMSIs until new IMSIs are available again.
136
137.Examples for additional subscriber data in HLR
Oliver Smith69e3fa62020-04-09 14:54:49 +0200138[options="header"]
Oliver Smithbf33c752020-04-06 15:46:29 +0200139|===
140| Subscriber ID | imsi_pseudo | imsi_pseudo_i
141// example IMSIs taken from Wikipedia
142| 123
143| 310150123456789
144| 1
145
146| 234
147| 502130123456789
148| 1
149
150| 234
151| 460001357924680
152| 2
153|===
154
155==== imsi_pseudo
156
157The value for imsi_pseudo is a random choice from the pool of available IMSIs
158that the HLR controls. The pseudonymous IMSI must not be used by any subscriber
159as pseudonymous IMSI yet, but may be the real IMSI of a subscriber.
160
Oliver Smith8b68e4e2020-04-07 09:38:49 +0200161[[hlr-imsi-pseudo-i]]
Oliver Smithbf33c752020-04-06 15:46:29 +0200162==== imsi_pseudo_i
163
Harald Welte9d63d6f2020-04-11 10:18:34 +0200164The counter imsi_pseudo_i indicates how often a subscribers pseudonymous IMSI
Oliver Smith8c81b552020-04-07 08:44:56 +0200165was changed. The value is 1 for the first allocated pseudonymous IMSI of a
166subscriber. When allocating a new pseudonymous IMSI for the same subscriber,
167the new imsi_pseudo_i value is increased by 1. The counter is used by the SIM
Oliver Smithbf33c752020-04-06 15:46:29 +0200168applet to detect and ignore outdated requests related to changing the
169pseudonymous IMSI.
170
Oliver Smith2c8a19c2020-04-06 14:04:13 +0200171=== SIM Provisioning
Oliver Smith6f9f2182020-04-06 14:29:34 +0200172
Oliver Smith763232b2020-04-15 11:14:11 +0200173IMSI pseudonymization as specified by this document works with SIM and USIM.
Oliver Smith8b68e4e2020-04-07 09:38:49 +0200174The HLR is allocating a pseudonymous IMSI for the subscriber. This pseudonymous
175IMSI is stored as IMSI on the subscriber's SIM instead of the real IMSI.
176
Oliver Smith5de45c02020-04-08 14:37:58 +0200177[[sim-app]]
Oliver Smith8b68e4e2020-04-07 09:38:49 +0200178==== SIM applet
179
180The SIM is provisioned with a SIM applet, which is able to change the IMSI once
181the next pseudonymous IMSI arrives from the HLR. A reference implementation is
182provided in <<reference-src>>.
183
Oliver Smith69e3fa62020-04-09 14:54:49 +0200184===== Counter Storage
185
186The following counter variables are stored in the SIM applet.
187
188[options="header",cols="20%,12%,68%"]
189|===
190| Name | Initial value | Description
191
192| imsi_pseudo_i
193| 1
194| See <<hlr-imsi-pseudo-i>>.
195
196| imsi_pseudo_lu
197| 0
198| Amount of Location Updating procedures done with the same pseudonymous IMSI.
199
200| imsi_pseudo_lu_max
201| (decided by operator)
202| Maximum amount of Location Updating procedures done with the same
203 pseudonymous IMSI, before the SIM applet shows a warning to the subscriber.
204|===
205
206===== Switch to Next Pseudonymous IMSI
207
Harald Welte37981b62020-04-11 10:19:21 +0200208The SIM applet registers to a suitable SMS trigger (3GPP TS 43.019, Section
Oliver Smith7b0dbb92020-04-08 10:33:52 +02002096.2). When an SMS from the HLR in the structure of <<sms-structure>> arrives,
210the applet must verify that the SMS is not outdated by comparing imsi_pseudo_i
211from the SMS with the last imsi_pseudo_i that was used when changing the IMSI
Oliver Smith8b68e4e2020-04-07 09:38:49 +0200212(initially 1 as in <<hlr-imsi-pseudo-i>>). The new value must be higher,
213otherwise the SMS should not be processed further.
214
215The SIM applet registers a timer with min_sleep_time from the SMS. When the
Oliver Smithb80a9f82020-04-15 11:46:36 +0200216timer triggers, EF~IMSI~ of the SIM is overwritten with the new pseudonymous
217IMSI. The TMSI and related data (EF~LOCI~, EF~PSLOCI~) and ciphering keys
218(EF~Kc~, EF~KcGPRS~, EF~Keys~, EF~KeysPS~) are invalidated (see 3GPP TS
21931.102). The current imsi_pseudo_i from the SMS is stored in the SIM applet
Oliver Smith69e3fa62020-04-09 14:54:49 +0200220to compare it with the next SMS. imsi_pseudo_lu is reset to 0. Afterwards,
221the EF~IMSI~ changing procedure in 3GPP TS 11.14, Section 6.4.7.1 is executed
222to apply the new IMSI.
Oliver Smith8b68e4e2020-04-07 09:38:49 +0200223
224// FIXME: do we need to enforce the LU now, with an arbitrary CM Service
225// Request, or would this only be necessary for Osmocom? (OS#4404)
Oliver Smith69e3fa62020-04-09 14:54:49 +0200226
227===== Warning the Subscriber If the Pseudonymous IMSI Does Not Change
228
229An attacker could potentially block the next pseudonymous IMSI SMS on purpose.
230Because the SIM applet cannot decide the next pseudonymous IMSI, it would have
231the same pseudonymous IMSI for a long time. Then it could become feasible for
232an attacker to track the subscriber by their pseudonymous IMSI. Therefore the
233SIM applet should warn the subscriber if the pseudonymous IMSI does not change.
234
235The SIM applet registers to EVENT_EVENT_DOWNLOAD_LOCATION_STATUS (3GPP TS
23603.19, Section 6.2) and increases imsi_pseudo_lu by 1 when the event is
237triggered. If imsi_pseudo_lu reaches imsi_pseudo_lu_max, the SIM applet
238displays a warning to the subscriber.
239
Oliver Smithbb8d9122020-04-08 14:58:50 +0200240[[process-update-location-hlr]]
Oliver Smith206a0fa2020-04-07 14:30:07 +0200241=== Process Update_Location_HLR
Oliver Smithbf33c752020-04-06 15:46:29 +0200242
Oliver Smith206a0fa2020-04-07 14:30:07 +0200243All IMSI Pseudonymization related changes to Process Update_Location_HLR
Oliver Smith64d154c2020-04-08 08:36:18 +0200244(3GPP TS 29.002) are optional. Deviations from the existing specification that
245are outlined in this section are expected to be enabled or disabled entirely
246where IMSI pseudonymization is implemented.
Oliver Smith206a0fa2020-04-07 14:30:07 +0200247
Oliver Smithef43ac32020-04-07 16:02:19 +0200248[[figure-imsi-pseudo]]
Oliver Smith206a0fa2020-04-07 14:30:07 +0200249.Process Update_Location_HLR with IMSI pseudonymization changes
250["mscgen"]
251----
252msc {
253 hscale="1.75";
254 MSC [label="MSC/VLR"], SMSC [label="SMS-SC"], HLR [label="HLR"];
255
256 MSC => HLR [label="Update Location Request"];
Oliver Smith7e33ef52020-04-07 15:05:11 +0200257
258 --- [label="If new pseudonymous IMSI was used: deallocate and cancel old pseudonymous IMSI"];
Oliver Smith64d154c2020-04-08 08:36:18 +0200259 HLR box HLR [label="Deallocate old pseudonymous IMSI"];
Oliver Smith7e33ef52020-04-07 15:05:11 +0200260 MSC <= HLR [label="Cancel Location Request"];
261 MSC => HLR [label="Cancel Location Result"];
262 ---;
263
Oliver Smith206a0fa2020-04-07 14:30:07 +0200264 MSC <= HLR [label="Insert Subscriber Data Request"];
265 MSC => HLR [label="Insert Subscriber Data Result"];
Oliver Smith64d154c2020-04-08 08:36:18 +0200266 HLR box HLR [label="Start Next_Pseudo_IMSI_Timer"];
Oliver Smith206a0fa2020-04-07 14:30:07 +0200267 MSC <= HLR [label="Update Location Result"];
Oliver Smith64d154c2020-04-08 08:36:18 +0200268 MSC box MSC [label="Finish Location Updating with ME"],
Oliver Smith206a0fa2020-04-07 14:30:07 +0200269
Oliver Smith64d154c2020-04-08 08:36:18 +0200270 HLR box HLR [label="Wait for Next_Pseudo_IMSI_Timer expiry"];
Oliver Smith206a0fa2020-04-07 14:30:07 +0200271 |||;
272 ...;
273 |||;
Oliver Smith64d154c2020-04-08 08:36:18 +0200274 HLR box HLR [label="Next_Pseudo_IMSI_Timer expired"];
Oliver Smith7e33ef52020-04-07 15:05:11 +0200275
Oliver Smith64d154c2020-04-08 08:36:18 +0200276 HLR box HLR [label="\nAllocate new pseudonymous IMSI\nif subscriber has only one allocated\n"];
Oliver Smith206a0fa2020-04-07 14:30:07 +0200277 SMSC <= HLR [label="Next Pseudonymous IMSI SMS"];
278 SMSC box SMSC [label="Deliver SMS to ME"];
279}
280----
Oliver Smith7afd7012020-04-06 11:59:59 +0200281
Oliver Smithef43ac32020-04-07 16:02:19 +0200282==== Update Location Request
Oliver Smith64d154c2020-04-08 08:36:18 +0200283
Oliver Smithef43ac32020-04-07 16:02:19 +0200284When Update Location Request arrives, the HLR does not look up the subscriber
285by the IMSI, but by the pseudonymous IMSI instead. Unless the subscriber has
Oliver Smith69e3fa62020-04-09 14:54:49 +0200286two pseudonymous IMSI allocated and used the new pseudonymous IMSI in the
287Update Location Request, this is followed by the existing logic to continue
288with Insert Subscriber Data Request.
Oliver Smithef43ac32020-04-07 16:02:19 +0200289
290===== Update Location Request With New Pseudonymous IMSI
291
292If the subscriber has two pseudonymous IMSIs allocated, and the newer entry was
293used (higher imsi_pseudo_i, see <<hlr-imsi-pseudo-i>>), this section applies.
294The older pseudonymous IMSI is deallocated in the HLR. This is done as early
295as possible, so the timeframe where two pseudonymous IMSI are allocated for one
296subscriber is short.
297
298A Cancel Location Request with the old pseudonymous IMSI is sent to the VLR, so
299the conflicting subscriber entry with the old pseudonymous IMSI is deleted from
300the VLR. Receiving a Cancel Location Result is followed by the existing logic
301to continue with Insert Subscriber Data Request.
302
303===== Update Location Request With Old Pseudonymous IMSI
304
305If the subscriber has two pseudonymous IMSIs allocated, and the older entry was
306used (lower imsi_pseudo_i, see <<hlr-imsi-pseudo-i>>), the newer entry is _not_
307deallocated. This could lock out the subscriber from the network if the SMS
308with the new pseudonymous IMSI arrives with a delay.
309
310==== Insert Subscriber Data Result
311
Oliver Smith64d154c2020-04-08 08:36:18 +0200312When Insert Subscriber Data Result arrives, a subscriber specific
313Next_Pseudo_IMSI_Timer starts.
Oliver Smithef43ac32020-04-07 16:02:19 +0200314
315==== Next_Pseudo_IMSI_Timer Expires
316
Oliver Smith64d154c2020-04-08 08:36:18 +0200317If the subscriber has only one pseudonymous IMSI allocated, and the amount of
318available IMSIs in the HLR is high enough, a second pseudonymous IMSI and
319related imsi_pseudo_i gets allocated for the subscriber (as described in
320<<hlr-imsi-pseudo-storage>>).
321
322If the subscriber still has only one pseudonymous IMSI, because not enough
323IMSIs were available in the HLR, the process is aborted here and no SMS with
324a next pseudonymous IMSI is sent to the subscriber. The subscriber will get a
325new pseudonymous IMSI during the next Location Updating Procedure, if the HLR
326has enough IMSIs available at that point.
327
328An SMS is sent to the SMS - Service Centre (SMS-SC) with the newer pseudonymous
329IMSI (higher imsi_pseudo_i, see <<hlr-imsi-pseudo-i>>) and related
330imsi_pseudo_i value.
Oliver Smithef43ac32020-04-07 16:02:19 +0200331
Oliver Smith7b0dbb92020-04-08 10:33:52 +0200332[[sms-structure]]
333==== Next Pseudonymous IMSI SMS Structure
Oliver Smithef43ac32020-04-07 16:02:19 +0200334
Oliver Smith7b0dbb92020-04-08 10:33:52 +0200335.Next pseudonymous IMSI SMS structure
336[packetdiag]
337----
338{
339 colwidth = 32
340
341 0-31: IMSI_PSEUDO_I
342 32-63: MIN_SLEEP_TIME
343 64-119: IMSI_PSEUDO
344 120-127: PAD
345}
346----
347
Oliver Smitha0354de2020-04-09 15:13:38 +0200348// FIXME
349IMPORTANT: This is a draft. The structure is likely to change after the
350reference implementation phase.
351
Oliver Smith7b0dbb92020-04-08 10:33:52 +0200352IMSI_PSEUDO_I: 32 bits::
353See <<hlr-imsi-pseudo-i>>.
354
355MIN_SLEEP_TIME: 32 bits::
356Amount of seconds, which the SIM applet should wait before changing to the new
357pseudonymous IMSI. Since it is unclear when the SMS will arrive (ME might be
358turned off), this is a minimum amount.
359
360IMSI_PSEUDO: 60 bits::
361Telephony Binary Coded Decimal (TBCD, 3GPP TS 29.002) version of the next
362pseudonymous IMSI.
363
364PAD: 8 bits::
365Padding at the end, should be filled with 1111 as in the TBCD specification.
Oliver Smithef43ac32020-04-07 16:02:19 +0200366
Oliver Smith2c8a19c2020-04-06 14:04:13 +0200367== Error Scenarios
Oliver Smith5de45c02020-04-08 14:37:58 +0200368
Oliver Smith2c8a19c2020-04-06 14:04:13 +0200369=== Next Pseudonymous IMSI SMS is Lost
Oliver Smith5de45c02020-04-08 14:37:58 +0200370
371If the SMS with the next pseudonymous IMSI does not arrive, the SIM will start
372the next Location Updating Procedure with the old pseudonymous IMSI. Because
373the HLR has both the old and the new pseudonymous IMSI allocated at this point,
374the subscriber is not locked out of the network.
375
Oliver Smitha2814642020-04-14 14:31:29 +0200376=== Next Pseudonymous IMSI SMS Arrives Out of Order
Oliver Smith5de45c02020-04-08 14:37:58 +0200377
378The next pseudonymous IMSI SMS may arrive out of order. Either, because the
379network is not able to deliver them in order, or even because an attacker would
380perform a replay attack.
381
382If the SMS arrives out of order, the imsi_pseudo_i counter will not be higher
383than the value the SIM applet (<<sim-app>>) has stored. Therefore, the applet
384will discard the message and the subscriber is not locked out of the network.
Oliver Smith7afd7012020-04-06 11:59:59 +0200385
Oliver Smith8b68e4e2020-04-07 09:38:49 +0200386// === SMS Arrives Before Timer Expires
387// FIXME: OS#4486
388
Oliver Smith2c8a19c2020-04-06 14:04:13 +0200389== Recommendations for Real-World Implementations
Oliver Smithcbe90582020-04-08 15:38:29 +0200390
Oliver Smith18bf9bb2020-04-08 15:26:59 +0200391=== BCCH SI3: ATT = 0
Oliver Smithcbe90582020-04-08 15:38:29 +0200392
Oliver Smith18bf9bb2020-04-08 15:26:59 +0200393When changing from one pseudonymous IMSI to the next, it is important that the
394ME does not detach from the network. Otherwise it would be trivial for an
395attacker to correlate the detach with the attach of the same ME with the next
396pseudonymous IMSI.
397
398This is controlled with the ATT flag in the SYSTEM INFORMATION TYPE 3 (SI3)
399message on the Broadcast Control Channel (BCCH), see 3GPP TS 44.018 Section
40010.5.2.11. It must be set to 0.
401
402// FIXME: verify how it set with operators in germany (OS#4404)
403
Oliver Smith5c95bc92020-04-03 14:03:24 +0200404=== End to End Encryption of SMS
Oliver Smithcbe90582020-04-08 15:38:29 +0200405
406When deploying the IMSI pseudonymization, the operator should make sure that
407the next pseudonymous IMSI SMS (<<sms-structure>>) cannot be read or modified
408by third parties. Otherwise, the next pseudonymous IMSI is leaked, and if the
409pseudonymous IMSI in the SMS was changed, the SIM would be locked out of the
410network.
411
412The safest way to protect the next pseudonymous IMSI SMS is a layer of end to
Oliver Smitha2814642020-04-14 14:31:29 +0200413end encryption from the HLR to the SIM. The existing means for OTA SMS
414security (3GPP TS 23.048) provide mechanisms for integrity protection,
415confidentiality as well as replay protection and must be implemented when using
416IMSI pseudonymization.
Oliver Smithcbe90582020-04-08 15:38:29 +0200417
Oliver Smith5c95bc92020-04-03 14:03:24 +0200418=== User-configurable Minimum Duration Between IMSI Changes
Oliver Smith2c8a19c2020-04-06 14:04:13 +0200419
Oliver Smitha0354de2020-04-09 15:13:38 +0200420It may be desirable to let subscribers configure their minimum duration between
421IMSI changes. This allows subscribers with a high privacy requirement to switch
422their pseudonymous IMSI more often, and it allows the pseudonymous IMSI change
423to happen less frequently if it is distracting to the subscriber.
424
425How distracting the pseudonymous IMSI change is, depends on the ME. The
426following examples were observed:
427
428// FIXME: might need an update after SYS#4481
429
430* A Samsung GT-I9100 Galaxy SII smartphone with Android 4.0.3 displays a
431 message at the bottom of the screen for about 5 seconds, but the user
432 interface remains usable.
433* A Samsung GT-E1200 feature phone displays a waiting screen for 16 to 17
434 seconds and is unusable during that time.
435
Oliver Smith0feaa892020-04-09 15:15:29 +0200436[[reference-src]]
437== Reference Implementation with Source Code
438
439A reference implementation for the SIM applet (<<sim-app>>) is available in
440source code under the Apache-2.0 license at:
441
442https://osmocom.org/projects/imsi-pseudo
443
444The HLR modifications described in <<hlr-imsi-pseudo-storage>> and
445<<process-update-location-hlr>> were implemented for reference in OsmoHLR from
446the Osmocom project, licensed under AGPL-3.0. Information about the source code
447and related branches for IMSI pseudonymization can be found at the above URL as
448well.