iOS encryption key derivation (from PIN code)

iOS has recently requested me to confirm my PIN code which is used to encrypt my data. If the PIN code is used to derivate the encryption key I find this weird since most PINs are a 4 or 6 digit number. Therefore that would make only 10^4 to 10^6 possible keys. I guess the PIN must be salted, yet if an attacker knows what is used to salt, it's still only 10^6 possibilities and therefore something very easy to bruteforce if a way is found to extract the encrypted data out of the device (or iCloud). Can someone explain how Apple derivates the key from the PIN while still being at the top of encryption "Art"? Thank you.

iOS encryption key derivation (from PIN code)

iOS has recently requested me to confirm my PIN code which is used to encrypt my data.

If the PIN code is used to derivate the encryption key I find this weird since most PINs are a 4 or 6 digit number. Therefore that would make only 10^4 to 10^6 possible keys. I guess the PIN must be salted, yet if an attacker knows what is used to salt, it's still only 10^6 possibilities and therefore something very easy to bruteforce if a way is found to extract the encrypted data out of the device (or iCloud).

Can someone explain how Apple derivates the key from the PIN while still being at the top of encryption "Art"?

Thank you.