CryptoSys API Linux Version (Beta Release) $Date: 2012-11-09 06:02:00 $ $Revision: 4.6.0 $ INTRODUCTION The Linux version of the CryptoSys API is a static library file `diCryptoSys.a'. Include `diCryptoSys.h' in your source code and link to this library. Please read the `Copyright Notice and Terms' below before using. Alternatively, a shared library `libcryptosysapi.so.4.x.x' is also included. This shared library need to be installed on your system using administrator privileges. The shell file `setupapiso.sh' works for us by doing this: > chmod +x setupapiso.sh > sudo ./setupapiso.sh Your system may require something different. TEST PROGRAMS There are four test programs included, `myapitest.c', `api_check.c', `API_Examples.c' and ApiMkRngSeed.c. The first two are simple tests; the third is the same set of detailed set of tests supplied with the Windows version (with the FileHexHash 't' tests excluded). The fourth is a console-based program to create a new seed file which will prompt the use to type random keystrokes. * EXAMPLE 1: gcc myapitest.c -L: diCryptoSys.a -o myapitest ./myapitest This should display SHA1(abc)= a9993e364706816aba3e25717850c26c9cd0d89d Correct = a9993e364706816aba3e25717850c26c9cd0d89d * EXAMPLE 2: gcc api_check.c -L: diCryptoSys.a -o api_check ./api_check This should display something similar to: Version=420 Licence Type=U Module=diCryptoSys.c Compiled=Mar 18 2009 16:47:44 (the exact details depending on which version you've downloaded). * EXAMPLE 3: gcc API_Examples.c -L: diCryptoSys.a -o API_Examples ./API_Examples This should display a long set of tests starting with "Testing AES128_BytesMode_CBC()..." and finishing with "...ZLIB_De/Inflate() tested OK All done." If there is an unexpected result in API_Examples, the program will abort with an assert error. SHARED LIBRARY To use the shared library, assuming it's been installed on your system, gcc MYPROG.c -o MYPROG -lcryptosysapi For example gcc api_check -o api_check_s -lcryptosysapi COMPILATION The static library file diCryptoSys.a has been created by compiling the source code using gcc -c -fPIC -Wall and combined into a library using ar rcs diCryptoSys.a $(OBJECTS) The libraries were created on a Pentium 4 running Ubuntu GNU/Linux 2.6.15-55-386 with gcc version 4.0.3 (Ubuntu 4.0.3-lubuntu5) targeting i486-linux-gnu. If it works for you, please use it. If you have any suggestions, please forward them to us. DOCUMENTATION See the manual available at . The manual is aimed primarily at Visual Basic users (spit!...) but it explains the required parameters, behaviour and return values for each function. The C functions are identical in behaviour and parameters to the VB ones, even though we may have used different parameter names. KNOWN DIFFERENCES IN LINUX VERSION * API_LicenceType will return 'U'. * API_ModuleName has no relevance (it returns the source file name). * No automatic checks on first run (because, unlike a DLL, it's not `loaded'). Call API_PowerUpTests yourself. * No software integrity check (which relies on presence of a DLL file, which doesn't exist here). * No thread-safe TLS handling, so - avoid context handles in a multi-threaded environment - RNG is probably not affected but have not thoroughly tested. * Hash 't' option for files doesn't work (and isn't relevant on Unix anyway). COPYRIGHT NOTICE AND TERMS The code and libraries for CryptoSys API ("the Software") are copyright (C) 2001-12 D.I. Management Services Pty Ltd, all rights reserved. You are welcome to use the Software as part of your own applications provided due credit is given. Use at your own risk. This is a beta release and you must make your own checks as to its suitability and accuracy for your purposes. You may not distribute the Software separately except as part of your own value-added application. David Ireland and DI Management Services Pty Limited ("the Author") make no representations concerning either the merchantability of the Software or the suitability of the Software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. In no event shall the Author be liable for any damages in connection with or arising out of the use of the Software by any person whatsoever, including incidental, indirect, special or consequential damages, or any damages related to loss of use, revenue or profits, even if the Author has been advised of the possibility of such damages. By using the Software you expressly agree to such a waiver. If you do not agree to these terms, do not use the Software. David Ireland DI Management Services Pty Ltd www.di-mgt.com.au www.cryptosys.net