Copyright © 2006-2019 MultiMedia Soft

How to protect your recording sessions through encryption

Previous pageReturn to chapter overviewNext page

Protecting recording sessions from fraudulent uses could be a must for many purposes and is already required from certain medical confidentiality laws.

 

Audio Sound Recorder API for .NET comes with two solutions for protecting your audio data:

 

Through standard AES encrypted ZIP files: see the How to manage ZIP files tutorial for details about ZIP files management.
Through its own protection schema: continue reading this document for details.

 

Although you could already use your own or third-party encryption/decryption schemas and re-load decrypted song's data through the StartFromMemory method; Audio Sound Recorder API for .NET comes with a proprietary solution that allows encrypting recording session, for safe redistribution or storage purposes, through the EncryptCurrentSession method. As an alternative for already existing and previously stored recording sessions, you could also use our CryptSound™ application.

 

Once encrypted, no available multimedia application will be able to playback the output of encrypted recording sessions while applications developed using Audio Sound Recorder API for .NET will be able to re-load encrypted songs through the StartFromFileEncrypted method: it's important to note that this will happen without the need to create decrypted temporary files: for best safety the full decryption process will be performed in memory until you won't set the strOutputPath parameter of the StartFromFileEncrypted method to an absolute pathname.

 

For security reasons encryption features and the CryptSound™ application are not included inside the Trial version and are disabled by default inside the Commercial version: if you own the Commercial version and if you wish using encryption features, please, contact us for instructions about enabling this specific feature or for receiving a copy of the CryptSound™ application.

 

In case you should need to test encryption capabilities, please, contact us and we will ask you to upload inside our FTP server a sample sound at this point we will send you back the encrypted sample with a dedicated decryption key that will have to be passed to the StartFromFileEncrypted method.

 

Another important feature brought by Audio Sound Recorder API for .NET is the capability to upload an encrypted recording session to a FTP site; for this purpose, after having called the EncryptCurrentSession method, you can upload the encrypted session through the RequestUploadFileToFTP method.

 

The CryptSound™ application has two working modes:

 

With its own user interface

 

Launching the application without any command line parameter will display the user interface as shown on the screenshot below:

 

 

As you can see, this user interface is very straightforward and intuitive; the complete sequence of operations is the following:

 

fill the "List of files to encrypt" list using the "Add file..." and/or "Add directory..." buttons
remove any unwanted file selecting its pathname inside the list and pressing the "Remove file" button.
select the destination directory for encrypted output files: if not specified, the encrypted output file will be placed inside the same folder of the input file, with the same filename and extension changed with the string contained inside the "Encrypted files extension" edit box
optionally change the default extension for encrypted output files filling the "Encrypted files extension" edit box
fill the "Encryption key" edit box with your own key (from 16 to 32 characters) or, in alternative, let the application generate a unique key for you pressing the "Generate new key" button
if needed, check the "Add header containing information about the sound file" checkbox: this will allow adding a small header to each encrypted file containing a few information about file contents (duration, author, title, etc.)
if needed, check the "Store output encrypted files ... etc." checkbox: this will allow storing each encrypted file into a separate sub-folder whose name will reflect the "genre" of the song taken from an eventual ID tag (for example "Rock", "Rock & Roll", "Country", etc.). If for example the song's genre should be "Rock & Roll", by using settings displayed on the picture above a generic "filename.mp3" song after being encrypted would be stored inside the following pathname: "C:\m_sounds\audio\encrypted\Rock & Roll\filename.bin"
press the "Start encryption" button and wait for the "Encryption completed" message.

 

 

 

From the command line for use with batch files

 

Launching the application from the command line requires the following syntax:

 

CryptSound "InputFileFullPathname" -k="EncryptionKey" [-p="PreviousEncryptionKey"] [-o="OutputFileFullPathname"] [-i] [-s]

 

were:

 

"InputFileFullPathname"

Full pathname for the input file

-k="EncryptionKey"

The key used to encrypt the file: must be from 16 to 32 characters long

-p="PreviousEncryptionKey"

(Optional parameter) Previous encryption key, allows to open and decrypt a previously encrypted file and to re-encrypt it using the new key specified inside the -k parameter

-o="OutputFileFullPathname"

(Optional parameter) Full pathname for the output file; if not specified and if the "-f" parameter has not been specified as well, the output file will be placed inside the same folder of the input file, with the same filename and the extension changed into ".bin"

-f="OutputPath"

(Optional parameter) Output folder where encrypted file will be placed; if not specified, the output file will be placed inside the same folder of the input file, with the same filename and the extension changed into ".bin". This parameter is ignored if the "-o" parameter has been specified.

-i

(Optional parameter) Allows performing analysis of the original sound file before encryption in order to add a small header to each encrypted file containing a few information about file contents; this feature is useful when adding encrypted songs to a playlist.

Supported fields are the following:

filename
frequency
channels
duration in milliseconds
author (*)
title (*)
album (*)
genre code (*)
genre string (*)
year (*)
comment (*)
track number (*)

 

(*) only compiled if corresponding tag field is available inside the original sound file

-g

(Optional parameter) Put the encrypted output file inside a sub-folder named as the eventual genre of the sound file (only if the "-i" option has been specified and the "-o" option is not available). This parameter is ignored if the "-i" parameter has not been specified.

-s

(Optional parameter) Silent mode

 

below two examples of use:

 

CryptSound "c:\mp3_sounds\myfile.mp3" -k="ABSF1SHR46KFL0JVH6E8JFG49KMD3H28"

 

The sample above will encrypt the "c:\mp3_sounds\myfile.mp3" file using the "ABSF1SHR46KFL0JVH6E8JFG49KMD3H28" encryption key and the output will be placed inside the "c:\mp3_sounds\myfile.bin" file

 

CryptSound "c:\mp3_sounds\myfile.mp3" -k="ABSF1SHR46KFL0JVH6E8JFG49KMD3H28" -o="c:\mp3_sounds\encrypted\myfile.zzz"

 

The sample above will encrypt the "c:\mp3_sounds\myfile.mp3" file using the "ABSF1SHR46KFL0JVH6E8JFG49KMD3H28" encryption key and the output will be placed inside the "c:\mp3_sounds\encrypted\myfile.zzz" file