We are using Beaglebone Black (AM335x) based custom board, so for firmware upgrades of the board we will be using an encrypted firmware image.
As you would have already guessed, we will be using symmetric encryption to encrypt a large firmware file (fimware tar) and then encrypt the symmetric key with an asymmetric key. So we have two files which is to be given to the user for upgrading his board. Now we don't want to do that, we want to give only one file to user.
So we have to somehow combine the encrypted firmware image and the encrypted symmetric key.
I thought of two strategies, I will encrypting firmware using bash script,
- Tar encrypted firmware and encrypted symmetric key. But its very slow.
- Append encrypted symmetric key to the encrypted tar file. Don't feel this is a clean approach, isn't it?
Any suggestion on how to handle this in a fast and better way?
I have posted this question on Stack Overflow but thought this question could possibly also belongs to Information Security. Let me know if you don't feel its right.