1 The Kerberos Credential Cache Binary File Format
2 Copyright (C) 2006 Simon Josefsson <simon josefsson.org>
3 http://josefsson.org/shishi/ccache.txt
4 Last updated: Sat Sep 23 12:04:11 CEST 2006
6 Like the MIT keytab binary format (see Michael B Allen's reverse
7 engineered description in keytab.txt), the credential cache format is
8 not standard nor documented anywhere.
10 In C style notation, the MIT credential cache file format is as
11 follows. All values are in network byte order. All text is ASCII.
14 uint16_t file_format_version; /* 0x0504 */
15 uint16_t headerlen; /* only if version is 0x0504 */
16 header headers[]; /* only if version is 0x0504 */
17 principal primary_principal;
18 credential credentials[*];
22 uint16_t tag; /* 1 = DeltaTime */
24 uint8_t tagdata[taglen]
27 The ccache.taglen and ccache.tags fields are only present in 0x0504
28 versions, not in earlier. Both MIT and Heimdal appear to correctly
29 ignore unknown tags, so it appears safe to add them (although there is
30 no central place to "register" tags).
32 Currently only one tag is widely implemented, DeltaTime (0x0001). Its
33 taglen is always 8, and tagdata will contain:
40 After reading the file_format_version, header tags, and default
41 principal, a list of credentials follow. You deduce from the file
42 length when there are no more credentials.
49 uint8_t is_skey; /* 1 if skey, 0 otherwise */
50 uint32_t tktflags; /* stored in reversed byte order */
52 address addrs[num_address];
53 uint32_t num_authdata;
54 authdata authdata[num_authdata];
55 countet_octet_string ticket;
56 countet_octet_string second_ticket;
61 uint16_t etype; /* only present if version 0x0503 */
63 uint8_t keyvalue[keylen];
75 counted_octet_string addrdata;
80 counted_octet_string authdata;
84 uint32_t name_type; /* not present if version 0x0501 */
85 uint32_t num_components; /* sub 1 if version 0x501 */
86 counted_octet_string realm;
87 counted_octet_string components[num_components];
90 counted_octet_string {
95 Permission to copy, modify, and distribute this document, with or
96 without modification, for any purpose and without fee or royalty is
97 hereby granted, provided that you include this copyright notice in ALL
98 copies of the document or portions thereof, including modifications.