---
# System prepended metadata

title: Daily Log - 12/07/2023

---

> M. Naufal Faza(TEEP)
## Goals
:::success
- [x] Benchmarking before AUSF modification
- [x] Benchmarking after AUSF modification
:::

## Report
The log of before the modification of AUSF
```bash!
time="2023-07-12T02:06:23Z" level=info msg="config version [1.0.2]" category=CFG component=AUSF
time="2023-07-12T02:06:23Z" level=info msg="AUSF Log level is set to [info] level" category=Init component=AUSF
time="2023-07-12T02:06:23Z" level=info msg=ausf category=App component=AUSF
time="2023-07-12T02:06:23Z" level=info msg="AUSF version:  \n\tfree5GC version: v3.2.1\n\tbuild time:      2023-07-12T02:06:01Z\n\tcommit hash:     ee6a571a\n\tcommit time:     2022-05-02T15:25:07Z\n\tgo version:      go1.17.8 linux/amd64" category=App component=AUSF
time="2023-07-12T02:06:23Z" level=info msg="Server started" category=Init component=AUSF
time="2023-07-12T02:06:23Z" level=info msg="ausfconfig Info: Version[1.0.2] Description[AUSF initial local configuration]\n" category=Init component=AUSF
time="2023-07-12T02:06:45Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="XresStar = 6631666464623663353339343736333965386461373137616634376232613631\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="Original AUSF key derivation without SIMD and multithreading in 330588" category=UeAuthPost component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:06:45Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="res*: 6631666464623663353339343736333965386461373137616634376232613631\nXres*: 6631666464623663353339343736333965386461373137616634376232613631\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:06:45Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T02:08:42Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="XresStar = 3133633138323964663239656635346434343535333430326137383339383430\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="Original AUSF key derivation without SIMD and multithreading in 383201" category=UeAuthPost component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:08:42Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="res*: 3133633138323964663239656635346434343535333430326137383339383430\nXres*: 3133633138323964663239656635346434343535333430326137383339383430\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:08:42Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T02:10:36Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="XresStar = 6162623330363934323063306231383233336437613834323034373938366365\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="Original AUSF key derivation without SIMD and multithreading in 193751" category=UeAuthPost component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:10:36Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="res*: 6162623330363934323063306231383233336437613834323034373938366365\nXres*: 6162623330363934323063306231383233336437613834323034373938366365\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:10:36Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T02:13:15Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="XresStar = 3038316233346238333862663832353130373334316564326537396432323033\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="Original AUSF key derivation without SIMD and multithreading in 459058" category=UeAuthPost component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:13:15Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="res*: 3038316233346238333862663832353130373334316564326537396432323033\nXres*: 3038316233346238333862663832353130373334316564326537396432323033\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:13:15Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T02:14:18Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="XresStar = 3366613636363531633566646134643764643031623234666331326563633866\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="Original AUSF key derivation without SIMD and multithreading in 267239" category=UeAuthPost component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:14:18Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="res*: 3366613636363531633566646134643764643031623234666331326563633866\nXres*: 3366613636363531633566646134643764643031623234666331326563633866\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:14:18Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T02:16:01Z" level=info msg="Terminating AUSF..." category=Init component=AUSF
time="2023-07-12T02:16:01Z" level=info msg="Send Deregister NFInstance" category=App component=AUSF
time="2023-07-12T02:16:02Z" level=info msg="Deregister from NRF successfully" category=Init component=AUSF
time="2023-07-12T02:16:02Z" level=info msg="AUSF terminated" category=Init component=AUSF
```
The derivations took (in nanoseconds):
1. 330588
2. 383201
3. 193751
4. 459058
5. 267239

