-
-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with downloading a public RSA key to a SSD with Delegate Management #118
Comments
I understand that in the GlobalPlatformPro, the public RSA key must be loaded using the |
Loading of RSA keys is not implemented in the released version, yet. But Having requests for it probably speeds up the release. If it will actually work for your card, is a different question. |
Thanks for the answer, Martin! |
There is code for this that is not published, but current availability of time does not permit working more on it before a week or even two. |
It will be very cool if in the future Global Platform Pro will support this feature. Thanks again for the answer!) |
You can use the latest master and use |
I assume it works for RSA. Be sure to set the right key version number. |
Good afternoon, Martin! Thank you for adding the RSA key loading feature!
Maybe I somehow enter the wrong version, although I tried it in the form of HEX (70 or 0x70) values and in the form of a prime number (112). If i use HEX value 70 :
Maybe I use the parameters in the wrong sequence or do not specify something else? |
Thanks for the update. I'll update the CLI to accommodate your use case before Christmas. |
Thanks for the reply, Martin! |
I encountered problems when I tried to put the public RSA key on the Supplementary Security Domain (SSD) with the Delegate Management(DM) privs to smart card using the GPShell utility. What I do:
openssl genrsa -out ./pr.pem -des -passout pass:12345678 1024
openssl rsa -in ./pr.pem -pubout -out pub.pem
gp keys --domain A000000004000001 --privs DelegatedManagement
Reuslt:
DOM: A000000004000001 (SELECTABLE) Privs: SecurityDomain, DelegatedManagement
gp --sdaid A000000004000001 -lock [key]
Domain became PERSONALIZED:
DOM: A000000004000001 (PERSONALIZED) Privs: SecurityDomain, DelegatedManagement
mode_211
enable_trace
enable_timer
establish_context
command time: 4 ms
card_connect
command time: 61 ms
select -AID A000000004000001
Command --> 00A4040008A000000004000001
Wrapped command --> 00A4040008A000000004000001
Response <-- 6F108408A000000004000001A5049F6501FF9000
command time: 59 ms
open_sc -scp 2 -security 3 -scpimpl 0x15 -keyver 0 -mac_key [key_mac] -enc_key [key_enc] -kek_key [key_kek]
Command --> 8050000008275D44D56FE9B1C300
Wrapped command --> 8050000008275D44D56FE9B1C300
Response <-- 000172850008B6DE043C01020000CA5C85B8CA6F97B71320C829ABD79000
Command --> 8482030010BA266EA9661D13493D3DC8FED7F45961
Wrapped command --> 8482030010BA266EA9661D13493D3DC8FED7F45961
Response <-- 9000
command time: 260 ms
put_dm_keys -keyver 0 -newkeyver 2 -file pub.pem -pass [The_key_is_8_characters_in_length] -key [The_key_is_64_characters_in_length]
Command --> 80D80001A002A1803BAC9523A55469AF1035251FBFF034BB324CE3720808430AE6D8C2473D548CA86A6E1C4BF94EEB899C67D6EAD11A995D77F914654473BB7E088CB930CE953893BA01372CE4D128D980AB5B5657764E26AB1F6B01B954CF77554DD191309F1BFBD356ABAC8ADE1BCD87B83C6FC868F6FFE08A9C6DE02A1FFA9285E184EFAE7ACE00A00301000100801085272E4D9EF376D285272E4D9EF376D2038CA64D00
Wrapped command --> 84D80001B0ACA2E440664B9437FF05EAC64B0119C732BCCE420A5D3AD8DD96CB3C6C23CA46BE0E4ACC85F76D06FC5AB6A98B85726729320253F53D4079A331A4A1EA66F0FE64B83F18FB544B9E81B2A72BA5CD653ABE3E4C5783231DA1ED4F726C0D2A34C2FD5A75532A6A21690E4C0292125617D68D140E93EB815700507B940265B2E7A4E871095B9B4AC70067348132BF4E3650CA23B0B0D130738F6C6248337344F36C753A3BA4ABD3B54A9C3AB047A0807F0800
Response <-- 6A86
put_delegated_management_keys() returns 0x80206A86 (6A86: Incorrect parameters (P1, P2).)
Gives out the error parameters P1, P2, but I can not understand what the problem is and what I'm doing wrong. It is possible that the length of the password or the key, or their appearance, does not. Is it possible to somehow load keys with the help of Global Platform Pro or is it possible only with the help of GPShell?
The text was updated successfully, but these errors were encountered: