FrankStore - CLI¶
This section of the guide will be focusing on the CLI component of FrankStore. Both the CLI and GUI are two seperate programs, the CLI can run independently, however, the GUI requires the CLI to function.
Installing¶
Currently, installation binaries are provided only for Windows (x64), we may soon look at deploying packages accross the major platforms. If you are on MacOS or Linux we kindly request you follow the Compiling instructions.
Windows¶
The lastest windows installation is available on GitHub here, please note the installation provides both the CLI and GUI including their retrospective requirements.
HOWEVER, you still need to install ImageMagick, the download is available here. You will require the installer with the following description: “Win64 dynamic at 16 bits-per-pixel component”. At the time of writing the file name for that description is (ImageMagick-7.0.10-11-Q16-x64-dll.exe
)
Close any open command prompts (to reset path variable) and run FrankStore
into cmd.
Compiling¶
Compiling instructions for FrankStore are below, for this guide we will be using Ubuntu (x64), Windows 10 (x64), and MacOS (x64).
Linux - Ubuntu¶
Follow the sections below to compile FrankStore on Ubuntu.
Basic Compiler¶
sudo apt update && sudo apt upgrade
sudo apt install build-essential cmake git pkg-config wget
Exiv2 and OpenSSL¶
sudo apt update && sudo apt upgrade
sudo apt install libexiv2-dev libssl-dev
Compile ImageMagick¶
wget https://imagemagick.org/download/ImageMagick.tar.gz
tar -xvzf ImageMagick.tar.gz
cd ImageMagick-(version)
./configure
make && make check
sudo make install
sudo ldconfig /usr/local/lib
cd .. && rm -rf ImageMagick*
Compile Libsodium¶
wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
tar -xvzf LATEST.tar.gz
cd libsodium-stable
./configure
make && make check
sudo make install
cd .. && rm -rf libsodium-stable
rm -f LATEST.tar.gz
Compile FrankStore¶
git clone https://github.com/thomasjcf29/FrankStore.git
cd FrankStore/Program
cmake .
cmake --build . --config Release
Test FrankStore works with a simple ./FrankStore
MacOS¶
Follow the sections below to compile FrankStore on MacOS.
Basic Compiler¶
- Open a terminal and type
g++
, if a popup asks you to install, press yes. - Install CMake (x64) from CMakes website.
- After install, run this command to set cmake up for terminal
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
Homebrew¶
Homebrew is a third-party package manager for MacOS, we will be using this to install the relevant dependencies. Open a terminal and run these commands.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew update
Follow the one screen guidance.
Dependencies¶
brew install pkg-config libsodium exiv2 openssl wget
ln -s /usr/local/opt/openssl@1.1/lib/pkgconfig/* /usr/local/lib/pkgconfig/
Compile ImageMagick¶
wget https://imagemagick.org/download/ImageMagick.tar.gz
tar -xvzf ImageMagick.tar.gz
cd ImageMagick-(version)
./configure
make && make check
sudo make install
sudo ldconfig /usr/local/lib
cd .. && rm -rf ImageMagick*
Compile FrankStore¶
git clone https://github.com/thomasjcf29/FrankStore.git
cd FrankStore/Program
cmake .
cmake --build . --config Release
Test FrankStore works with a simple ./FrankStore
Windows¶
Follow the sections below to compile FrankStore on Windows.
Basic Compiler¶
- Install Visual Studio 2019 Community from here.
- After installing Visual Studio Installer, select
Desktop development with C++
in the visual studio installer. - Install CMake (x64) from CMakes website.
- Install GIT tools from there.
Close any command prompts or powershell windows you have open, to reset your path environment.
VCPKG¶
VCPKG is a package manage for visual studio, it allows you to easily install the packages required for FrankStore to compile.
!!DO THIS IN A POWERSHELL WINDOW!!
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
LibSodium, Exiv2, OpenSSL¶
!!DO THIS IN A POWERSHELL WINDOW!!
cd vcpkg
.\vcpkg install libsodium:x64-windows
.\vcpkg install exiv2:x64-windows
.\vcpkg install libressl:x64-windows
ImageMagick¶
Make sure to install the ImageMagick version with the description of Win64 dynamic at 16 bits-per-pixel component
.
- Download ImageMagick.
- Install ImageMagick, make sure to tick the box for C/C++ Development Headers.
Compile FrankStore¶
Close any command prompts or powershell windows you have open, to reset your path environment.
git clone https://github.com/thomasjcf29/FrankStore.git
cd FrankStore\Program
cmake .
cmake --build . --config Release
Test it works by runnning Release\FrankStore.exe
.
Encryption¶
FrankStore provides built in encryption technologies using AES-256-CBC, you can encrypt files using a key either provided by you (like a password) and/or from EXIF data provided from an image. This information is then turned into a key using PBKDF2, a Key Deriviation Function. The IV (16 bytes) is secure random generated using the Libsodium library and written / read from the file during encryption / decryption. It is recommended to encrypt a file before encoding it for the extra security associated with it.
Encrypting Files¶
Command Usage¶
There are multiple ways of encrypting a file within FrankStore all provide the same result (an encrypted file). Some are more secure than others due to the fact they take the password in a way the terminal shouldn’t save.
Examples of valid commands are below.
Secure:
FrankStore encrypt <fileToRead> <fileToOutput>
FrankStore encrypt <fileToRead> <fileToOutput> image <imageFile>
FrankStore encrypt <fileToRead> <fileToOutput> password image <imageFile>
Insecure:
FrankStore encrypt <fileToRead> <fileToOutput> password <password>
FrankStore encrypt <fileToRead> <fileToOutput> password <password> image <imageFile>
Please note, that whilst we deem passing image locations in to be secure, we recommended you delete / move the image location so other people cannot access the original files location.
Decrypting Files¶
Command Usage¶
There are multiple ways of decrypting a file within FrankStore all provide the same result (an decrypted file). Some are more secure than others due to the fact they take the password in a way the terminal shouldn’t save.
Examples of valid commands are below.
Secure:
FrankStore decrypt <fileToRead> <fileToOutput>
FrankStore decrypt <fileToRead> <fileToOutput> image <imageFile>
FrankStore decrypt <fileToRead> <fileToOutput> password image <imageFile>
Insecure:
FrankStore decrypt <fileToRead> <fileToOutput> password <password>
FrankStore decrypt <fileToRead> <fileToOutput> password <password> image <imageFile>
Please note, that whilst we deem passing image locations in to be secure, we recommended you delete / move the image location so other people cannot access the original files location.
Steganography¶
FrankStore is designed to hide data in a way which means it is hard to prove that there is data even there. FrankStore does by using a cover image, it takes data from this CoverImage and uses it to hide the data into a new file or image depending on your chosen preferred outcome. They both output the same type of data (same algorithm) one just gives you a visual aesthetic to look at and takes a slight bit longer.
Encoding Files¶
Command Usage¶
There are two ways of outputting an encoded file, either as an image or as a file, as explained above the algorithm is the same no matter the output type.
FrankStore encode <coverImage> <fileToEncode> <outputFile> image
FrankStore encode <coverImage> <fileToEncode> <outputFile> file
We recommend you to output as a .PNG file, we currently have not tested any other type of image.
Decoding Files¶
Command Usage¶
There are two ways of inputting an encoded file, either as an image or as a file, as explained above the algorithm is the same no matter the input type.
FrankStore decode <coverImage> <fileToEncode> <outputFile> image
FrankStore decode <coverImage> <fileToEncode> <outputFile> file
We recommend you to input as a .PNG file, we currently have not tested any other type of image.