8900 File Format

From The iPhone Wiki
Revision as of 23:19, 27 July 2008 by Geohot (talk | contribs)
Jump to: navigation, search

This is the file format used by the S5L8900

Header

typedef struct {
 uchar  magic[4];              // string "8900"
 uchar  version[3];            // string "1.0"
 uint8  format;                // plaintext format is 0x4, encrypted with GID-key format is 0x3, boot plaintext is 0x2, boot encrypted with UID-key is 0x1.
 uint32 unknown1;
 uint32 sizeOfData;            // size of data (ie, filesize - header(0x800) - footer signature(0x80) - footer certificate(0xC0A))
 uint32 footerSignatureOffset; // offset to footer signature 
 uint32 footerCertOffset;      // offset to footer certificate, from end of header (0x800)
 uint32 footerCertLen;
 uchar  salt[0x20];            // a seemingly random salt (an awfully big one though... needs more attention)
 uint16 unknown2;
 uint16 epoch;                 // the security epoch of the file
 uchar  headerSignature[0x10]; // encrypt(sha1(header[0:0x40])[0:0x10], key_0x837, zero_iv)
 uchar  padding[0x7B0];
} Apple8900Header;

Resources

The dev team's wiki page on the topic