Foundations of Deepfakes