The first log of modified AUSF
```bash=
time="2023-07-12T02:52:34Z" level=info msg="config version [1.0.2]" category=CFG component=AUSF
time="2023-07-12T02:52:34Z" level=info msg="AUSF Log level is set to [info] level" category=Init component=AUSF
time="2023-07-12T02:52:34Z" level=info msg=ausf category=App component=AUSF
time="2023-07-12T02:52:34Z" level=info msg="AUSF version:  \n\tfree5GC version: v3.2.1\n\tbuild time:      2023-07-12T02:52:24Z\n\tcommit hash:     ee6a571a\n\tcommit time:     2022-05-02T15:25:07Z\n\tgo version:      go1.17.8 linux/amd64" category=App component=AUSF
time="2023-07-12T02:52:34Z" level=info msg="Server started" category=Init component=AUSF
time="2023-07-12T02:52:34Z" level=info msg="ausfconfig Info: Version[1.0.2] Description[AUSF initial local configuration]\n" category=Init component=AUSF
time="2023-07-12T02:52:54Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="UE is not cached. Redoing the full authentication in AUSF" category=UeAuthPost component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="XresStar = 6163363239306639303235303862303832323831303939306235393133666362\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="Cache not found. Deriving HXRES* and Kseaf in 123273 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:52:54Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="res*: 6163363239306639303235303862303832323831303939306235393133666362\nXres*: 6163363239306639303235303862303832323831303939306235393133666362\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:52:54Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T02:54:49Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:54:49Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:54:49Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:54:49Z" level=info msg="Cached UE. Skipping derivation. Caching only took 824 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T02:54:49Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:54:49Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:54:49Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:54:49Z" level=info msg="res*: 6163363239306639303235303862303832323831303939306235393133666362\nXres*: 6163363239306639303235303862303832323831303939306235393133666362\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:54:49Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:54:49Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T02:55:22Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:55:22Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:55:22Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:55:22Z" level=info msg="Cached UE. Skipping derivation. Caching only took 609 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T02:55:22Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:55:22Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:55:22Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:55:22Z" level=info msg="res*: 6163363239306639303235303862303832323831303939306235393133666362\nXres*: 6163363239306639303235303862303832323831303939306235393133666362\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:55:22Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:55:22Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T02:59:41Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T02:59:41Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T02:59:41Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T02:59:41Z" level=info msg="Cached UE. Skipping derivation. Caching only took 711 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T02:59:41Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T02:59:41Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T02:59:41Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T02:59:41Z" level=info msg="res*: 6163363239306639303235303862303832323831303939306235393133666362\nXres*: 6163363239306639303235303862303832323831303939306235393133666362\n" category=5gAkaAuth component=AUSF
time="2023-07-12T02:59:41Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T02:59:41Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:00:00Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:00:00Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:00:00Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:00:00Z" level=info msg="Cached UE. Skipping derivation. Caching only took 612 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:00:00Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:00:00Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:00:00Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:00:00Z" level=info msg="res*: 6163363239306639303235303862303832323831303939306235393133666362\nXres*: 6163363239306639303235303862303832323831303939306235393133666362\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:00:00Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:00:00Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:00:20Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:00:20Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:00:21Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:00:21Z" level=info msg="Cached UE. Skipping derivation. Caching only took 1050 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:00:21Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:00:21Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:00:21Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:00:21Z" level=info msg="res*: 6163363239306639303235303862303832323831303939306235393133666362\nXres*: 6163363239306639303235303862303832323831303939306235393133666362\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:00:21Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:00:21Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:28:51Z" level=info msg="Terminating AUSF..." category=Init component=AUSF
time="2023-07-12T03:28:51Z" level=info msg="Send Deregister NFInstance" category=App component=AUSF
time="2023-07-12T03:28:52Z" level=info msg="Deregister from NRF successfully" category=Init component=AUSF
time="2023-07-12T03:28:52Z" level=info msg="AUSF terminated" category=Init component=AUSF
```
Key derivation took 123273 nanoseconds. Meanwhile, with caching, it only took (in nanoseconds):
1. 824
2. 609
3. 711
4. 612
5. 1050

