I'm working on an IoT product that uses the cloud once finished. Each of these devices has a serial number, from which a key is derived. This key is then stored on the device itself and in the cloud. These two mechanisms are working flawlessly and are secure when I'm producing the devices by myself.
Since this is not really scalable, I want the devices to get produced in China for obvious reasons, but the thing is: I don't really trust the producers there.
Right now the key generation is on a PC from which I can read the serial with NFC and then generate the key. To have a PC in China for this isn't the best idea in my opinion. (Even encrypted etc.) As soon as someone has physical access to the computer, it isn't yours anymore.
Does anyone have tips how to secure such a process? In particular:
The key should be generated and stored on the device in a secure manner. The producer should not be able to alter the process.
The key should be transmitted automatically to the cloud. Is a normal TLS connection secure enough or any other suggestions?
Or maybe someone has general advice in best practices for a secure supply chain.