6.2.15 Group member discovery over PC5 interface

24.5543GPPProximity-services (ProSe) in 5G System (5GS) protocol aspectsRelease 17Stage 3TS

6.2.15.1 General

This clause describes the procedures for group member discovery over PC5 interface for both public safety use and commercial services. The purpose of the group member discovery procedure over PC5 interface is to enable a ProSe-enabled UE to detect and identify another ProSe-enabled UE that belongs to the same application layer group (e.g., sharing the same application layer group ID) over PC5 interface.

To perform group member discovery over PC5 interface, the UE is configured with the related information as described in clause 5.2.3. The following models for group member discovery procedure over PC5 interface as specified in 3GPP TS 23.304 [2] are supported:

a) Model A uses a single discovery protocol message (Announcement); and

b) Model B uses two discovery protocol messages (Solicitation and Response).

NOTE: If the UE is authorized to perform both group member discovery over PC5 interface with Model A and group member discovery over PC5 interface with Model B, it is up to UE implementation to select which model to perform or perform both models simultaneously.

The following procedures are defined for group member discovery procedure over PC5 interface:

a) Group member discovery over PC5 interface with Model A:

1) Announcing UE procedure for group member discovery initiation;

2) Announcing UE procedure for group member discovery completion;

3) Monitoring UE procedure for group member discovery initiation; and

4) Monitoring UE procedure for group member discovery completion; and

b) Group member discovery over PC5 interface with Model B:

1) Discoverer UE procedure for group member discovery initiation;

2) Discoverer UE procedure for group member discovery completion;

3) Discoveree UE procedure for group member discovery initiation; and

4) Discoveree UE procedure for group member discovery completion.

The group member discovery over PC5 interface with Model A can only discover the targeted group members that are identified by the configured application layer group ID. The group member discovery over PC5 interface with Model B can either discover a specific group member of the application layer group identified by the configured application layer group ID or the targeted group members that are identified by the configured application layer group ID.

6.2.15.2 Procedures

6.2.15.2.1 Group member discovery over PC5 interface with model A
6.2.15.2.1.1 General

In this procedure, the UE sending the PROSE PC5 DISCOVERY message is called the "announcing UE" and the other UE is called the "monitoring UE".

6.2.15.2.1.2 Announcing UE procedure for group member discovery initiation

The UE is authorised to perform the announcing UE procedure for group member discovery if:

a) the following is true:

1) the UE is not served by NG-RAN, is authorised to perform 5G ProSe direct discovery using announcing procedure when the UE is not served by NG-RAN and is configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN;

2) the UE is served by NG-RAN and is authorised to perform 5G ProSe direct discovery using announcing in the PLMN indicated by the serving cell; or

3) the UE is:

i) in 5GMM-IDLE mode, in limited service state as specified in 3GPP TS 23.122 [14] and the reason for the UE being in limited service state is one of the following:

A) the UE is unable to find a suitable cell in the selected PLMN as specified in 3GPP TS 38.304 [15];

B) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #11 "PLMN not allowed" as specified in 3GPP TS 24.501 [11]; or

C) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #7 "5GS services not allowed " as specified in 3GPP TS 24.501 [11]; and

ii) authorised to perform 5G ProSe direct discovery using announcing when the UE is not served by NG-RAN and:

A) configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN; or

B) the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure; and

NOTE 1: When the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure, the serving cell broadcasts a common radio resources pool for 5G ProSe discovery transmission and the UE can use this common radio resources pool while in limited service state.

b) the UE is configured with the application layer group ID identifying the application layer group to be announced and with the User info ID for the group member discovery parameter;

otherwise, the UE is not authorised to perform the announcing UE procedure for group member discovery procedure.

Figure 6.2.15.2.1.2.1 illustrates the interaction of the UEs in the announcing UE procedure for group member discovery.

Figure 6.2.15.2.1.2.1: Announcing UE procedure for group member discovery