The second log of modified AUSF
```bash=
time="2023-07-12T03:29:17Z" level=info msg="config version [1.0.2]" category=CFG component=AUSF
time="2023-07-12T03:29:17Z" level=info msg="AUSF Log level is set to [info] level" category=Init component=AUSF
time="2023-07-12T03:29:17Z" level=info msg=ausf category=App component=AUSF
time="2023-07-12T03:29:17Z" level=info msg="AUSF version:  \n\tfree5GC version: v3.2.1\n\tbuild time:      2023-07-12T02:52:24Z\n\tcommit hash:     ee6a571a\n\tcommit time:     2022-05-02T15:25:07Z\n\tgo version:      go1.17.8 linux/amd64" category=App component=AUSF
time="2023-07-12T03:29:17Z" level=info msg="Server started" category=Init component=AUSF
time="2023-07-12T03:29:17Z" level=info msg="ausfconfig Info: Version[1.0.2] Description[AUSF initial local configuration]\n" category=Init component=AUSF
time="2023-07-12T03:30:16Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="UE is not cached. Redoing the full authentication in AUSF" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="XresStar = 6265393862653834623165306538393830323466343762363835383335336264\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="Cache not found. Deriving HXRES* and Kseaf in 256389 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:30:16Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="res*: 6265393862653834623165306538393830323466343762363835383335336264\nXres*: 6265393862653834623165306538393830323466343762363835383335336264\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:30:16Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:30:43Z" level=info msg="Terminating AUSF..." category=Init component=AUSF
time="2023-07-12T03:30:43Z" level=info msg="Send Deregister NFInstance" category=App component=AUSF
time="2023-07-12T03:30:44Z" level=info msg="Deregister from NRF successfully" category=Init component=AUSF
time="2023-07-12T03:30:44Z" level=info msg="AUSF terminated" category=Init component=AUSF
```
Key derivation took 256389 nanoseconds.

The third log of modified AUSF
```bash=
time="2023-07-12T03:30:54Z" level=info msg="config version [1.0.2]" category=CFG component=AUSF
time="2023-07-12T03:30:54Z" level=info msg="AUSF Log level is set to [info] level" category=Init component=AUSF
time="2023-07-12T03:30:54Z" level=info msg=ausf category=App component=AUSF
time="2023-07-12T03:30:54Z" level=info msg="AUSF version:  \n\tfree5GC version: v3.2.1\n\tbuild time:      2023-07-12T02:52:24Z\n\tcommit hash:     ee6a571a\n\tcommit time:     2022-05-02T15:25:07Z\n\tgo version:      go1.17.8 linux/amd64" category=App component=AUSF
time="2023-07-12T03:30:54Z" level=info msg="Server started" category=Init component=AUSF
time="2023-07-12T03:30:54Z" level=info msg="ausfconfig Info: Version[1.0.2] Description[AUSF initial local configuration]\n" category=Init component=AUSF
time="2023-07-12T03:30:58Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="UE is not cached. Redoing the full authentication in AUSF" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="XresStar = 3531313634616265393933316439636330373232643337633961623862346163\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="Cache not found. Deriving HXRES* and Kseaf in 329658 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:30:58Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="res*: 3531313634616265393933316439636330373232643337633961623862346163\nXres*: 3531313634616265393933316439636330373232643337633961623862346163\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:30:58Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:31:06Z" level=info msg="Terminating AUSF..." category=Init component=AUSF
time="2023-07-12T03:31:06Z" level=info msg="Send Deregister NFInstance" category=App component=AUSF
time="2023-07-12T03:31:07Z" level=info msg="Deregister from NRF successfully" category=Init component=AUSF
time="2023-07-12T03:31:07Z" level=info msg="AUSF terminated" category=Init component=AUSF
```
Key derivation took 329658 nanoseconds.

