Zachyy wrote:
Your iPhone’s passcode cannot be entered remotely as it is stored locally.
The passcode is not stored locally, or stored at all.
The passcode is used as a decryption key.
In the case of typical Apple security designs, the password or passcode typically decrypts a “keybag” containing the robustly-created data encryption and decryption keys, and the robust keys are used to access the data.
This “keybag” design allows the password or passcode to be easily changed without requiring the entire device to be decrypted and then re-encrypted whenever the password or passcode is changed.
In general, the password or passcode itself is not stored, or the password or passcode is hashed*, and the hash value then stored and compared. Outside of specific tools such as password managers, configurations with robust security seldom store cleartext passwords.
For this case, and given there is no passcode stored anywhere, the keybags cannot be decrypted, so the user data protected by those key bags cannot be decrypted. And there is no changing the passcode short of a reset.
Details start around page 100: https://help.apple.com/pdf/security/en_US/apple-platform-security-guide.pdf
*Password hashes are deliberately slow and resource-intensive algorithms, designed to make repeated guessing tedious and expensive, and to be exceedingly difficult to reverse back to the original password or passcode input.