in maint, if you encrypt with org-crypt on an entry with children, then demote, then decrypt, the subtree levels do not match up. for example, the children can end up as uncle/aunt nodes.
maybe something like these are possibilities: 1) optionally adjust subtree levels to match the location of the header at time of decryption. this is similar to how org-yank behaves. it would have to re-encrypt if you encrypt, demote, decrypt, encrypt. 2) optionally put the subtree in an org source block so that it is no longer an active subtree (can't search headlines in agenda, they are not where they belong, can't export as part of parent, have to edit with c-c ') 3) restrict the function to only operate on body text (can't do subtrees). 4) status quo (allow outline corruption at user's risk). 5) a combination. maybe there are more possibilities. comments? samuel