Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Cryptography development environment to build under Ubuntu     - 25 Git Usage Tips (Linux)

- Oracle background processes daemons (Database)

- Usage Linux device tree (Programming)

- C ++ you can become a new scripting language (Programming)

- Ubuntu derivative version of the user and how to install SmartGit / HG 6.0.0 (Linux)

- MySQL Authorized a recovered (Database)

- Using Python to find a particular file extension directory (Programming)

- Nginx configuration support f4v video format player (Server)

- How to Create a file can not be changed under Linux (Linux)

- Linux script to copy the folder to all folders with the same name (Linux)

- OpenDJ installed on RHEL6 (Linux)

- Through eight skills to let you become a super Linux end-user (Linux)

- IntelliJ IDEA common list of shortcuts (Linux)

- How to clean up your Ubuntu 14.10 / 14.04 / 13.10 system (Linux)

- Vim copy and paste register (Linux)

- Some common regular expressions (Linux)

- SendMail version of Java implementation with attachments (Programming)

- Android components series Activity (Programming)

- RHEL 6.4 installed MySQL 5.6.27 (Database)

- Fast Sort Algorithms (Programming)

 
         
  Cryptography development environment to build under Ubuntu
     
  Add Date : 2017-04-30      
         
         
         
  Inscription

Since recently doing some projects on cryptography, and cryptography libraries are most dependent on the Linux open-source environment, so build cryptography development environment in Ubuntu becomes very necessary. This article describes the steps necessary to build cryptography development environment in Ubuntu, at the same time some minor settings to enhance the experience.

Ubuntu system is installed and set up the root account.

I installed Ubuntu 13.10. Since the development process requires frequent changes of various conf file or modify / usr file folder, so administrator privileges under sudo clearly unable to meet our needs, we need to establish the root account, so that we can carry out future work.

First, open the root account, set the root password

sudo passwd root

Then enter the new password twice when prompted, this time you can use root privileges logged. But if we log out, you will find the system does not allow us to use the root account login, after entering the account must be further elevated privileges, which obviously can not meet our needs. This is because ubuntu hidden by default root account reason. So you want to modify the configuration.

Modify the configuration lightdm

Open Terminal, modify /etc/lightdm/lightdm.conf.d/10-ubuntu.conf file:

sudo gedit /etc/lightdm/lightdm.conf.d/10-ubuntu.conf add the following

greeter-show-manual-login = true # Allows manual input system login user name and password

allow-guest = true # allow guest login

It is worth mentioning that in some low ubuntu version, you need to modify /etc/lightdm/lightdm.conf file, modify the method above.

In this way, we can choose to root account login.

Second. Ubuntu under Eclipse installation and configuration

My main job is to carry out Java / Android development, the bottom layer of the call is to use the C library, is to use jni / NDK calls. Thus, Eclipse is a suitable development tools.

1. Eclipse installation

Download the latest version of Eclipse is https://www.eclipse.org/downloads/ to note that, Eclipse 32-bit systems and 64-bit systems are different, be careful when downloading.

ubuntu, the test system is 32-bit or 64-bit has two methods:

1, terminal, enter uname -m returns i686 is the 32-bit system returns x86_64 is the 64-bit system;

2, terminal, enter getconf LONG_BIT, this command returns the length of the system is long data type, if the return system 32 is 32, 64 is 64-bit systems.

After downloading extract to / usr / local / java folder.

2.Eclipse Bug fixes

It should be noted, there is unity interface ubuntu12.10 after bug, and eclipse interface uses unity interface agent, resulting in a great chance not display eclipse menu, you must create a new shortcut in order to open the option to disable menu Agent Mode Eclipse (if installed open Eclipse, you can find yourself using the menu bar, you can skip this step). Solutions are as follows:
1. Create a new shortcut.
In any folder (in desktop) New -> Blank Document, and enter the following code