When the UE is triggered by an upper layer application to announce availability in a discovery group, if the UE is authorised to perform the announcing UE procedure for group member discovery, then the UE:

a) if the UE is served by NG-RAN and the UE in 5GMM-IDLE mode needs to request resources for sending PROSE PC5 DISCOVERY messages as specified in 3GPP TS 38.331 [13], shall perform a service request procedure as specified in 3GPP TS 24.501 [11];

b) shall obtain a valid UTC time for the discovery transmission from the lower layers and generate the UTC-based counter corresponding to this UTC time;

c) shall generate a PROSE PC5 DISCOVERY message for group member discovery announcement. In the PROSE PC5 DISCOVERY message for group member discovery announcement, the UE:

1) shall set the announcer info parameter to the User info ID for the group member discovery parameter; and

2) shall set the application layer group ID parameter to the application layer group ID parameter identifying the discovery group to be announced;

3) shall include the MIC filed computed as described in 3GPP TS 33.503 [34], by using the UTC-based counter and the DUIK contained in the <restricted-announce-response> element of the DISCOVERY_RESPONSE message;

4) shall set the UTC-based counter LSB parameter to the 4 least significant bits of the UTC-based counter;

5) shall set the ProSe direct discovery PC5 message type parameter as specified in table 10.2.1.5; and

6) may include the Metadata IE to provide the application layer discovery message;

d) shall apply the DUIK, DUSK, or DUCK with the associated Encrypted Bitmask, along with the UTC-based counter to the PROSE PC5 DISCOVERY message for whichever security mechanism(s) configured to be applied, e.g., integrity protection, message scrambling or confidentiality protection of one or more above parameters, as specified in 3GPP TS 33.303[36];

e) shall apply one of the following to determine the destination layer-2 ID:

1) if the application layer group ID has a configured layer-2 group ID as specified in clause 5.2.3, set the destination layer-2 ID to the layer-2 group ID; or

2) otherwise, convert the application layer group ID into a destination layer-2 ID as following:

i) to use the group identifier as the input to the SHA-256 hashing algorithm as specified in ISO/IEC 10118-3:2018 [28]; and

ii) to use the 24 least significant bits of the 256 bits of the output as destination layer-2 ID;

NOTE 2: SHA-256 hashing algorithm is implemented in the ME.

f) shall self-assign a source layer-2 ID for sending the group member discovery announcement message; and

NOTE 3: The UE implementation ensures that the value of the self-assigned source layer-2 ID is different from any other self-assigned source layer-2 ID(s) in use for 5G ProSe direct communication as specified in clause 7.2, is different from any other provisioned destination layer-2 ID(s) as specified in clause 5.2 and is different from any other self-assigned source layer-2 ID in use for a simultaneous 5G ProSe direct discovery procedure over PC5 with a different discovery model as specified in clause 6.2.14.2.2.2, clause 6.2.15.2.2.2 and clause 8.2.1.3.1.2.

g) shall pass the resulting PROSE PC5 DISCOVERY message for group member discovery announcement along with the source layer-2 ID and the destination layer-2 ID to the lower layers for transmission over the PC5 interface.

The announcing UE shall ensure that it keeps on passing the same PROSE PC5 DISCOVERY message to the lower layers for transmission until the announcing UE is triggered by an upper layer application to stop announcing availability in a discovery group, or until the UE stops being authorised to perform the announcing UE procedure for group member discovery.

NOTE 4: The announcing UE can stop announcing UE procedure for group member discovery for power saving by implementation specific means e.g. an implementation-specific maximum number of 5G ProSe direct links configured in the UE, or an implementation-specific timer expires.

6.2.15.2.1.3 Announcing UE procedure for group member discovery completion

When the announcing UE is triggered by an upper layer application to stop announcing availability in a discovery group, or when the announcing UE stops being authorised to perform the announcing UE procedure for group member discovery, the UE shall instruct the lower layers to stop announcing.

