Hello @Kan_Li ,
I`m trying to implement a very simple use case with SE050. The secure element administrator must create a set of keys that must not be overwritten or deleted. The normal user could use the key only under the policy rules.
No matter how I create the policy, the Sign/Verify can still be performed despite assigning a special singing deny policy.
I`m using Auth Obj ID as 0 because I want the policy to be applied for all users.
I have a few questions:
1. Is it possible to create an object(asymkey or binary file) with special policy for signing/encryption for example? How?
2. How would a policy assigned to an object be different for multiple users ? Normal user canot delete an object, only the super user could delete the object.
3. How to perform authentication to the Administrator and then as normal user ? For example "ssscli connect se05x vcom COM4 --auth_type UserID" seem generic and misleading.
Please find below the ssscli commands. I have run the execute se05x_Delete_and_test_provision.exe before. Do you encounter a similar issue, or this needs a different approach?
Thanks!
ssscli connect se05x vcom COM4
ssscli policy asymkey nosign 0 --sign 0 --verify 0
ssscli policy dump nosign
Created object policy:
Key_type : Asymmetric_Key
Auth Obj ID : 0x0
Sign : False
Verify : False
Encrypt : True
Decrypt : True
Key Derive : True
Wrap : True
Generate : True
Write : True
Read : True
Import Export : True
Key Agreement : True
Attestation : True
forbid_derived_output : False
Policy in hex:
08 00 00 00 00 07 F8 10 00
ssscli connect se05x vcom COM4
ssscli generate rsa 0x400 2048 --policy_name nosign
echo 122>>in.txt
ssscli sign 0x400 in.txt out.txt
c:\Projects\Se050_Middleware\SE-PLUG-TRUST-MW _v3_3_0\simw-top\binaries\PCWindows\ssscli>ssscli generate rsa 400 2048 --policy_name nosign
Reading policy from file path:
c:\Projects\Se050_Middleware\SE-PLUG-TRUST-MW _v3_3_0\simw-top\binaries\PCWindows\ssscli\policy\ssscli_obj_policy_nosign.pkl
Generating RSA Key Pair at KeyID = 0x00000400, bits=2048
Opening COM Port 'COM4'
sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
sss :WARN :Communication channel is with UserID (But Plain).
sss :WARN :!!!Not recommended for production use.!!!
Generated RSA Key Pair at KeyID = 0x00000400
c:\Projects\Se050_Middleware\SE-PLUG-TRUST-MW _v3_3_0\simw-top\binaries\PCWindows\ssscli>ssscli sign 0x400 in.txt out.txt
Opening COM Port 'COM4'
sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
sss :WARN :Communication channel is with UserID (But Plain).
sss :WARN :!!!Not recommended for production use.!!!
Signed from KeyID = 0x00000400 <--- successfull, but it should not be ?!