[Desktop Entry]
Categories = Development;
Comment [zh_CN] =
Comment =
Exec = env UBUNTU_MENUPROXY = / usr / local / java / eclipse / eclipse
GenericName [zh_CN] = IDE
GenericName = IDE
Icon = / usr / local / java / eclipse / icon.xpm
MimeType =
Name [zh_CN] = eclipse
Name = eclipse
Path =
StartupNotify = true
Terminal = false
Type = Application
X-DBUS-ServiceName =
X-DBUS-StartupType =
X-KDE-SubstituteUID = false
X-KDE-Username = owen
Exec = env UBUNTU_MENUPROXY = 0 / usr / local / java / eclipse / eclipse
Key statement

Exec = env UBUNTU_MENUPROXY = 0 / usr / local / java / eclipse / eclipse
Its role is to disable the agent menu.
After saving and launched, will rename the file to eclipse.desktop, right to increase the file permissions, and check whether the correct command

Double-click the desktop icon to open up, pull-down menus can also be achieved. If there is demand, but also can be fixed on the start bar.
Eclipse itself comes with JDK version, but I still want to install separate jdk, so at some need the command line compiler, they can easily call and javah javac command, so a pure download the Eclipse, and with Oracle- jdk, JDK Download 8 is http://www.oracle.com/technetwork/java/javase/downloads/index.html. If openJDK, direct apt-get install to install.
After downloading decompression, decompression good jdk1.8.0_5 folder to / usr / lib / jvm directory, this time even without jvm directories can also execute the following command, jvm folder will be created.

mv jdk1.8.0_5 / usr / lib / jvm
Modify the following environment variable to any directory can be called Java command. Modify / etc / profile

gedit / etc / profile
Added at the end:

export JAVA_HOME = / usr / lib / jvm / jdk1.8.0_5
export JRE_HOME = / usr / lib / jvm / jdk1.8.0_5 / jre
export CLASSPATH =:. $ JAVA_HOME / lib / dt.jar: $ JAVA_HOME / lib / tools.jar: $ JAVA_HOME / lib: $ JRE_HOME / lib: $ CLASSPATH

export PATH = $ JAVA_HOME / bin: $ PATH
Note that there are two points, one CLASSPATH first colon in front of a small point, refers to the "current directory" must be added; the second is to replace jdk1.8.0_5 own Java version.
After saving execution:

source / etc / profile
This completes the configuration of java environment variable. Test environment variable is correctly configured as follows:

java -version
Display the following on behalf of Java is configured correctly:

