An embedded device with Linux supports backup/restore of files encrypted with openssl. The idea of backup is: tar -c .... | openssl smime -encrypt -binary -aes-256-cbc -out backupfile.encrypted -outform DER certificate.key
and the idea of restore is: openssl smime -decrypt -binary -in backupfile.encrypted -inform DER -inkey private.key -passin file:password.txt | tar -x
Does this idea make sense? Because the good thing is: the backup file is encrypted. The bad thing is: The device contains both, the certificate and the private key. (The file password.txt
is provided by temporarily decrypting it from file password.encrypted
with a public key.)
Is there another approach of supporting a backup/restore feature on such devices which provides more security?