Where is the keytab file format defined? I think lib/keytab/file needs to have some byte-swapping code added.