NOTE: The announcing UE can stop announcing UE procedure for group member discovery for power saving by implementation specific means e.g. an implementation-specific maximum number of 5G ProSe direct links configured in the UE, or an implementation-specific timer expires.

When the UE stops announcing, if the UE is in 5GMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 38.331 [13].

6.2.15.2.1.4 Monitoring UE procedure for group member discovery initiation

The UE is authorised to perform the monitoring UE procedure for group member discovery if:

a) the following is true:

1) the UE is not served by NG-RAN, is authorised to perform 5G ProSe direct discovery using monitoring when the UE is not served by NG-RAN and is configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN;

2) the UE is served by NG-RAN and is authorised to perform 5G ProSe direct discovery monitoring in at least one PLMN; or

3) the UE is:

i) in 5GMM-IDLE mode, in limited service state as specified in 3GPP TS 23.122 [14] and the reason for the UE being in limited service state is one of the following:

A) the UE is unable to find a suitable cell in the selected PLMN as specified in 3GPP TS 38.304 [15];

B) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #11 "PLMN not allowed" as specified in 3GPP TS 24.501 [11]; or

C) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #7 "5GS services not allowed" as specified in 3GPP TS 24.501 [11]; and

ii) authorised to perform 5G ProSe direct discovery using monitoring when the UE is not served by NG-RAN; and:

A) configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN; or

B) the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure; and

NOTE 1: When the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure, the serving cell broadcasts a common radio resources pool for 5G ProSe discovery transmission and the UE can use this common radio resources pool while in limited service state.

b) the UE is configured with the application layer group ID parameter identifying the discovery group to be monitored;

otherwise, the UE is not authorised to perform the monitoring UE procedure for group member discovery.

Figure 6.2.15.2.1.4.1 illustrates the interaction of the UEs in the monitoring UE procedure for group member discovery.

Figure 6.2.15.2.1.4.1: Monitoring UE procedure for group member discovery

When the UE is triggered by an upper layer application to monitor proximity of other UEs in a discovery group and if the UE is authorised to perform the monitoring UE procedure for group member discovery, then the UE shall instruct the lower layers to start monitoring for PROSE PC5 DISCOVERY message as following:

a) if the application layer group ID has a configured layer-2 group ID as specified in clause 5.2.3, the UE shall monitor for PROSE PC5 DISCOVERY message with the layer-2 group ID as specified in clause 5.2.3; or

b) otherwise, the UE shall convert the application layer group ID into a destination layer-2 ID and shall monitor for PROSE PC5 DISCOVERY message with the converted destination layer-2 ID. The UE shall convert the application layer group ID into a destination layer-2 ID as following:

1) to use the group identifier as the input to the SHA-256 hashing algorithm as specified in ISO/IEC 10118-3:2018 [28]; and

2) to use the 24 least significant bits of the 256 bits of the output as destination layer-2 ID.

NOTE 2: SHA-256 hashing algorithm is implemented in the ME.

Upon reception of a PROSE PC5 DISCOVERY message for group member discovery announcement, for the target application layer group ID of the discovery group to be monitored, the UE shall use the associated DUSK, if configured or calculated using the PSDK and the UTC-based counter obtained during the monitoring operation to unscramble the PROSE PC5 DISCOVERY message as described in 3GPP TS 33.303 [36]. Then, if a DUCK is configured or calculated using the PSDK, the UE shall use the DUCK and the UTC-based counter to decrypt the configured message-specific confidentiality-protected portion, as described in 3GPP TS 33.303 [36]. Finally, if a DUIK is configured or calculated using the PSDK, the UE shall use the DUIK and UTC-based counter to verify the MIC field in the unscrambled PROSE PC5 DISCOVERY message for group member discovery announcement.

