Crtunnel - encryption / decryption
Crtunnel is a program for encryption / decryption of files, but its use goes far beyond the simple encryption / decryption of the same. Actually the function that was designed crtunnel is as its name indicates, to exercise tunnel. At one end receives the data decoded and returned at the other end encrypted, or vice versa. Imagine having your music, videos, etc. .. be encrypted and the application you use to open normally, without changing anything to decrypt it. Well, this is possible and easy thanks to crtunnel.
Description
The use of crtunnel is really easy and convenient. The first thing we must do is start the crtunnel mode key server, which must initiate action with crtunnel-s, along with all the options you want (see Options).
Eg:
Crtunnel $ q-s-c-3
Starts crtunnel mode key server, as quiet as possible and encrypting files to be managed with the codec with ID = 3 (Use crtunnel-l, for a list of available)
Once launched the server, this will ask to introduce the key to encrypt and decrypt from now (unless you've supplied in a file (option-f)).
From this moment we can use to encrypt and decrypt crtunnel as usual with the options-e-d, respectively.
NOTE:
Note that if you encrypt a file with a password and now you say to a different server, when you try to use the d-crtunnel, this will tell you that the key is not correct ;-)
If we can finish the server when you want to:
$ Crtunnel-k
could also cause the server automatically ends after several minutes elapsed (option-t) or after a certain number of key facilities (option-n).
Using encryption:
Eg:
$ Crtunnel-e file_encrypted
In this instance you may have added the option-q to show the smallest number of possible messages, or redirect the descriptor 2 (stderr) to / dev / null [2> / dev / null ].... or things you want. Another example of how to encrypt a text file say, would be:
$ Cat file_txt | crtunnel-e-q> file_txt_encrypted
Using decryption:
Consider a simple example of how to play our song file_mp3_encrypted:
$ Crtunnel-d
Reading a text file encryption:
$ Crtunnel-d / de / null | more
How do our favorite divx ....
$ Crtunnel-d
Options
Below are listed and described all the options available crtunnel. Relax, you need not remember them all. Whenever you enter a brief description of them with the command:
$ Crtunnel -?
ó
$ Crtunnel-h
This would be the output of that command:
Usage: crtunnel []
action:
-S Run in background Key Server (Default Action)
Stop the k-Key Server
E-Encrypt
-D Decrypt (Autodetect Codec)
-L List of the Crypt-installed Codecs
Install the New-i-Crypt Codec 'file'
Remove the Crypt-r-Codec 'file'
options:
-H, -? This help
Select Codec-c 'codec_id' (Use lscrypt to see the list)
-F Make a key from 'file' instead of a password
Generate a log-R (Under / home / Miliki / .crtunnel.log)
N-Max number of keys to serve
Number of minutes t-active (Default 60)
-Q Be as quiet as possible
Remember that has crtunnel internationalization, this means that depending on your LOCAL these messages appear in another language ;-)
Crtunnel always needs to specify an action of all the possible options as well as create necessary.
Actions
-s
Starts the keyserver. This is the first function that must run before you can encrypt or decrypt anything. If you are not anything to crtunnel, it will be the one made by default, after asking for confirmation that.
-k
Stop key server that was running (if he had any).
-e
Returns the standard output data encrypted with the selected Codec Key indicated from data supplied by the entry standard.
-d
Returns the standard output data with the key desencrypteds indicated from data supplied by the entry standard.
-l
Returns a list of IDs for each codec installed along with the name.
-i
Install a new codec in the plugins directory. (You will need root permissions to do this)
-r
Uninstalls a Codec plugins directory. (You will need root permissions to do this)
Options
-c
Select the Codec whose identifier 'id', to encrypt and decrypt operations. This option is only useful to pass along with the action-s.
-f
Provides the key from a file called 'filename' instead of from your keyboard. This option is only useful to pass along with the action-s.
-L
Each time the server receives a request for Key, whether to encrypt or decrypt, type in $ HOME / .crtunnel_log the date of such request. This option is only useful to pass along with the action-s.
-n
When the server has received Keys' num 'key requests, whether to encrypt or decrypt, the server will stop and will not serve more. This option is only useful to pass along with the action-s.
-t
Once past 'num' minutes since the beginning of the server, this will stop and will not serve more keys. This option is only useful to pass along with the action-s.
-q
Console will attempt to show the smallest number of possible messages. This option can be used with any of the actions of crtunnel.
Design
Crtunnel The program is designed in a modular fashion, using an architecture of plugins. This means that each Codec to encrypt / decrypt a plug, making it easy to add new codecs that do not interfere at all with the main code of the program.
Currently, the codecs that are included "standard" with crtunnel are:
* AES
* IDEA
* DES
* DAFE
* Cast-256
* Twofish
Since crtunnel operates on standard input and output, is very easy to use with any other program that can work with encrypted files without losing any of its functionality * without having to touch anything in the code of this program.
Addons
As a simple example, here is attached part of a configuration file editor VIM (. Vimrc) Editor, which I encourage you to learn and use, for their extreme power.
augroup crtunnel
Autocmd!
Autocmd BufReadPre, cr September FileReadPre *. bin
autocmd BufReadPost, FileReadPost *.'[,']! crtunnel cr-d-q 2> / dev / null
autocmd BufReadPost, FileReadPost September nobin cr *.
autocmd BufReadPost, FileReadPost execute *. cr: doautocmd BufReadPost. expand ( "% r")
autocmd BufWritePost, cr *. FileWritePost silent! mv r
autocmd BufWritePost, cr *. FileWritePost silent! crtunnel-e-q / dev / null>
autocmd BufWritePost, cr *. FileWritePost silent! rm: r
Autocmd FileAppendPre *. cr silent! Mv r
autocmd FileAppendPre *. cr silent! crtunnel-d-q / dev / null>
autocmd FileAppendPre *. cr silent! rm: r
Autocmd FileAppendPost *. cr silent! Mv r
autocmd FileAppendPost *. cr silent! crtunnel-e-q / dev / null>
autocmd FileAppendPost *. cr silent! rm: r
augroup END
Once you add this code to our $ HOME / vimrc and can read and write files encrypted with crtunnel as if it were another file without having to decrypt it explicitly. The only requirement is that our encrypted file must have the extension. Cr and of course having launched crtunnel previously server as the key to encrypt and decrypt.
This program as well as what you can find here is distributed under the GPL
Common Problems
As the libcr generates random numbers, to initialize the seed comes to take on the local machine. So it is possible you shall see the program stopped in the "random init. If that happens, you have to just move the mouse or press some keys. The program will continue normally. In the future it will arrange to do this only if absolutely necessary.