The fourth log of modified AUSF
```bash=
time="2023-07-12T03:31:15Z" level=info msg="config version [1.0.2]" category=CFG component=AUSF
time="2023-07-12T03:31:15Z" level=info msg="AUSF Log level is set to [info] level" category=Init component=AUSF
time="2023-07-12T03:31:15Z" level=info msg=ausf category=App component=AUSF
time="2023-07-12T03:31:15Z" level=info msg="AUSF version:  \n\tfree5GC version: v3.2.1\n\tbuild time:      2023-07-12T02:52:24Z\n\tcommit hash:     ee6a571a\n\tcommit time:     2022-05-02T15:25:07Z\n\tgo version:      go1.17.8 linux/amd64" category=App component=AUSF
time="2023-07-12T03:31:15Z" level=info msg="Server started" category=Init component=AUSF
time="2023-07-12T03:31:15Z" level=info msg="ausfconfig Info: Version[1.0.2] Description[AUSF initial local configuration]\n" category=Init component=AUSF
time="2023-07-12T03:31:20Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="UE is not cached. Redoing the full authentication in AUSF" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="XresStar = 3165373435633036626435363037313337636437386463656231386331646435\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="Cache not found. Deriving HXRES* and Kseaf in 138609 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:31:20Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="res*: 3165373435633036626435363037313337636437386463656231386331646435\nXres*: 3165373435633036626435363037313337636437386463656231386331646435\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:31:20Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:31:43Z" level=info msg="Terminating AUSF..." category=Init component=AUSF
time="2023-07-12T03:31:43Z" level=info msg="Send Deregister NFInstance" category=App component=AUSF
time="2023-07-12T03:31:44Z" level=info msg="Deregister from NRF successfully" category=Init component=AUSF
time="2023-07-12T03:31:44Z" level=info msg="AUSF terminated" category=Init component=AUSF
```
Key derivation took 138609 nanoseconds.