NOTE 3: The use of an erroneous UTC-based counter for processing received PROSE PC5 DISCOVERY messages at the ProSe-enabled UE can cause MIC check failure after DUIK is used for integrity check and malformed contents after DUSK is used for unscrambling or DUCK is used for deciphering. How a ProSe-enabled UE ensures the accuracy of the UTC-based counter is left to UE implementation.

Then if the application layer group ID parameter of the PROSE PC5 DISCOVERY message for group member discovery announcement is the same as the configured application layer group ID parameter as specified in clause 5, the UE shall consider that other UE in the discovery group the UE seeks to monitor has been discovered.

6.2.15.2.1.5 Monitoring UE procedure for group member discovery completion

When the UE is triggered by an upper layer application to stop monitoring proximity of other UEs in a discovery group, or when the UE stops being authorised to perform the monitoring UE procedure for group member discovery, the UE shall instruct the lower layers to stop monitoring.

When the UE stops monitoring, if the UE is in 5GMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 38.331 [13].

6.2.15.2.2 Group member discovery over PC5 interface with model B
6.2.15.2.2.1 General

In this procedure, the UE sending the PROSE PC5 DISCOVERY message is called the "discoverer UE" and the other UE is called the "discoveree UE".

6.2.15.2.2.2 Discoverer UE procedure for group member discovery initiation

The UE is authorised to perform the discoverer UE procedure for group member discovery if:

a) the following is true:

1) the UE is not served by NG-RAN, is authorised to perform 5G ProSe direct discovery discoverer operation when the UE is not served by NG-RAN and is configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN;

2) the UE is served by NG-RAN and is authorised to perform 5G ProSe direct discovery discoverer operation in the PLMN indicated by the serving cell; or

3) the UE is:

i) in 5GMM-IDLE mode, in limited service state as specified in 3GPP TS 23.122 [14] and the reason for the UE being in limited service state is one of the following:

A) the UE is unable to find a suitable cell in the selected PLMN as specified in 3GPP TS 38.304 [15];

B) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #11 "PLMN not allowed" as specified in 3GPP TS 24.501 [11]; or

C) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #7 "5GS services not allowed" as specified in 3GPP TS 24.501 [11]; and

ii) authorised to perform 5G ProSe direct discovery discoverer operation when the UE is not served by NG-RAN and:

A) configured with the radio parameters to be used for 5G ProSe direct discovery use when not served by NG-RAN; or

B) the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure; and

NOTE 1: When the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure, the serving cell broadcasts a common radio resources pool for 5G ProSe discovery transmission and the UE can use this common radio resources pool while in limited service state.

b) the UE is configured with the application layer group ID parameter identifying the discovery group to be solicited and with the User info ID for the group member discovery parameter;

otherwise, the UE is not authorised to perform the discoverer UE procedure for group member discovery.

Figure 6.2.15.2.2.2.1 illustrates the interaction of the UEs in the discoverer UE procedure for group member discovery.

Figure 6.2.15.2.2.2.1: Discoverer UE procedure for group member discovery

When the UE is triggered by an upper layer application to solicit proximity of other UEs in a discovery group and if the UE is authorised to perform the discoverer UE procedure for group member discovery, then the UE:

a) if the UE is served by NG-RAN and the UE in 5GMM-IDLE mode needs to request resources for sending PROSE PC5 DISCOVERY messages as specified in 3GPP TS 38.331 [13], shall perform a service request procedure as specified in 3GPP TS 24.501 [11];

b) shall obtain a valid UTC time for the discovery transmission from the lower layers and generate the UTC-based counter corresponding to this UTC time;

c) shall generate a PROSE PC5 DISCOVERY message for group member discovery solicitation. In the PROSE PC5 DISCOVERY message for group member discovery solicitation, the UE:

1) shall set the discoverer info parameter to the user info ID for the group member discovery parameter;

2) shall set the application layer group ID parameter to the application layer group ID parameter identifying the discovery group to be solicited;

