def parse_PRIK(chunk, encryption_key):
decrypted = decode_aes256('<STR_LIT>',<EOL>encryption_key[:<NUM_LIT:16>],<EOL>decode_hex(chunk.payload),<EOL>encryption_key)<EOL>hex_key = re.match(br'<STR_LIT>', decrypted).group('<STR_LIT>')<EOL>rsa_key = RSA.importKey(decode_hex(hex_key))<EOL>rsa_key.dmp1 = rsa_key.d % (rsa_key.p - <NUM_LIT:1>)<EOL>rsa_key.dmq1 = rsa_key.d % (rsa_key.q - <NUM_LIT:1>)<EOL>rsa_key.iqmp = number.inverse(rsa_key.q, rsa_key.p)<EOL>return rsa_key<EOL>
Parse PRIK chunk which contains private RSA key