Map<String, byte[]getPersistentMap()

Returns a persistent key-value store where string keys can be mapped to byte values. Use this MutableMap to securely store data that needs to be available across enclave restarts.

The entire map is serialised and encrypted after each receiveMail and receiveFromUntrustedHost call and is given to the host to persist. On restart the host is required to use the latest version of the map to re-initialise the enclave. Conclave makes a best-effort attempt at preventing the host from being able to rewind map, i.e. using an older version instead of the latest.

The persistent map is not enabled by default. This is done by setting the enablePersistentMap configuration in the enclave's build.gradle to true. The map is also not available if the enclave is multi-threaded (i.e. threadSafe is overridden to return true). Support for this maybe added in a future version.

Note, the keys are encoded using UTF-8 and the encoded size of each key cannot be more than 65535 bytes.


If the persistent map is not enabled.