This is a PoC using youtube audio to encrypt text/files. It uses AES-256. How it's done:
- Download MP4 audio stream from a YouTube link.
- MP4 audio is converted to WAV.
- WAV is processed through FFT to extract audio frequencies.
- Frequencies are mapped to musical notes.
- These notes are used as the passphrase for AES encryption.
- That's all folks 😎
In addition to this, I created some audio splitting mechanism that allows you to trim it, improving the security.
Assure that you have python3 installed on your system.
#Clone this repo
git clone https://github.com/nicomda/AESTube.git
#Install if not installed
pip3 install virtualenv
#Creating virtualenv
python3 -m venv AESTube
#Activating venv
source ./bin/activate
#Installing required libraries in the virtual enviroment (FFMpeg, pyaudio...)
cd AESTube
sudo chmod +x dependencies-installer.sh
./dependencies-installer.sh
pip3 install -r requirements.txt
#Must update pytube as shown to get it working
pip3 install git+https://github.com/nficano/pytube.git --upgrade
#To encrypt text:
./AESTube.py -e -t 'text_to_encrypt' -l 'YoutubeLink' -s 'start_seconds' 'end_seconds'
#To decrypt files:
./AESTube.py -e -t 'filepath' -l 'YoutubeLink' -s 'start_seconds' 'end_seconds'
Argument | What it does | Optional |
---|---|---|
-e | Encrypt mode | |
-d | Decrypt mode | |
-t | String data | |
-f <file_to_encrypt> | File to encrypt | |
-l, --yt_link= 'Youtube link' | Audio that will be used to get passphrase | |
-s | Splitted mode. Will get just a part of the audio. If used, you must set start_time and end_time args | ✔ |
--start_time= | Start of the split in seconds | ✔ |
--end_time= | Start of the split in seconds | ✔ |
-o, --output_path= | Path where output will be created | On progress |
-a | Interactive mode (Will ask for options) | ✔ |