Download and Install Fida Distribution on Linux/Unix
Short Instructions
- Download and extract the Fida distribution.
- Build the cosm library and the fida package. By default the client and server are set to build with cryptography.
- Successfully built binary files are written to the build/ directory. Change the server specifications in source/common.h [default = localhost] to accept communication from remote client. If using cryptography, update the name of the public keyfile in source/secMan.h [default = key.pub].
Detailed Version
- Download the Fida distribution.
- Extract the fida distribution: tar -zxf fida.tar.gz
- Go to the top-most directory of the extracted fida distribution: cd fida
- Build the cosm library:
- cd cosm/v3
- ./build help [follow the instructions given] (e.g: ./build
linux-x86 for linux-x86 machines, ./build macosx-ppc for mac osx)
- cd ../..
- Build the client and server binaries: make nocrypt. The client and server
are not enabled with cryptography when the nocrypt suffix is used.
- If everything goes correct, all executables should now be present in the build/ directory.
The keyUtil, sign, and verify executables are not needed when Fida is built
without cryptography.
- Test the Fida build by executing the server and client binaries. By default, these
will load the shared (.so) libraries from a simple sorting application. The source code for this
application can be found in the example subdirectory in the Fida distribution.
Enabling Cryptography Support
- Execute a make clean command in the main fida directory.
- Build the client and server binaries: make
- Everything should be the same as above, except that the client and the server are
enabled with cryptography. The key signing executables are relevant now as well: keyUtil is
for generating keys, sign for signing files, and verify to check the validity of signed
files.
- If you want to setup a sample server. First, you need to sign the libclientApp.so application.
For that, generate a key using keyUtil
(./keyUtil key password),
and sign the libclientApp.so using sign
(./sign libclientApp.so key.pri password). You may use verify to
verify whether a signature for a file is consistent with a public key
(./verify libclientApp.so libclientApp.sig key.pub).
- Keys consist of a key-pair. Upon generation, two files are created; the private key: key.pri and the
public key: key.pub. The private key is used by the server to sign library files and
generate the signature file: libclientApp.sig, while the public key is used to verify the signature
by the client before loading the libary. This allows the client to trust that the application library was
created by the server.
- Test the Fida installation by executing the server and client binaries. Make sure that the
public key from the server is present in the cliet subdirectory so that it can verify any application
libraries downloaded from the server.
Setting up Fida for use with remote clients
- Change the server specifications from source/common.h file. By default this is
set to localhost which means that the server will only accept clients on the same machine. Change
this to your machine name so that external clients can communicate with the server.
- For running the server to support linux/mac clients, your running server directory should contain
- server executable.
- libserverApp.so library file.
- libclientApp.so in a new directory named ./x86/Linux/ for linux and in ./PowerPC/OSX/
for mac clients.
- If using cryptography: libclientApp.sig in the directory named ./x86/Linux/ for linux
and in ./PowerPC/OSX/
for mac clients.
- Distribute the client and run it on any machine.
- If using cryptography: with the client, distribute the public key file, key.pub also. Edit
the source/secMan.h for the name of the public keyfile [default: key.pub].
- client will automatically get the libclientApp.so from the server, and execute normally.
If cryptography is enabled, it checks the signature against the file as well.