There is a reasonable description of this available at https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt and https://www.cs.cmu.edu/~dst/Adobe/Gallery/ Some further details are available at https://github.com/pdfcpu/pdfcpu