The single DES keys are commonly just split in three keys, where the first key is used for the first encryption of the message block itself, the second one for the decryption of the previous result and the third one for encryption of the decryption result.
So basically you'd have: $\newcommand{Enc}{\operatorname{Enc}}\newcommand{Dec}{\operatorname{Dec}}$
$$\Enc'_{(k_1, k_2, k_3)} \equiv \Enc_{k_3}(\Dec_{k_2}(\Enc_{k_1}(m)))$$
and of course
$$\Dec'_{(k_1, k_2, k_3)} \equiv \Dec_{k_1}(\Enc_{k_2}(\Dec_{k_3}(m)))$$
where $\Enc'$ and $\Dec'$ are the encryption and decryption operations of TDEA, commonly called triple DES or DES EDE after the order of encryption / decryption. Note that of course the inner functions are performed first, i.e. the functions are executed from right to left.
In pseudo code the encryption function:
c1 = DES_encrypt(k1, m)
c2 = DES_decrypt(k2, c1)
c3 = DES_encrypt(k3, c2)
c = c3;
The keys are defined as separate keys, but most - if not all - libraries simply take the concatenation $k = k_1 \| k_2 \| k_3$ as key input.
So in your case your keys would be k1 = 0123456789ABCDEF
, k2 = FEDCBA9876543210
and k3 = 89ABCDEF01234567
(which have the parity bits correctly set).
Most if not all libraries only accept the keys including parity bits. Most libraries do not check the validity of the parity bit, but there may be some that do. The bits commonly do need to be present though; a single DES key can usually not be represented by just 7 bytes.
Note that the least significant bit of a byte is the parity bit over that byte, which should be odd number of set (or indeed unset) bits in the byte. So both 00
and 01
would be equivalent byte values within the key, with 01
having correct parity. This means that each triple DES key with correct parity has $2 ^ {192 / 8} - 1 = 2^{24} - 1 = 16,777,215$ fully equivalent keys.
Sometimes key generators do act on the effective key size excluding parity bits, so you'd have a function such as $k = \operatorname{Gen}(168)$ to create a triple DES key rather than $k = \operatorname{Gen}(192)$, even though the output is 192 bits / 24 bytes in size.
For 2-key triple DES keys you'd have $k_3 = k_1$, so the key would be $k = k_1 \| k_2$ to get:
$$\Enc'_{(k_1, k_2)} \equiv \Enc_{k_1}(\Dec_{k_2}(\Enc_{k_1}(m)))$$
and to simulate single DES where only triple DES is available:
$$\Enc'_{k} \equiv \Enc_{k}(\Dec_{k}(\Enc_{k}(m)))$$
I'll spare you the decryption functions and pseudo code.
Neither 2 key triple DES or single DES is considered secure anymore, while triple DES still offers some security.
Sometimes the keys are lettered instead of numbered, in that case $k_A = k_1$, $k_B = k_2$ and $k_C = k_3$. So the concatenation of three keys is sometimes also called an ABC key, and the concatenation of two keys an ABA key.
If you don't want to deal with all this "complexity" then use AES instead, which has much better properties and speed compared to triple DES. A fast stream cipher such as ChaCha20 could also be considered.