FakeUKey/Readme.md

84 lines
1.3 KiB
Markdown
Raw Normal View History

2024-06-05 08:04:45 +00:00
# Fake UKey
1. 暂时无法实现 UKEY 复制, 只能从初始化时就使用 Fake UKEY。
## API
请求:
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
URLhttp://127.0.0.1:8090/do
响应:
Access-Control-Allow-Origin : *
Content-Type : application/x-json
Server : fmkey server <0.1>
### 枚举设备
order : 01000005
{
"EnumDeviceNameList": "K1426211102B1145,FMKEY|K1426221104B2502,Sunyard Technology Co.,Ltd",
"rev": 0
}
### 打开设备
order : 01000004
devSerial : K1426210806B0227
{"hdev":"886A8002", "rev":0}
### PIN 认证
order : 01000027
devSerial : K1426210806B0227
pin : 12345678
{"huser":"", "count":0, "rev":0}
### 文件读取
order : 01000035
hdevice : 886A8002
dir : \root\mana
file : auth
offset : 0
size : 2
{"data":"0257", "rev":0}
### 导出公钥
order : 01000043
hdevice : 886A8002
keyNum : 1
{
"keyData": "-----BEGIN ECDSA PUBLIC KEY-----MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAE9WIZc8AVgG4gcW08CBA/6zu/Tfh1h558+I56yfOJXkcp3+/NFKpxcwMGZgEpwsmb88e4Y6tjSeaSfOedOTyrvw==-----END ECDSA PUBLIC KEY-----",
"rev": 0
}
### 签名
order : 01000046
hdevice : 886A8002
keyNum : 1
inData : VYDmUZ+LXcoewVo8ebuuTCaGYkgNaBrEfWWihagPM9E=
alg : 1
{
"sigData": "MEUCIQDYFS+P3YgxWbC/11FlqNOrT2sbOJaUdHV9LTHSQqGT9wIgeW4Vjg7u0YHEEDtAVPoHY2DWJcFK40FKJElJbs1WvoU=",
"rev": 0
}