Home
Name Modified Size InfoDownloads / Week
RPM 2014-06-16
libnsa-0.10.tar.gz 2014-06-16 429.8 kB
README 2014-06-16 3.5 kB
Totals: 3 Items   433.3 kB 1
libnsa v0.10 release notes:
Libnsa stands literally for "Library: Non Semper erit Aestas".

Hi folks,


This library utilizes RSA 4096 bit encryption using the GNU Multiple Precision
Arithmetic Library (GMP for short).
So, you need to install GMP before using libnsa.
The C++ interface is in the file "libnsa.h".
It is simple to use. Here is a small example:

#include <iostream> // <--- input/output
#include <gmpxx.h>  // <--- Note, you must have gmpxx.h, not just gmp.h
#include <libnsa.h> // <--- This comes with libnsa -package

using namespace std;
main() {
rsa_keypair x;
cout << "Private exp = " << x.e_private() << endl;
cout << "Public exp = " << x.e_public() << endl;
cout << "Modulus = " << x.get_modulus() << endl;
}

After installing libnsa, if you make your own program which uses libnsa, compile your program like:
g++ program.cpp -o program -m64 -lgmpxx -lgmp -lnsa


There may be bugs and I am grateful if you report them to me.
Thank you in advance!

To compile and install this library (libnsa), try one
of the following methods:


Download and unzip the libnsa package:
---------------------------------------
0)

tar xzf libnsa-0.10.tar.gz
(In Linux, type "tar -zxvf libnsa-0.10.tar.gz")

Then go to the installation directory, type:
cd libnsa-0.10

INSTALLATION METHODS:
---------------------
---------------------
(I) STANDARD INSTALLATION:
--------------------------
(Use this method if you want to install the source tarball and your build tools are up to date).

In the installation directory (libnsa-0.10), type:


./configure
make
make install

If you get an error message, try manual installation, as decribed below.


(II) MANUAL INSTALLATION:
-------------------------
Compile the source code manually. (Use this method if step 1 above failed).

cd libnsa-0.10   (go to the installation directory if you are not there already...)
cd src           (go to the source directory)

Compile the source code, type:

    g++ -c -O3 -Wall -fPIC *.cpp
    g++ -shared -Wl,-soname,libnsa.so.1 -o libnsa.so.1.0  *.o
    mkdir -p /usr/local/lib64
    mv libnsa.so.1.0 /usr/local/lib64
    ln -s /usr/local/lib64/libnsa.so.1.0 /usr/local/lib64/libnsa.so.1
    ln -s /usr/local/lib64/libnsa.so.1.0 /usr/local/lib64/libnsa.so
    mkdir -p /usr/local/include
    cp *.h /usr/local/include

You may need to run "ldconfig" (In Linux, usually just type
/sbin/ldconfig  as root user).

That should be all.
If you don't use GCC, then just compile and link with
your favorite tools. I have no experience how it works though.


(III) RPM INSTALLATION:
-----------------------
You don't need to compile the libnsa source code at all, it is pre-compiled
in the sub-directory https://sourceforge.net/projects/libnsa/files/RPM/
If you have a 64-bit Linux system, Download the file libnsa-0.10-1.x86_64.rpm
and install it (as root) by typing "rpm -Uvh libnsa-0.10-1.x86_64.rpm".
This will install libnsa and the necessary header files automatically.

If you are not satisfied with the library, you can easily remove it from the
system by typing "rpm -e libnsa".

-------------------------------------------------------------------------------

If you use this program, you agree that you do so at your own risk.
Please see the included General Public License in the file "COPYING"
for more information. Thank you!

  - Niko Kiiskinen



PS.
If you have any questions about this library or
if you want to report a bug, my email address
is nkiiskin[at]yahoo[dot]com
Source: README, updated 2014-06-16