3) shall set the target user info parameter to the target info, if the target information is provided by the upper layers to identify a specific group member of the application layer group identified by the configured application layer group ID;

NOTE 2: If the PROSE PC5 DISCOVERY message for group member discovery solicitation does not indicate any specific target UE (i.e., target user info is not included in the PROSE PC5 DISCOVERY message), the PROSE PC5 DISCOVERY message for group member discovery solicitation is only used to discover the targeted group members that are identified by the configured application layer group ID.

4) shall include the MIC filed computed as described in 3GPP TS 33.503 [34] by using the UTC-based counter and the DUIK contained in the <restricted-discoverer-response> element of the DISCOVERY_RESPONSE message;

5) shall set the UTC-based counter LSB parameter to the 4 least significant bits of the UTC-based counter; and

6) shall set the ProSe direct discovery PC5 message type parameter as specified in table 10.2.1.6;

d) shall apply the DUIK, DUSK, or DUCK with the associated Encrypted Bitmask, along with the UTC-based counter to the PROSE PC5 DISCOVERY message for whichever security mechanism(s) configured to be applied, e.g., integrity protection, message scrambling or confidentiality protection of one or more above parameters, as specified in 3GPP TS 33.303 [36];

e) shall apply one of the following to determine the destination layer-2 ID:

1) if the application layer group ID has a configured layer-2 group ID as specified in clause 5.2.3, set the destination layer-2 ID to the layer-2 group ID; or

2) otherwise, convert the application layer group ID into a destination layer-2 ID as following:

i) to use the group identifier as the input to the SHA-256 hashing algorithm as specified in ISO/IEC 10118-3:2018 [28]; and

ii) to use the 24 least significant bits of the 256 bits of the output as destination layer-2 ID;

NOTE 3: SHA-256 hashing algorithm is implemented in the ME.

f) shall self-assign a source layer-2 ID for sending the group member discovery solicitation message; and

NOTE 4: The UE implementation ensures that the value of the self-assigned source layer-2 ID is different from any other self-assigned source layer-2 ID(s) in use for 5G ProSe direct communication as specified in clause 7.2, is different from any other provisioned destination layer-2 ID(s) as specified in clause 5.2, and is different from any other self-assigned source layer-2 ID in use for a simultaneous 5G ProSe direct discovery procedure over PC5 with a different discovery model as specified in clause 6.2.14.2.1.2, clause 6.2.15.2.1.2, clause 8.2.1.2.2.2 and clause 8.2.1.2.4.2.

g) shall pass the resulting PROSE PC5 DISCOVERY message for group member discovery solicitation along with the source layer-2 ID and destination layer-2 ID to the lower layers for transmission over the PC5 interface.

The UE shall ensure that it keeps on passing the same PROSE PC5 DISCOVERY message to the lower layers for transmission with an indication that the message until the UE is triggered by an upper layer application to stop soliciting proximity of other UEs in a discovery group, or until the UE stops being authorised to perform the discoverer UE procedure for group member discovery. How this is achieved is left up to UE implementation.

NOTE 5: The discoverer UE can stop discoverer UE procedure for group member discovery for power saving by implementation specific means e.g. an implementation-specific maximum number of 5G ProSe direct links configured in the UE, or an implementation-specific timer expires.

Upon reception of a PROSE PC5 DISCOVERY message for group member discovery response, for the target application layer group ID of the discovery group to be discovered, the UE shall use the associated DUSK, if configured or calculated using the PSDK and the UTC-based counter obtained during the monitoring operation to unscramble the PROSE PC5 DISCOVERY message as described in 3GPP TS 33.303 [36]. Then, if a DUCK is configured or calculated using the PSDK, the UE shall use the DUCK and the UTC-based counter to decrypt the configured message-specific confidentiality-protected portion, as described in 3GPP TS 33.303 [36]. Finally, if a DUIK is configured or calculated using the PSDK, the UE shall use the DUIK and UTC-based counter to verify the MIC field in the unscrambled PROSE PC5 DISCOVERY message for group member discovery response.

