r/howdidtheycodeit • u/Suspicious-Engineer7 • Apr 10 '22
Question How does the Apple TV desktop app prevent screen sharing?
16
Upvotes
r/howdidtheycodeit • u/Suspicious-Engineer7 • Apr 10 '22
32
u/nvec ProProgrammer Apr 10 '22
This type of feature is normally done by what's known as a protected path, this is a feature of GPU drivers (and other hardware) where they enter a mode where they do everything they can in order to prevent copying. This includes taking an encrypted video stream into the GPU, preventing any other applications accessing the decrypted portions of GPU memory they're using (so screen sharing won't work as it can't read the framebuffer the video has been rendered to), and also enabling the copy protection built into the HDMI/DVI/DP connection to the monitor to ensure that's not a device capable of copying too.
The implementation for this involves a lot of technicalities, cryptography, all backed up with legal contracts- nVidia could build a GPU which claims to support this and doesn't, but they'd be attacked by lawyers from everyone who uses the feature.
Some details about the Microsoft implementation of this inside DirectX Video is here, but it's not an easy read. One point though is the diagram in the introduction- note how the software driver is exchanging crypto keys with the kernel-mode driver and so the data isn't decrypted as it passes through DirectX and user-space levels- this means nothing outside of the OS kernel (ie. Windows itself) can access this data, and as any screen-sharing will be in userspace they can't do anything.
0
u/[deleted] Apr 10 '22
[deleted] — view deleted comment