I want to do generate individual AES keys for a number of smart cards, based on a random master key (key diversification) and the serial number of the card.
According to the answers to this question HKDF is the/one way to go.
HKDF has three inputs, ikm
, salt
and info
. Feeding in the serial number as part of ikm
seems to be incorrect usage (and maybe dangerous because it makes the IKM less random?). That leaves salt
and info
, which one should I use?
salt
because differentinfo
might not lead to different output keys, is that what you mean? – AndreKR Mar 06 '19 at 20:43info
parameter may be used to prevent the derivation of the same keying material for different contexts, by making sure that each key derived from the same IKM is derived with a differentinfo
. – Ilmari Karonen Mar 06 '19 at 20:49