In which part of iOS is the auto-erase feature implemented and how does it work? I followed the Apple vs FBI case a bit, and I'm super curious how Apple implemented the auto-erase feature. Reading their documentation, it seems like it is as simple as erasing a key that is used to encrypt all the data. Is it actually a microkernel or something?
When a wipe occurs, the file system key is deleted. It's as simple as that.

Page 11 of the September 2015 iOS Security White Paper states that the file system key is stored in NAND.


  The metadata of all files in the file system is encrypted with a random key, which is created when iOS is first installed or when the device is wiped by a user. The file system key is stored in Effaceable Storage.





  Effaceable Storage: A dedicated area of NAND storage, used to store cryptographic keys, that can be addressed directly and wiped securely. While it doesn’t provide protection if an attacker has physical 
  possession of a device, keys held in Effaceable Storage can be used as part of a key hierarchy to facilitate fast wipe and forward security.