Then if:

a) the application layer group ID parameter of the PROSE PC5 DISCOVERY message for group member discovery response is the same as the application layer group ID parameter of the PROSE PC5 DISCOVERY message for group member discovery solicitation, and

b) the target information is not provided by the upper layers to identify a specific group member of the application layer group, or the discoveree info in the PROSE PC5 DISCOVERY message for group member discovery response is the same as the target information if the target information is provided by the upper layers,

the UE shall consider that other UE in the discovery group the UE seeks to discover has been discovered.

6.2.15.2.2.3 Discoverer UE procedure for group member discovery completion

When the UE is triggered by an upper layer application to stop soliciting proximity of other UEs in a discovery group, or when the UE stops being authorised to perform the discoverer UE procedure for group member discovery, the UE shall instruct the lower layers to stop discoverer operation.

NOTE: The discoverer UE can stop discoverer UE procedure for group member discovery for power saving by implementation specific means e.g. an implementation-specific maximum number of 5G ProSe direct links configured in the UE, or an implementation-specific timer expires.

When the UE stops discoverer operation, if the UE is in 5GMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 38.331 [13].

6.2.15.2.2.4 Discoveree UE procedure for group member discovery initiation

The UE is authorised to perform the discoveree UE procedure for group member discovery if:

a) the following is true:

1) the UE is not served by NG-RAN, is authorised to perform 5G ProSe direct discovery discoveree operation when the UE is not served by NG-RAN and is configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN;

2) the UE is served by NG-RAN and is authorised to perform 5G ProSe direct discovery discoveree operation in the PLMN(s) indicated by the serving cell; or

3) the UE is:

i) in 5GMM-IDLE mode, in limited service state as specified in 3GPP TS 23.122 [14] and the reason for the UE being in limited service state is one of the following:

A) the UE is unable to find a suitable cell in the selected PLMN as specified in 3GPP TS 38.304 [15];

B) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #11 "PLMN not allowed" as specified in 3GPP TS 24.501 [11]; or

C) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #7 "5GS services not allowed" as specified in 3GPP TS 24.501 [11]; and

ii) authorised to perform 5G ProSe direct discovery discoveree operation when the UE is not served by NG-RAN; and:

A) configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN; or

B) the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure; and

NOTE 1: When the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure, the serving cell broadcasts a common radio resources pool for 5G ProSe discovery transmission and the UE can use this common radio resources pool while in limited service state.

b) the UE is configured with the application layer group ID parameter identifying the discovery group to be responded to and with the User info ID for the group member discovery parameter;

otherwise, the UE is not authorised to perform the discoveree UE procedure for group member discovery.

Figure 6.2.15.2.2.4.1 illustrates the interaction of the UEs in the discoveree UE procedure for group member discovery.

Figure 6.2.15.2.2.4.1: Discoveree UE procedure for group member discovery

When the UE is triggered by an upper layer application to start responding to solicitation on proximity of a UE in a discovery group and if the UE is authorised to perform the discoveree UE procedure for group member discovery, then the UE:

a) if the UE is served by NG-RAN and the UE in 5GMM-IDLE mode needs to request resources for sending PROSE PC5 DISCOVERY messages as specified in 3GPP TS 38.331 [13], shall perform a service request procedure as specified in 3GPP TS 24.501 [11]; and

b) shall instruct the lower layers to start monitoring for PROSE PC5 DISCOVERY messages.

