6. A computer-implemented method comprising: receiving, by a computing device processor, an electronic document including a plurality of content items, a rule, a first digest, and a digital signature of a document author, wherein the rule identifies a first subset of the content items that are invariant to operations authorized by the rule; generating a second digest for the electronic document by digesting the first subset of content items that are invariant to operations authorized by the rule, wherein content items that are modifiable pursuant to the rule are not considered in generating the second digest; after determining that the first and second digests are identical, (a) receiving input attempting to create a new state of the electronic document, (b) determining whether the input is allowed by the rule, and (c) invalidating the digital signature of the document author if the input is not allowed by the rule; and restricting access to the electronic document in response to detecting the invalidated digital signature.
10. The method of claim 6 , wherein: the rule specifies a particular content type; and content items associated with the particular content type are not considered in generating the second digest.