java version "1.8.0_05"
Java (TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot (TM) Server VM (build 25.5-b02, mixed mode)
Eclipse in C / C ++ development needs CDT plug-ins, CDT plug-in installation method is as follows:
Start Eclipse, select Help> Install New Software;
In the Available Software dialog box, click the Add ...;
In the Name field Add Site dialog box, enter the name of the remote site (for example, "C Plugin"). In the Location field, enter the following URL: http: //download.eclipse.org/tools/cdt/releases/kepler Click OK, pending then select all the options below, all the way to the next step to complete the installation.

3.andorid sdk environment to build

Eclipse ADT (Android Developer Tools) installation
Start Eclipse, select Help> Install New Software.
In the Available Software dialog box, click Add ...,

In the Name field Add Site dialog box, enter the name of the remote site (for example, "Android Plugin"). In the Location field, enter the following URL: https: //dl-ssl.google.com/android/eclipse/ NOTE: If you have trouble accessing the plug-in, URL can be changed in the https http (https will use more secure). Click OK.
Back Available Software interface should be able to see a list of the Developer Tools option. Select Developer Tools beside the check box will also select Android DDMS and Android Development Tools. Click Next.
In the final Install Details dialog box lists the Android DDMS and Android Development Tools and other features. Click Next to read and accept the license agreement, and install all dependent components, and then click Finish.
Restart Eclipse.

3. Install the android sdk

After the restart Eclipse, you'll be prompted, Android SDK does not give a location

Now we need to cut out and download the Android SDK Tools, the following address: http://developer.android.com/sdk/index.html

Download the SDK Tools Only you can. After downloading extract to any folder. Cut back to Eclipse, the path to the SDK Android SDK Tools just unpack location, and then all the way to the next step to install the sdk. If you need additional later version of SDK, open the Android SDK Manager to download.
In order to let the SDK can also be used in Terminal, sdk configuration environment variable, edit / etc / profile

sudo gedit / etc / profile
Added at the end:

# Android SDK
export ANDROID_SDK = ~ / developTools / android-sdk-linux
export PATH = $ ANDROID_SDK / platform-tools: $ ANDROID_SDK / tools: $ PATH
Do not forget to add the complete input Terminal in

source / etc / profile
Test: emulator -version

4. Install the Android NDK
NDK needed in some need to call C library scene. NDK download address is:
http://developer.android.com/tools/sdk/ndk/index.html
After downloading extract to any folder, and configure the same environment variables as sdk

sudo gedit / etc / profile
Added at the end:

export NDK_HOME = / home / snowdream / android-ndk-r5
export PATH = $ NDK_HOME: $ PATH
Remember to substitute your own path extracting the NDK path.

Do not forget to add the complete

source / etc / profile

Test: input Terminal

ndk-build -version
The results will show the correct version numbers of ndk-build.

Environment installed.

Third, the cryptography libraries installed

First install pbc series library.

1. pbc dependent libraries installation
pbc library depends on
M4
GMP Library
flex
bison
Wherein M4, flex, bison can be installed via apt-get install

apt-get install M4
  apt-get install flex
  apt-get install bison
GMP download the following address:
https://gmplib.org/
Download and unzip, unzip the file into the folder where the terminal is installed, as follows:

./configure
make
make check
make install
2. pbc installation
pbc (The Pairing-Based Cryptography Library) Download the following address:

http://crypto.stanford.edu/pbc/download.html
Download and unzip, unzip the file into the folder where the terminal is installed, as follows:

./configure
    make
    make install
Thus, cryptography complete development environment to build. If you need to develop Java / Android project, we will need some knowledge JNI / NDK development of. Fortunately, the library has been JPBC pbc version, with the same Download Download pbc, its essence is a java library pbc interface, so it is still dependent on the pbc library. Here are a direct method of generating libjpbc-pbc.so dynamic link library, it does not rely on pbc libraries, but note that if pbc library itself has changed, then you need to re-build the library file. In addition, the author does not guarantee that this method of generating sufficiently stable.
This method relies on cmake and ccmake, both for the common programming tool, installation is as follows

apt-get install cmake
    apt-get install cmake-curses-gui
After installation, at teminal enter jpbc extract the directory (with < jpbc> on behalf of that), enter

cd < jpbc> / jpbc-pbc
    ccmake.
Like the use of make, type c, and then enter g, this time in < jpbc> / jpbc-pbc folder generates the necessary Makefile file

Then enter
make

so this file is java library that can be called, at the time of calling attention to setting java.library.path.

Although our basic development environment set up is completed, however, depending on each person's needs, we need to download a separate library files they need, for example, frequently used openSSL.
     
         
         
         
  More:      
 
- Java Builder mode (Programming)
- S5PV210 development board for embedded development environment to build under Ubuntu (Linux)
- Linux log management tools Logrotate (Linux)
- Linux Task Scheduler (at, crontab) (Linux)
- How common Linux automation tasks (Server)
- How to install GIMP 2.8.16 in Ubuntu 16.04,15.10,14.04 (Linux)
- DRBD Principle and Features Overview (Server)
- Distributed transaction management Spring declarative transactions (Programming)
- Ubuntu 14.10 install KDE Plasma 5.2 (Linux)
- DRBD installation configuration, working principle and Recovery (Server)
- Xshell key authentication mechanism using a remote login Linux (Linux)
- To install PXE + Kickstart under CentOS 6.x operating system (Linux)
- APT-mirror using a four-step configuration Ubuntu local depot (Linux)
- grep regular expression (Linux)
- Role Object of registerNatives () method (Programming)
- Linux basic introductory tutorial ---- regex basis (Linux)
- SSH without password (Linux)
- linux remote control software (Linux)
- Upgrade to Linux Mint 16 petra Mint 17 Qiana (Linux)
- How to install Perl modules from CPAN (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.