The program has been tested on Windows NT/2000/XP. It should
work on Windows 98 as well. Anyway, there is no plan to support
this platform.
To install the program, simply execute setup file and follow the wizard
procedure. The setup is not invasive: no one of installed files will be
copied in your system directories. The setup program modifies the
following Registry entries:
These keys will be completely removed from the Registry
unistalling the program, leaving no trace on your system.
SharEncrypt is a security tool
designed to provide strong file encryption in a shared
environment. The program is useful everytime there is the need
of data confidentiality among groups of users. A practical
example is a set of users logically grouped into different
working groups but sharing the same network (a company LAN for
example).
These users can use SharEncrypt when they need to share confidential
data inside their group, preventing users belonging to other groups
from accessing these data. Another example is the use of
SharEncrypt together with a file sharing program (such as
Kazaa): only authorized users can access the content of some of
your shared files, all others see garbage...
Although the SharEncrypt is designed for groups of users, it can
be used as a simple single-user strong file encryption utility to
protect your privacy as well.
The program comes with a friendly (hope so:)) GUI interface in order to
easily and quickly manage groups of users and to perform
encryption/decryption operations.
How does it work?
The basic idea is simple: the user creates a special directory
(a "SharEncrypt" directory) and defines a set of authorized recipients
users associated with it. Every one can now insert files in the
direcory but each inserted file will be automatically encrypted
so that only users in the set previously defined will be able
to decrypt them. SharEncrypt allows you to create and manage
different directories, each of wich with its own set of
authorized users. The set of the users associated with a
particular directory can be changed dimanically (recipients users
can be added or removed from the set after its creation). The
user who creates the directory and manage the associated set of
recipients is called the directory administrator.
Although the idea is quite simple, it must be implemented carefully so
that the program may be efficient and most of all secure. Main goals
are:
- Users must be identified in a secure way.
- The set of the properties of a particular directory (the
administrator credentials, the recipients set, the creation time etc.)
must be available to all users. Moreover, users should be able to
verify the integrity of these properties (does someone different from
the administrator altered them?) at any time.
- The set of recipients associated with a particular
directory must modifiable only from the administrator.
- File encryption scheme must be non-trivial.
These problems are solved using public key cryptography
techniques. Every user is identified by his own X.509 digital
certificate and a digital signature mechanism is used to
authenticate the directory properties. If this stuff sounds new
to you, here
and here
are
good starting points.
In addition, hash algorithms are used to automatically monitor
directory properties changes every time a user encrypts files in that
directory. Files are encrypted for the appropriate recipients
using (the public key contained in) their certificate. OpenSSL library provides the
cryptographic primitives to accomplish the task.
The digital signature and the encryption are implemented using
PKCS#7
standard. Supported symmetric encryption algorithms include AES,
DES, 3-DES, Blowfish, CAST, IDEA, RC2, RC4, RC5. The private keys (used
to sign the directory properties or to decrypt files) can be RSA
or DSA
type. In addition, private keys are indifferently handled in
PKCS#12 (Microsoft pfx),
PKCS#8
or OpenSSL format.
Besides public key based encryption, SharEncrypt provides password
based encryption capability as well (no certificates and private keys
are required). User is prompted for a password that is used to
derive the encryption (decryption) key according to
PKCS#5
standard. This can be useful when there is no need of sharing
encrpted files with other users.
WARNING.
Note that the program does not provide keys generation, certificates
verification and other PKI
related utilities: it simply uses pre-existing objects and does not
define policies or strategies about their mangement or validation. It
is
obvious that these essential tasks must be necessarily accomplished in
some external way. For a basic use of SharEncrypt, for example, a group
of users could rely on a company that sells digital certificates (there
are dozens on Internet and in many cases you can get them for free for
personal use) and follow the standard suggested procedures to verify
and manage the certificates. These sample certicifates
come from a couple of such companies. A more advanced use could be the
integration of the program in some more complex PKI with its own rules
and policy.
Select menu Directory >
Create New. This opens a 4-steps wizard.
- Step 1. Select the location and the name for the new
Sharencrypt directory. Specify a non existing directory name and go to
step 2.
- Step 2. Wizard asks you about the directory administrator
credentials: his private key and matching certificate. If the private
key is in an encrypted format (should be:)), the required passphrase
will be requested at the end of the creation process. The supported
private key formats are PKCS#12 (pfx), PKCS#8 or OpenSSL (see demo). The private key will be used to sign a
configuration file containing the SharEncrypt directory properties. If
the private key and the matching certificate are in the same file (a
.pfx file for example), the certificate file field is not required.
- Step 3. Add the recipient certificates files here. X.509
certificates are supported in binary or PEM format (see demo
for sample certificates). The administrator certificate in
step 2 must be explictly added here if you want it to be inserted in
the recipients list. In some circumstances, in fact, it could be
useful that a directory administrator is able to create and modify the
directory properties without having the possibility of decrypting the
inerted files. To see details of a certificate click on the Details button (or double
click on a file in the list). Note that no check or verification is
performed on the certificates being added (no certificate
verification, no validity period verification, no extensions parsing
etc...) so it's up to you to select valid (according to your policy)
certificates (see this warning).
- Step 4. This final step summarizes the directory
properties. Clicking on the Admin.
certificate details button fails if the certificate is
encrypted with the private key in a pfx file (because the
required access passphrase is not available in this step).
Click on Finish button to
let
wizard begin the directory creation process.
After the directory is successfully created, it is added in
the "Directories" tree on the right pane of the main window.
Select menu Directory >
Directory Properties to activate the properties window. Then
(the
window is modeless) select a directory from the Directories
tree to see its properties. Click Details
button the see the
certficates details. Each certificate can also be extracted and
saved in a seprated file by clicking Extract
button. The list of the recipients (users that are able to decrypt
the files in the directory) shows only the subject common name of the
user certificate.
How the directory properties are
protected from unauthorized access
The directory properties information are taken from a file
called ".SharEncrypt" created by the administrator and located in the
directory itself. This file contains sensible information and
only the administrator should be able to modify it. To ensure
this, the file is digitally signed by the administrator with
his private key and a user can check its integrity (i.e. can
verify that no one modified the file) verifying this signature
(saved in a file called .SharEncrypt.sig). Every time the properties
window is activated, this signature is automatically verified
using the administrator certificate. Click on the Verify signature NOW button
to explicitly verify the signature. If the verification fails
then the .SharEncrypt file has been altered from anauthorized
users. Note that only the signature is verified, not the
certificate; to verify the certificate you can extract it and
proceed with your own certificate verification procedures.
You can also simply open the .SharEncrypt to with a text editor to
check the directory properties. Nevertheless this method does not allow
the automatic verification of the signature.
Remarks
Because the properties are read from a file (".SharEncrypt") located in
the directory, you can simply move or copy this file (along with its
signature ".SharEncrypt.sig") in another directory to tranform it into
a
new SharEncrypt directory. Obviously the new directory has a different
name from what administrator originally decided. This is why it may
occur that the field "Base directory"
is different from the directory you are actually checking. It's up to
the user decide if accept as valid this type of directories.
Select menu Directory >
Add and select the directory to be added; to remove a
directory
click on it and select menu Directory
> Remove. Removed directory are not deleted from your hard
disk, they are only removed from the Directories tree.
The tree can contain normal directories as well as SharEncrypt
directories. A SharEncrypt directory is represented either with a red
padlock icon (if you have established the private key to be used
when decrypting files it contains, see here) or with a yellow
padlock icon (you can only encrypt files inside the directory).
Encrypting files
Select a SharEncrypt directory (red or yellow padlock icon)
from the left tree then select menu Encryption
> Encrypt Files... or,
alternatively, select the files to be encrypted from the file
list, right click on them, select Encrypt
Selected Files in> from the popup and choose the
destination directory from the list shown in the submenu. This
activates the encryption dialog, click OK button to begin encryption. A
report dialog will be dispalyed at the end of the encryption process.
The program always asks you to confirm before replacing any existing
file. The encryption is performed according to the selected encryption algorithm.
Remarks
- The ".se" extension will be appended to the encrypted files
name. This exstension is only for your convenience and doesn't actually
matter to SharEncrypt decryption (for example, if you rename the
encrypted file "c:\mydoc.se" in "c:\mydoc" it will be successfully
decrypted).
Security remarks
- If the directory properties have changed from the last time
you checked
it (the administrator updated the recipients list, an unauthorized user
attempted to modify the directory properties and so on) the encryption
operation aborts and you are forced to check the directory properties
before proceeding.
- You should consider the secure deletion procedure after a successful file
encryption.
Decrypting files
You can decrypt files only from a "red padlock icon"
SharEncrypt directory (red padlock means that decryption parameters
have
been set for this
directory).
Select one or more files from a SharEncrypt directory. Then select menu
Encryption > Decrpt Files or
right click and select Decrypt.
The decryption dialog will be activated. Select a destination directory
and click OK button to begin
decryption. The passphrase to acces your private key will be requested.
A report dialog will be dispalyed at the end of the encryption process.
The program always asks you to confirm before replacing any existing
file.
Checking
recipients for a single file
Since the administrator can modify
the
recipents list associated with a SharEncrypt directory and these
changes
don't affect files previously encrypted in that directory, you can
check the recipients list of a single file (possibly different
from the list associated with its directory) to check if you
are in this list (and conseguently decrypt the file). Select
the file, then select the menu Encryption
> Show Recipients Info or, alternatively, right click
on the file and select Show
Recipients Info from the popup menu.
Setting
decryption parameters
You have to select the private key (and the matching
certificate) to be associated with a given SharEncrypt directory
to be able to decrypt files from that directory (selected
objects needs obviously match one of the directory recipient
user). Select the target SharEncrypt directory then select menu Directory > Decryption Settings or,
alternatively, right click on the directory and then select Decryption Settings from
the popup menu. Select private key and certificate then click OK. A red padlock icon will be
dispalyed on the directory.
The recipients list associated with a SharEncrypt directory
can be updated (only from the directory administrator) to add
new or remove existing recipients. Select the target SharEncrypt
directory then select menu Directory
> Recipients Management or, alternatively, right click
on the directory and then select Recipients
Management from the
popup menu. This activates the Recipients management dialog.
Update the list and click OK button.
The passphrase to access the administrator private key will be
requested. This key will be used to sign the new .SharEncrypt
properties file.
Remarks
- At least one recipient must be specified in the list.
If you don't need to share the encrypted files you should
consider to use password based encryption method. With this
method no certificates and private keys are required: just type
a passphrase and encrypt the file. Decryption will be possibile
only using the right passphrase. To perform password based
encryption/decryption select menu Encryption
> Password Based Encryption or, alternatively, right click
on the files and then select Encrypt/Decrypt
with Password from the popup menu. The Password Based
Encryption dialog is activated. Select the task (encryption or
decryption) to be performed, the destination directory and click OK button. The program always
asks you to confirm before replacing any existing file. The
encryption is performed using the selected
encryption algorithm.
Remarks
- If you enter an invalid password when decrypting a file,
you won't be notified that the password is invalid but the
resulting decrypted file will contain garbage. This depends on
the encryption mechanism (see below): there is no way to
validate the decryption password except that verifying the
consinstence of the decrypted file.
- The ".se" extension will be appended to the encrypted files
name. This exstension is only for your convenience and doesn't actually
matter to SharEncrypt decryption (for example, if you rename the
encrypted file "c:\mydoc.sep" in "c:\mydoc" it will be successfully
decrypted).
Security remarks
- The encryption is performed according to
PKCS#5
standard. In short, the password is used in combination with a
hash algorithm to produce the secret key for the selected
encryption algorithm.
- You should consider the secure deletion procedure after a successful
encryption.
Program options
Select menu View >
Options to activate the Options dailog.
The first field shows a list from which select the algorithm to be used
when encrypting the file (both for normal encryption (certficates) and
password based encryption). At present, supported algorithms are AES,
CAST, DES, DESX, IDEA, Blowfish, RC2, RC4, RC5. The aliases in the list
are self explaining (see
here and here
for
a detailed description).
In the Text editor path field
select the program to be used as the text editor (such as notepad,
wordpad, ultraedit, ....). In the next field you can select the secure
file deletion program path. See below for details. Last field is about
the program language (only English and Italian are available at the
time of this write). You must restart the program to activate the new
language.
Encrypting a file does not make much sense if the original
data are not properly removed from your hard disk. It is
escpecially true in a shared environment. The point is that a
file is not really removed when you delete it: the operating
system simply updates its file table removing the file but
leaves the data on the disk until a new file overwrites them.
Hence, it is simple to recover these data before they are
overwritten (there are dozens of such utilities available on the
Internet). For this reason, the data needs to be removed in a secure
way. This is a big topic (here is
technical paper). There are good free programs around (here is an example) to
accomplish this task. You sould use one of such tools. For your
convenience, SharEncrypt integrates this functionality letting you
launch a command line secure deletion tool of your choice from
inside the program. I recommend sdelete.
It's free, little and secure. Simply download sdelete on your hard
disk, then activate the Options dialog with View > Options menu and select
the path of sdelete.exe. In the Additional
command line parameters field I personally use -p 16. You can
type sdelete /? in a DOS shell to see the complete options set.
Once you have selected the secure deletion tool, you can use simply
select the target file and choose File
> Secure Delete menu. If you select, for example, the file
c:\foo.txt, the command " [deltoolpath\deltool.exe] [Additional command
line parameters] "c:\foo.txt" " will be issued. A new process is
launched in a DOS shell. The program always asks you to confirm before
deleting the file.
WARNING
Use this feature with caution: there is no an undo options, it will be
impossible to recover deleted data.
- Windows 98. While the program seems to work properly for
what concerns its functionalities, there are little problems with icons
visualization.
- TODO
- TODO
- ....
In your SharEncrypt installation path there is a "Demo"
directory. It contains some sample certificates and matching
private keys to be used for testing purpose. These objects have
been obtained with a 5 minutes procedure from real commercial
CAs (Trust Center and Digital Signature Trust)
using Windows Explorer browser. Then they have been
exporetd in "Private" subdirectory (the private key and the certificate
as a .pfx file) and in "CERTS" subdirectory (the
certificate in binary format as a .der file). Moreover, these
objects have been converted (using openssl.exe
tool) in various
formats to show how SharEncrypt can handle them. The additional
format for the certificate is the PEM format (for example the file
CERTS\mariorossi.pem). For the private stuff the additional
formats are (sample from "Private\mario rossi" folder):
- File mariorossi.pfx: the pfx as exported from Explorer.
Contains private key and certificate encrypted in PKCS#12 format.
- File mariorossi.p8.asn1. Private key encrypted in
PKCS#8
format.
- File mariorossi.p8.pem. Private key encrypted in
PKCS#8
(PEM encoded) format.
- File mariorossi.priv.pem. Encrypted private key (OpenSSL
format PEM encoded).
- File mariorossi.priv.nopass.asn1. Unencrypted private key
(OpenSSL format).
- File mariorossi.keyAndCert.pem. Encrypted private key
(OpenSSL format PEM encoded) and certificate (PEM encoded).
The passphrase to access all of these object is "password".
Besides security review activity, the most important feature
to be implemented in the future is the possibility of using
private keys stored on harware devices (typically PKCS#11 smart
cards). I have some preliminar code to test but I think I'm
very far from a stable version...
Contact
mrusso@users.sourceforge.net