def PrivateKeyDecryption(self, encryptedblob, iv, dbkey):
magicCmsIV = unhexlify('4adda22c79e82105')
plain = kcdecrypt(dbkey, magicCmsIV, encryptedblob)
if plain.__len__() == 0:
return ''
# now we handle the unwrapping. we need to take the first 32 bytes,
# and reverse them.
revplain = ''
for i in range(len(plain)):
revplain += plain[len(plain)-1 - i]
# now the real key gets found. */
plain = kcdecrypt(dbkey, iv, revplain)
#hexdump(plain)
Keyname = plain[:12] # Copied Buffer when user click on right and copy a key on Keychain Access
keyblob = plain[12:]
return Keyname, keyblob
## Documents : http://www.opensource.apple.com/source/securityd/securityd-55137.1/doc/BLOBFORMAT
评论列表
文章目录