Changes

Jump to navigation Jump to search
30 bytes added ,  18:48, 19 December 2017
no edit summary
Line 33: Line 33:  
| 7 || [[#GetRandomBytes]] || Uses [[SMC#GetRandomBytes|GetRandomBytes SMC]].
 
| 7 || [[#GetRandomBytes]] || Uses [[SMC#GetRandomBytes|GetRandomBytes SMC]].
 
|-
 
|-
| 9 || [[#DecryptImportPrivkForExpMod0]] || Speculative name. Wrapper for [[SMC#LoadRsaPublicKey|LoadRsaPublicKey SMC]].
+
| 9 || [[#DecryptImportPrivkForRsaOaep]] || Speculative name. Wrapper for [[SMC#LoadRsaPublicKey|LoadRsaPublicKey SMC]].
 
|-
 
|-
| 10 || [[#ExpMod0]] || Speculative name. Wrapper for [[SMC#PublicRsa|PublicRsa SMC]].
+
| 10 || [[#DecryptRsaOaep]] || Speculative name. Uses [[SMC#PublicRsa|PublicRsa SMC]].
 
|-
 
|-
 
| 11 || [[#IsDevelopment]] ||
 
| 11 || [[#IsDevelopment]] ||
Line 187: Line 187:  
Any other '''ConfigItem''', besides 13, can't be set.
 
Any other '''ConfigItem''', besides 13, can't be set.
   −
== DecryptImportPrivkForExpMod0 ==
+
== DecryptImportPrivkForRsaOaep ==
 
Takes one type-9 (X descriptor) buffer ('''enc_privk_in_buf'''), a 16-byte KEK ('''key_x'''), a 16-byte key ('''key_y''') and a u32 ('''version''').
 
Takes one type-9 (X descriptor) buffer ('''enc_privk_in_buf'''), a 16-byte KEK ('''key_x'''), a 16-byte key ('''key_y''') and a u32 ('''version''').
 
'''version''' is 0 for normal keys or 1 for extended keys.
 
'''version''' is 0 for normal keys or 1 for extended keys.
Line 193: Line 193:  
Decrypts '''enc_privk_in_buf''' with a key generated from '''key_x''' and '''key_y''' and imports it for later usage.
 
Decrypts '''enc_privk_in_buf''' with a key generated from '''key_x''' and '''key_y''' and imports it for later usage.
   −
== ExpMod0 ==
+
== DecryptRsaOaep ==
Takes one type-10 (C descriptor) buffer ('''data_out_buf''') and 3 type-9 (X descriptor) buffers ('''data_in_buf''', '''param0_in_buf''' and '''param1_in_buf''').
+
Takes one type-10 (C descriptor) buffer ('''data_out_buf''') and 3 type-9 (X descriptor) buffers ('''data_in_buf''', '''mod_in_buf''' and '''label_hash_in_buf''').
   −
Decrypts '''data_in_buf''' into '''data_out_buf''' using the private key imported with [[#DecryptImportPrivkForExpMod0]] and the supplied buffers '''param0_in_buf''' and '''param1_in_buf'''.
+
Decrypts '''data_in_buf''' into '''data_out_buf''' using the private key imported with [[#DecryptImportPrivkForRsaOaep]] and the supplied '''mod_in_buf'''. Afterwards, verifies RSA-OAEP encoding using '''label_hash_in_buf'''.
   −
Returns and unknown u32.
+
Returns an u32 ('''dec_data_size''').
    
== IsDevelopment ==
 
== IsDevelopment ==
Line 211: Line 211:  
'''KeyGeneration''' ranges from 0 to 2.
 
'''KeyGeneration''' ranges from 0 to 2.
   −
Returns a scrambled (unsealed?) key ('''key_a''').
+
Returns a scrambled key ('''key_a''').
    
== DecryptPrivk ==
 
== DecryptPrivk ==
Line 250: Line 250:     
== ExpMod1 ==
 
== ExpMod1 ==
Takes 3 type-9 (X descriptor) buffers ('''data_in_buf''', '''param0_in_buf''' and '''param1_in_buf''').
+
Takes 3 type-9 (X descriptor) buffers ('''data_in_buf''', '''mod_in_buf''' and '''param0_in_buf''').
   −
Decrypts '''data_in_buf''' using the private key imported with [[#DecryptImportPrivkForExpMod1]] and the supplied buffers '''param0_in_buf''' and '''param1_in_buf'''.
+
Decrypts '''data_in_buf''' using the private key imported with [[#DecryptImportPrivkForExpMod1]] and the supplied '''mod_in_buf''' and '''param0_in_buf'''.
    
Generates and returns a 16-byte key ('''key_z''').
 
Generates and returns a 16-byte key ('''key_z''').

Navigation menu