tkgtools is created by George Zhao, who is working for NOKIA, 2010-2012, 2014-2019. This lib is used for implementing algorithm in 3GPP 35.206, f1, f2, f3, f4, f5, f1* and f5*
Project description
Introduction
tkgtools is a library which is used as a base for 3GPP security architecture.
tkg is stands for 3GPP Key Generator.
Only f1, f2, f3, f4, f5, f1* and f5* are supported in this library.
tkgtools is written on python 3.6.5, python 2 is not supported.
How to get it
pip install tkgtools
Functions
f1(key, rand, sqn, amf, op, mac_a)
key(list of int), length 16
rand(list of int), length 16
sqn(list of int), length 6
amf(list of int), length 2
op(list of int), length 16
mac_a(list of int), length 8
mac_a is used as a return value.
f2345(key, rand, op, res, ck, ik , ak)
key(list of int), length 16
rand(list of int), length 16
op(list of int), length 16
res(list of int), length 8
ck(list of int), length 16
ik(list of int), length 16
ak(list of int), length 6
res, ck, ik, and ak are used as return values.
f1star(key, rand, sqn, amf, op, mac_s)
key(list of int), length 16
rand(list of int), length 16
sqn(list of int), length 6
amf(list of int), length 2
mac_s(list of int), length 8
mac_s is used as a return value.
f5star(key, rand, op, ak)
key(list of int), length 16
rand(list of int), length 16
op(list of int), length 16
ak(list of int), length 6
ak is used as return value.
All test data could be retrieved in 3GPP 35.207
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.