I've been thinking of ways to be able to wipe or try the SSD drive. I've been recommending to people who need real opsec this device called USBKill - https://usbkill.com/products/usbkill-v4. You stick it in a random USB port and it will fry the circuitry on the whole computer. But I was reading the documentation and saw the following:
>>>When testing computer hardware, is data affected?
>>>When tested on computers, the device is not designed or intended to erase >>>data. However, depending on the hardware >configuration (SSD vs Platter >>>HDD), the drive controllers may be damaged to the point that data retrieval >>>is impractical.
>>>But, BlackBlaze: https://www.backblaze.com/blog/how-to-securely-recycle-or->>dispose-of-your-ssd/ (an online cloud storage company) recommends encrypting >>>the SSD with a random key and then formatting it.
>>>Maybe you could borrow some code from VeryCrypt - >>>https://www.veracrypt.fr/code/VeraCrypt/ to encrypt the HDD, use a PSNG to >>>generate the password to encrypt the drive, and then run a full format on it.
If VeraCrypt is too complicated of a project to implement, you could just use the source code for
TwoFish: https://www.schneier.com/academic/twofish/download/
AES: https://github.com/zakird/zdlibc/blob/master/rijndael-alg-fst.c
Serpent: https://github.com/Chronic-Dev/libgcrypt/blob/master/cipher/serpent.c
Camellia: https://www.oryx-embedded.com/doc/camellia_8c_source.html
Kuznyechik: https://web.archive.org/web/20180406230057/https://fossies.org/windows/misc/VeraCrypt_1.22_Source.zip/src/Crypto/kuznyechik.c
Note that some of these are the original versions of the encryption schematic and you might have to look around for the updated and patched versions. But, it really shouldn't matter since you're just using them as a quick encryption method, and then formatting the drive.
Posted for project https://github.com/PartialVolume/shredos.x86_64 shreddox.x86_64