Login
You're viewing the clockwork.monster public feed.
  • Jul 6, 2024, 5:03 AM

    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:

    💬 1🔄 0⭐ 0

Replies