The encryption algorithm for Private and CharStrings dictionaries used in type 1 font,
unsigned short int r;
unsigned short int c1 = 52845;
unsigned short int c2 = 22719;
unsigned char Decrypt(cipher)
unsigned char cipher;
{
unsigned char plain;
plain = (cipher ^ (r>>8));
r = (cipher + r) * c1 + c2;
return plain;
}
the Type 1 Spec states,
This layer of encryption is intended to protect some ofthe hint information in thePrivate dictionary from casual inspection
Could you explain what is casual inspection and why adobe design the enryption algorithm as it is now?
Thanks very much.
Casual encryption in this case is anything not involving serious cryptanalysis. Note that all inputs of
Decryptare linear (albeit in a modulo ring), and would be fairly easy to decrypt for someone versed in cryptanalysis. However, many people are not, the data are probably not worth real encryption, and the encryption and decryption is computationally easy and cheap.