There is no cryptographic way to attest to the deletion of a key. Cryptography deals with mathematical properties of information. If someone knows the key, they have the key and that's that.
To have assurance that some information has been deleted, you need to use non-cryptographic means. The root of trust, i.e. the system that can provide the assurance you're looking for, needs to have several aspects:
- You need assurance that the root of trust is protected, so that what happens inside the root of trust stays inside the root of trust. This can rely partially on cryptographic means, for example if the root of trust stores data outside the protection zone in encrypted form, but there has to be a non-cryptographic means of protecting the data encryption key. The assurance comes from the manufacturing process of the root of trust.
- You need assurance from the root of trust that the information you're interested in was never shared with untrusted parties.
- You need assurance from the root of trust that it deleted all of its copies of the information you're interested in.
In the real world, the root of trust typically consists of multiple parts:
- The secure enclave hardware and firmware.
- The manufacturing, provisioning and delivery processes of the secure enclave.
- The software, running inside the enclave, that generates and later deletes $S$.
From the secure enclave manufacturer, you get a promise that the secure enclave preserves the integrity of the applications that it executes, and the integrity and confidentiality
of the data manipulated by the applications. Furthermore, the secure enclave contains a signature key which it uses to sign attestations, and you get the corresponding public key. An attestation is a promise about the state of the enclave, for example “Version 1.3 of ACMESecureKeyApp is installed”.
From the software manufacturer, you get a promise that the software doesn't share $S$ with anyone, and eventually deletes all copies of it. This promise is often delivered from an attestation coming from the software running in the enclave: the enclave sends a message “ACMESecureKeyApp 1.3 said ‘…’, signed, your secure enclave”, and ‘…’ is ‘I deleted $S$ securely’. You trust ‘I deleted $S$ securely’ because you trust the manufacturer of the software, and you trust “ACMESecureKeyApp 1.3 said ‘…’” because you trust the manufacturing and the chain of custody of the secure enclave.