# How to extract MAC and AES keys using x9.63 based kdf

For trying ECIES, I need to derive keys for MAC and AES from the shared secret using ANSI x9.63 based KDF. The information on key derivation I got it from Section 3.6.1 of http://www.secg.org/sec1-v2.pdf.

What is the standard procedure to extract/separate the keys for MAC and AES from the Key derived using KDF?

In the end, it depends on the parameters enckeylen and mackeylen, which define the sizes of the keys for the symmetric encryption and the MAC, respectively.