Upon reception of a PROSE PC5 DISCOVERY message for group member discovery solicitation, for the application layer group ID of the discovery group which the UE is configured to respond for, the UE shall use the associated DUSK, if configured or calculated using the PSDK and the UTC-based counter obtained during the monitoring operation to unscramble the PROSE PC5 DISCOVERY message as described in 3GPP TS 33.303 [36]. Then, if a DUCK is configured or calculated using the PSDK, the UE shall use the DUCK and the UTC-based counter to decrypt the configured message-specific confidentiality protected portion, as described in 3GPP TS 33.303 [36]. Finally, if a DUIK is configured or calculated using the PSDK, the UE shall use the DUIK and UTC-based counter to verify the MIC field in the unscrambled PROSE PC5 DISCOVERY message for group member discovery solicitation.

Then, if:

a) the application layer group ID parameter of the received PROSE PC5 DISCOVERY message is the same as the application layer group ID parameter for the discovery group; and

b) the target user info parameter is not included in the received PROSE PC5 DISCOVERY message or the target user info parameter in the received PROSE PC5 DISCOVERY message is the same as the user info ID for the group member discovery provided by the upper layers or same as the configured user info ID for the group member discovery as specified in clause 5.2.3;

the UE:

a) shall obtain a valid UTC time for the discovery transmission from the lower layers and generate the UTC-based counter corresponding to this UTC time;

b) shall generate a PROSE PC5 DISCOVERY message for group member discovery response. In the PROSE PC5 DISCOVERY message for group member discovery response, the UE:

1) shall set the discoveree info parameter to the user info ID for the group member discovery parameter;

2) shall set the application layer group ID parameter to the application layer group ID parameter of the PROSE PC5 DISCOVERY message for group member discovery solicitation;

3) shall include the MIC filed computed as described in 3GPP TS 33.503 [34] by using the UTC-based counter and the DUIK contained in the <restricted-discoveree-response> element of the DISCOVERY_RESPONSE message;

4) shall set the UTC-based counter LSB parameter to the 4 least significant bits of the UTC-based counter;

5) shall set the ProSe direct discovery PC5 message type parameter as specified in table 10.2.1.7; and

6) may include the Metadata IE to provide the application layer discovery message;

c) shall apply the DUIK, DUSK, or DUCK with the associated Encrypted Bitmask, along with the UTC-based counter to the PROSE PC5 DISCOVERY message for whichever security mechanism(s) configured to be applied, e.g., integrity protection, message scrambling or confidentiality protection of one or more above parameters, as specified in 3GPP TS 33.303 [36];

d) shall set the destination layer-2 ID to the source layer-2 ID from the discoverer UE used in the transportation of the PROSE PC5 DISCOVERY message for group member discovery solicitation and self-assign a source layer-2 ID for sending the group member discovery response message; and

NOTE 2: The UE implementation ensures that the value of the self-assigned source layer-2 ID is different from any other self-assigned source layer-2 ID(s) in use for 5G ProSe direct communication as specified in clause 7.2 and is different from any other provisioned destination layer-2 ID(s) as specified in clause 5.2.

e) shall pass the resulting PROSE PC5 DISCOVERY message for group member discovery response along with the source layer-2 ID and the destination layer-2 ID to the lower layers for transmission over the PC5 interface.

NOTE 3: If the UE is processing a PROSE DIRECT LINK ESTABLISHMENT REQUEST message from the same source layer-2 ID of the received PROSE PC5 DISCOVERY message for group member discovery solicitation, it depends on UE implementation to avoid the conflict of destination layer-2 ID (e.g. send a PROSE DIRECT LINK ESTABLISHMENT REJECT message containing PC5 signalling protocol cause value #3 "conflict of layer-2 ID for unicast communication is detected", or ignore the PROSE DIRECT DISCOVERY message for group member discovery solicitation).

6.2.15.2.2.5 Discoveree UE procedure for group member discovery completion

When the UE is triggered by an upper layer application to stop responding to solicitation on proximity of other UEs in a discovery group, or when the UE stops being authorised to perform the discoveree UE procedure for group member discovery, the UE shall instruct the lower layers to stop monitoring.

When the UE stops monitoring, if the UE is in 5GMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 38.331 [13].