Now the thing I don't understand completely is that the random seed should be generated with a crypto-safe random generator, but can be uploaded in plaintext to the remote device. Is that true?
Yes. The salt is used to make sure that you do not generate the same device key twice. The session key however still depends on the master key, so an attacker cannot generate the device key.
So the device keys will be unique and secure. The random number generator needs to be secure to assure the uniqueness. You'll need to extract a relatively large salt for that (say, 128 bits or 16 bytes for as good as complete uniqueness or 64 bits in case you like playing on the edge) for that as well.
Using a device-specific unique identifier is more common. The advantage of a (large enough) salt is however that you do not need state. You cannot by - accident or otherwise - use a the identifier for two or more devices. Usually the salt is used in addition to other derivation data, if used at all.
And is that because from a cryptanalysis point of view, using a deterministic random seed would leak information about the masterkeys?
No, no matter what, a KDF should never leak information about the master keys. This is why KDF's are generally either build on a block cipher - which of course protects the key - or a one-way hash functions / HMAC.
- I would use the word "salt" instead of "seed" here. If used at all when talking about KDF's, the seed is generally the input seed or key, not the salt or any other derivation data.
- The HKDF RFC has a nice section on the use of a salt.
- It is strongly recommended - I would even say required - to authenticate the device keys after derivation as an attacker could otherwise distort the salt value or set it to a constant value; for this generate a MAC authentication tag over data known by both parties and return it to the server, which can then verify the data.
- Often multiple keys are required. Unless those keys rely on additional transmitted data you can use just the one key to authenticate the device; usually that's a MAC key or - even better - a separate key. Creating a set of device keys takes additional key derivation data, generally an ASCII label such as
"AUTH" or a number