What is Apple's MobileAsset? What are mesu, pallas, gdmf?
I got tired of this knowledge being passed from person to person instead of being documented properly.
Now I can finally say, here read this: https://theapplewiki.com/wiki/MobileAsset
What is Apple's MobileAsset? What are mesu, pallas, gdmf?
I got tired of this knowledge being passed from person to person instead of being documented properly.
Now I can finally say, here read this: https://theapplewiki.com/wiki/MobileAsset
The details about Pallas are complex so I'll probably put that in a separate page.
I just reverse engineered (with no practical purpose) how the Signature is calculated in Apple's mesu plists. It's so cursed. They have a totally custom way to encode and hash the plist, before feeding it into RSA.
Hashing a string is sha1(string.toUTF8() + "\0"). Hashing an array consists of hash("array") xor hash(a[0]) xor hash(a[1]) ... xor hash(a[n-1]). Hashing integers works differently for the range [-1, 12]. Why?!
The handling of UTF-8 strings is quite broken (they allocate n bytes to hold n UTF-8 characters) but they can't fix it without breaking compatibility. I had to reimplement the brokenness too :blobcatumm: