Earlier quoted context omitted.
Where? Can you show me the code?
YouTube uses encrypted signatures as a way of hiding the URL of the video. https://github.com/l1ving/youtube-dl/blob/master/youtube_dl/...
EDIT: And not to forget that Youtube hosts many CC-BY licensed videos which explicitly allow unlimited use (incl. decryption if necessary), and that Youtube has contracts with copyright collectives in most countries so for any user it is save to assume that the video is legally uploaded (and thus download and store for personal use is legal in most countries).