Let's say we choose AES as cryptographic algorithm for IPsec. My question is the following
Is the key produced by Diffie-Hellman algorithm used as INPUT to the AES algorithm so AES does the encryption with it?
Is the key produced by Diffie-Hellman algorithm used as INPUT to the AES algorithm so AES does the encryption with it?
Well, it depends on how the keys used by IPsec are generated; the IPsec RFC (RFC 4301) does not specify it, and there are several methods used in practice.
The most common method is with IKE (RFC 7296); that does perform a Diffie-Hellman between the two parties, and the result of that is used (along with other data) to generate the AES keys (through a number of steps).