Introduction
A .key file is a presentation from
Apple Keynote, which Apple released in 2003
and later made part of its iWork suite. Apple has never published the format, so
presentations are usually exported to PPTX
or PDF to share them with people who do
not use Keynote.
The extension .key is also widely used for cryptographic key files.
Structure
Since the 2013 versions of iWork, a Keynote presentation is a ZIP archive (or a macOS
package folder) holding an Index folder of .iwa files, a
Data folder of pictures, movies and sounds, a Metadata folder
and preview images, the same layout as Apple
Pages and Numbers documents. IWA files
hold Protocol Buffers messages compressed with a variant of Snappy framing. Versions
before 2013 stored the presentation as XML. In the package (folder) form the
.iwa files are kept inside a file Index.zip rather than an
Index folder.
The package and encryption page
covers the files of a presentation and its password encryption; the
IWA archives page the chunk framing,
Snappy compression and the object stream. The fields of the messages, as recovered
from Keynote 6.0, are on document
messages (the document root, show, theme, persistence and style sheets),
slides, builds and transitions,
text and styles and
drawables, and every type number
on message type numbers. Tables,
formulas and
charts are described field by field,
and so are the undo commands:
Keynote, text and drawing commands,
table commands and
chart commands. Apple has published no specification of the current format. For the earlier
XML formats Apple published a description only of Keynote 1.x’s
presentation.apxl (Technical Notes 2067 and 2073, the second dated May
2003) and, in 2005, an iWork Programming Guide on the Keynote 2 and Pages 1 formats,
whose announcement (Technical Q&A QA1412) said the complete Keynote XML schema
would not be made public. No copy of that guide, and no Apple description of the
iWork ’09 XML format, was found. None of the XML formats is described here.
Not described
Known, not yet covered
- Viewer: the explorer has no Keynote viewer; a
.keyfile shows as a ZIP archive and its IWA files as raw bytes. The Snappy framing, the archive and message headers and every message are described on the IWA archives, document messages and slides pages, so a viewer can be built.
Unknown
- Reference: every message or field Apple added after Keynote 6.0 (2013). The only public definitions are those recovered from that version, and no later ones were found. Viewer: such data would show as an unknown field with its number.
- Reference: how cells are packed in a table tile, the packed cell and size numbers, and the function table of the formula engine, on the tables and formulas pages.
- Reference: the names of enumeration values, the property names
and the integer codes that the recovered definitions leave unnamed, such as the
propertystrings,directionscodes and build effect names of the undo commands. - Reference: the XML formats of Keynote 1 to iWork ’09 beyond Apple’s 1.x description; no copy of the 2005 iWork Programming Guide was found.
Also used for
- PEM private key – Keys and certificates as base64 text between BEGIN and END lines.
Links
Software
- Apple Keynote – Apple’s presentation program, which makes the format (macOS, iOS, web through iCloud)
- LibreOffice Impress – free office suite’s presentation program, which imports some Keynote presentations (Windows, macOS, Linux)
Reference
- iWorkFileFormat – a reverse-engineered description of the IWA format, with the message definitions and type numbers recovered from Keynote 6.0
- Deconstructing a Keynote 1.x Document (TN2073) – Apple’s technical note on the Keynote 1.x XML format, presentation.apxl
- Technical Q&A QA1412 – Apple’s 2005 note on reading and writing Keynote 2 documents