TKGTools由George Zhao创建,他为诺基亚工作,2010-2012,2014-2019。此库用于实现3gpp 35.206、f1、f2、f3、f4、f5、f1*和f5中的算法*

tkgtools的Python项目详细描述


简介

TKGTools是一个库,用作3GPP安全体系结构的基础。

TKG代表3GPP密钥生成器。

此库中仅支持f1、f2、f3、f4、f5、f1*和f5*。

TKGTools是在Python3.6.5上编写的,不支持Python2。

作者

2010-2012、2014-2019年为诺基亚工作的George Zhao。

maito:georgezhao_1980@163.com

如何获得它

pip install tkgtools

功能

f1(键,rand,sqn,amf,op,mac_a,opc=[])

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

opc(list of int), length 6, it is an optional parameter, if opc is set, f1 function will never use op parameter, and use opc to instead.

mac_a is used as a return value.

f2345(键,rand,op,res,ck,ik,ak,opc=[])

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

opc(list of int), length 6, it is an optional parameter, if opc is set, f2345 function will never use op parameter, and use opc to instead.

res, ck, ik, and ak are used as return values.

F1star(键,rand,sqn,amf,op,mac_s,opc=[])

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

opc(list of int), length 6, it is an optional parameter, if opc is set, f1star function will never use op parameter, and use opc to instead.

mac_s is used as a return value.

F5star(键,rand,op,ak,opc=[])

key(list of int), length 16

rand(list of int), length 16

op(list of int), length 16

ak(list of int), length 6

opc(list of int), length 6, it is an optional parameter, if opc is set, f5star function will never use op parameter, and use opc to instead.

ak is used as return value.

所有测试数据均可在3gpp 35.207中检索到

示例

from tkgtools import tkgtools

key = [0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11]
op = [0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x10,0x11,0x12,0x13,0x14,0x15,0x16]
rand = [0x16,0x2a,0x9b,0x8c,0x46,0x9a,0xdc,0x1f,0x41,0xcc,0x69,0x73,0xee,0xe5,0x9e,0xaf]
res=[0 for col in range(8)]
ck=[0 for col in range(16)]
ik=[0 for col in range(16)]
ak=[0 for col in range(6)]
tkgtools.f2345(key, rand, op, res, ck, ik, ak)

任何问题

请联系georgezhao_1980@163.com

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何序列化数字?   java如何用我的Mainclass扩展ListActivity类和Fragment类?   JavaJersey、Jackson和JAXRS发布了多种JSON格式   java如何使用JavaFXKeyCombination覆盖系统默认的键盘快捷键,如Ctrl+C、Ctrl+V?   java Jersey类路径扫描示例Jersey。配置。服务器供应商。类路径   java什么样的数据结构可以作为一个数组,但在同一索引下给定多个值时会自动增长到第二维度?   java如何序列化非持久实体中的嵌套PersistentEntityResource   协议缓冲区我可以让protoc在Java中生成int数组吗?   在GregorianCalendar ArrayList Java中添加日期元素   从html模板动态生成pdf文件并用java生成目录   java Gridgain 6.5.5开源多个节点速度较慢。。?   java如何检查数组中所有整数的不相等性?   java在Eclipse中,如何多次运行JUnit测试用例   java侦听器不能处理特定的片段   java不是一个声明?(蓝色J)   找不到Attributer类型的PersonId的java定义