@stefanoStefano Marinelli
Interesting document. Thanks!
I'm not enough understanding sleep / hibernation on ACPI, but if BIOS / firmware just attempts to start the OS just as regular cold boots and restoring memory image from hibernation partition / file / swap is fully on the OS side only, restoring from encrypted image would sanely work, if the OS supports it (AFAIK, FreeBSD does NOT yet support hibernation).
But if the restoration in on BIOS / firmware side like done on APM era, restoring from encrypted hibernation partition / file / swap would likely to fail, unless the mechanisms are enough standardized and implemented in both side.
On APM era, where to hibernate was on BIOS and ThinkPads I've used at the era required dedicated hibernation partition and it could not be in DOS-Extended partitions (required one in four partition to be dedicated). Some BIOS'es seem to require swap file that is in any partition the BIOS can sanely access and formatted in anything the BIOS can read / write, and at least in some cases, the swap file should not be fragmented.
AFAIK, things were done unattended to running OS and the OS would be surprized that RTC is suddenly advanced a lot (it would allow OS to notice that hibernation is done, possibly some APM status were provided, though).
Any OS supporting hibernation needed to notice the fact it was restored from hibernation and re-initialize anything the BIOS does NOT care. Without it, the OS couldn't be hiernated.