0

I know that I can "encrypt" a pdf file using pdftk and the following command: pdftk mydoc.pdf output mydoc.128.pdf owner_pw foopass. This I find disables printing. There are other options available that allow for low quality printing etc.

However, I'd like to encrypt a pdf in such a way that after say, 14 days, it cannot be opened anymore without a password -- a timed encryption, if you will, with unix command line tools or some script that would do the trick for me.

Any comments? Suggestions?

I am doing this because I teach an undergraduate class and am required to upload homework problems and solutions. I believe students create dossiers out of such pdfs for future students to use and cheat. No, I cannot print pages and then share it with them.

dearN
  • 1,256
  • 4
  • 19
  • 40
  • How could this possibly work? Even if you use a remote service under your control that hands out the encryption key only until its expiration, as long as the user obtained the key once they could just save it. – Celada Jan 21 '13 at 00:20
  • @Celada I'd like to encrypt a file like a "time bomb". It doesn't need a password to open UNTIL the end of a period of time. If you notice, encrypted files with `pdftk` don't always need passwords to OPEN. They need to be decrypted with the password to print or what not. – dearN Jan 21 '13 at 00:23
  • If it doesn't need a password or key or some kind of secret to open then... well... it's not encrypted, or else it's encrypted with a well known key (which is ineffective). I am assuming that users have the opportunity to obtain and open the document before the timer expires. So I still don't get it. – Celada Jan 21 '13 at 00:28
  • @Celada Well students don't print all these pdfs out to make their dossiers for their fraternities and sororities until finals week or after. By then I would like the encryption to kick in. Does that makes things clear? `:D` – dearN Jan 21 '13 at 00:30
  • Many departments make assignments and exams available, along with complete solutions. If the questions are non-trivially different, doesn't these dossiers just turn into big study banks? – mfanto Jan 21 '13 at 00:39
  • They are never non-trivially different in my university... its unfortunate that all the other faculty use and re-use stuff from previous years. I'd like to help this with security for trivally different question paperes. – dearN Jan 21 '13 at 00:41
  • I guess it was downvoted (I didn't downvote it however) because it seems you do not really try to understand the other persons views (the engineering view). – Thomas Mueller Jan 23 '13 at 14:19

1 Answers1

3

PDF flags such as "no printing" are "enforced" by a conforming viewer, there are a variety of viewers that will, or can trivially be made to, ignore them (especially since the format is documented).

PDF native features are not a great way to do this, though you might be able to get part way there by using X.509 encrypted PDFs, and short certificate lifetimes, there are still obvious holes in this plan. X.509 signing or encrypting is not supported by pdftk though.

These cover most of the options:

The latter links to a commercial solution to your problem.

Community
  • 1
  • 1
mr.spuratic
  • 9,767
  • 3
  • 34
  • 24
  • Ok, so I suppose I can't have a time limit on my pdf. `shrugs` I guess theres nothing I can do except let this question bank development continue. If our future lies in the hands of `these` kids, we are doomed. – dearN Jan 21 '13 at 00:35