The fifth log of modified AUSF
```bash=
time="2023-07-12T03:31:49Z" level=info msg="config version [1.0.2]" category=CFG component=AUSF
time="2023-07-12T03:31:49Z" level=info msg="AUSF Log level is set to [info] level" category=Init component=AUSF
time="2023-07-12T03:31:49Z" level=info msg=ausf category=App component=AUSF
time="2023-07-12T03:31:49Z" level=info msg="AUSF version:  \n\tfree5GC version: v3.2.1\n\tbuild time:      2023-07-12T02:52:24Z\n\tcommit hash:     ee6a571a\n\tcommit time:     2022-05-02T15:25:07Z\n\tgo version:      go1.17.8 linux/amd64" category=App component=AUSF
time="2023-07-12T03:31:49Z" level=info msg="Server started" category=Init component=AUSF
time="2023-07-12T03:31:49Z" level=info msg="ausfconfig Info: Version[1.0.2] Description[AUSF initial local configuration]\n" category=Init component=AUSF
time="2023-07-12T03:31:54Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="UE is not cached. Redoing the full authentication in AUSF" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="XresStar = 6165353234643935303439373766633363666161343730306562616233396339\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="Cache not found. Deriving HXRES* and Kseaf in 88026 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:31:54Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="res*: 6165353234643935303439373766633363666161343730306562616233396339\nXres*: 6165353234643935303439373766633363666161343730306562616233396339\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:31:54Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:32:27Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:32:27Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:27Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:27Z" level=info msg="Cached UE. Skipping derivation. Caching only took 644 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:27Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:27Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:32:27Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:27Z" level=info msg="res*: 6165353234643935303439373766633363666161343730306562616233396339\nXres*: 6165353234643935303439373766633363666161343730306562616233396339\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:27Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:27Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:32:40Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:32:40Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:40Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:40Z" level=info msg="Cached UE. Skipping derivation. Caching only took 639 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:40Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:40Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:32:40Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:40Z" level=info msg="res*: 6165353234643935303439373766633363666161343730306562616233396339\nXres*: 6165353234643935303439373766633363666161343730306562616233396339\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:40Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:40Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:32:51Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:32:51Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:51Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:51Z" level=info msg="Cached UE. Skipping derivation. Caching only took 863 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:51Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:32:51Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:32:51Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:51Z" level=info msg="res*: 6165353234643935303439373766633363666161343730306562616233396339\nXres*: 6165353234643935303439373766633363666161343730306562616233396339\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:51Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:32:51Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:33:00Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:33:00Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:33:00Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:33:00Z" level=info msg="Cached UE. Skipping derivation. Caching only took 681 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:33:00Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:33:00Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:33:00Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:33:00Z" level=info msg="res*: 6165353234643935303439373766633363666161343730306562616233396339\nXres*: 6165353234643935303439373766633363666161343730306562616233396339\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:33:00Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:33:00Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:33:09Z" level=info msg=HandleUeAuthPostRequest category=UeAuthPost component=AUSF
time="2023-07-12T03:33:09Z" level=info msg="Serving network authorized" category=UeAuthPost component=AUSF
time="2023-07-12T03:33:09Z" level=info msg="Use 5G AKA auth method" category=UeAuthPost component=AUSF
time="2023-07-12T03:33:09Z" level=info msg="Cached UE. Skipping derivation. Caching only took 669 nanoseconds" category=UeAuthPost component=AUSF
time="2023-07-12T03:33:09Z" level=info msg="Add SuciSupiPair (suci-0-208-93-0000-0-0-0000000005, imsi-208930000000005) to map.\n" category=UeAuthPost component=AUSF
time="2023-07-12T03:33:09Z" level=info msg="| 201 |       127.0.0.1 | POST    | /nausf-auth/v1/ue-authentications | " category=GIN component=AUSF
time="2023-07-12T03:33:09Z" level=info msg=Auth5gAkaComfirmRequest category=5gAkaAuth component=AUSF
time="2023-07-12T03:33:09Z" level=info msg="res*: 6165353234643935303439373766633363666161343730306562616233396339\nXres*: 6165353234643935303439373766633363666161343730306562616233396339\n" category=5gAkaAuth component=AUSF
time="2023-07-12T03:33:09Z" level=info msg="5G AKA confirmation succeeded" category=5gAkaAuth component=AUSF
time="2023-07-12T03:33:09Z" level=info msg="| 200 |       127.0.0.1 | PUT     | /nausf-auth/v1/ue-authentications/suci-0-208-93-0000-0-0-0000000005/5g-aka-confirmation | " category=GIN component=AUSF
time="2023-07-12T03:33:26Z" level=info msg="Terminating AUSF..." category=Init component=AUSF
time="2023-07-12T03:33:26Z" level=info msg="Send Deregister NFInstance" category=App component=AUSF
time="2023-07-12T03:33:27Z" level=info msg="Deregister from NRF successfully" category=Init component=AUSF
time="2023-07-12T03:33:27Z" level=info msg="AUSF terminated" category=Init component=AUSF
```
Key derivation took 88026 nanoseconds. 
Meanwhile, with caching, it only took (in nanoseconds):
1. 664
2. 639
3. 863
4. 681
5. 669

| No | Before (key derivation) | After (key derivation) | After (caching) |
|----|-------------------------|------------------------|-----------------|
| 1  | 330588                  | 123273                 | 824             |
| 2  | 383201                  | 256389                 | 609             |
| 3  | 193751                  | 329658                 | 711             |
| 4  | 459058                  | 138609                 | 612             |
| 5  | 267239                  | 88026                  | 1050            |
| 6  |                         |                        | 664             |
| 7  |                         |                        | 639             |
| 8  |                         |                        | 863             |
| 9  |                         |                        | 681             |
|10   |                         |                        |669              |
| AVG|326767.4                 |187191                  |732.2            |

improvement of the key derivation: **1.745636275** times faster  
improvement of the caching: **446.281617** times faster
![](https://hackmd.io/_uploads/Sy5r8k2th.png)

## Comment

## Further Plan
1. First plan
2. Second plan