Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ OpenSSL Introduction and compilation steps on Windows, Linux, Mac systems     - Observation network performance tools for Linux (Linux)

- BusyBox build root file system (Linux)

- JDK comes with tools JPS (Linux)

- CentOS / Linux SWAP partitions added (Linux)

- Android Dynamic efficiency articles: a brilliant Loading Analysis and Implementation (Programming)

- Raspberry Pi 2 to install the latest version of the FPC and Lazarus 1.5 (Linux)

- Profile Linux users login shell and login to read (Linux)

- Create RAID 1 (mirroring) with two disks (Linux)

- Row-level security and application-level solutions for the new features of PostgreSQL9.5 (Database)

- Android custom controls create the simplest skid menu in the history (Programming)

- The hash function under OpenSSL (Linux)

- Oracle user lock how to know what causes (Database)

- Log device files under Linux - logger (Linux)

- Ubuntu 14.04 solved using MyEclipse 10.7 flash back (Linux)

- Internet proxy workaround can not be used under Linux YUM (Linux)

- OpenSSL for secure transmission and use of skills of files between Windows and Linux (Linux)

- Unix average load average load calculation method (Server)

- General Linux interface server parameter tuning (Server)

- How to remove the files inside the privacy of data on Linux (Linux)

- Ubuntu install Avast antivirus software (Programming)

 
         
  OpenSSL Introduction and compilation steps on Windows, Linux, Mac systems
     
  Add Date : 2018-11-21      
         
         
         
  OpenSSL Introduction: OpenSSL is a powerful Secure Sockets Layer library password, include major cryptographic algorithms, key and certificate common package management functions and SSL protocols and provides rich application for testing or other purposes.

SSL is SecureSockets Layer (Secure Sockets Layer protocol) acronym secrecy can provide transmission on the Internet. The goal is to ensure that between two application security and reliability of communication available in the server and clients while achieving support. Secure communications on the Internet has become the industry standard.

Secure Sockets Layer protocol enables communication user / server applications between being the attacker eavesdropping, and always to authenticate the server, can also choose to authenticate the user. SSL protocol requires the establishment of reliable transport protocol (TCP) above. Advantage SSL protocol is that it is an application layer protocol independent-independent, high-level application layer protocol (for example, HTTP, FTP, TELNET, etc.) can transparently built on the SSL protocol. SSL protocol application layer protocol before the communication has been completed and the server negotiate encryption algorithms certification, communication key. After this application layer protocol transmitted data will be encrypted to ensure privacy of communications.

SSL protocol provides a secure channel has three characteristics: (1), the confidentiality of data: encryption is to plain input files using an encryption algorithm into encrypted files to confidentiality of the data. The process requires use encryption keys to encrypt and then decrypt. Without the key, you can not unlock the encrypted data. After the data is encrypted, only use a secure key transfer method. Encrypted data can be transmitted publicly. (2), data integrity: encryption also ensures data consistency. For example, message authentication code (MAC), users can check the encrypted information, the receiver can be used to verify the MAC encrypt data during transmission to ensure data has not been tampered with. (3), secure authentication: An additional use of encryption is used as a personal identification, the user can be used as a key to verify the identity of his security. SSL is the use of public-key cryptography (RSA) as a client and server side encryption protocol when transferring confidential information.

OpenSSL using C language as a development language, which makes OpenSSL has excellent cross-platform performance. OpenSSL support Linux, Windows, BSD, Mac, VMS platforms.

OpenSSL about the entire package can be divided into three main functional parts: SSL protocol libraries, applications and cryptographic algorithm libraries.

For OpenSSL random number generation and management also provides a complete set of solutions and support API functions. The quality of random numbers is to determine whether a key premise of the importance of safety.

OpenSSL also offers some other auxiliary functions, API such as generating keys from the password, certificate issuance and management profile mechanism and so on.

OpenSSL provides produce a variety of methods, functions, and applications of public key and symmetric key, while providing a public and private key of the DER encoding and decoding functions. OpenSSL provides a private key encryption function in the standard, so that the key can be stored and distributed safely.

OpenSSL provides a total of eight kinds of symmetric encryption algorithm, which is a grouping of seven kinds of encryption algorithms, only a stream encryption algorithm is RC4. The seven packet encryption algorithms are AES, DES, Blowfish, CAST, IDEA, RC2, RC5 , support the electronic codebook mode (ECB), the encryption block chaining mode (CBC), cipher feedback mode (CFB) and output feedback mode (OFB) four common block cipher encryption mode. Wherein, Cipher Feedback Mode (CFB) AES used and the output feedback mode (an OFB) packet length is 128, it is used by other algorithms 64.

OpenSSL implements a total of four kinds of asymmetric encryption algorithms, including the DH algorithm, RSA algorithm DSA algorithm and elliptic curve algorithm (EC). DH algorithm is generally used for key exchange. RSA key exchange algorithm may be used for both, it can also be used for digital signatures. DSA algorithm is generally used only for digital signatures.

OpenSSL implements the five kinds of message digest algorithms are MD2, MD5, MDC2, SHA (SHA1) and RIPEMD. SHA SHA algorithm actually includes two kinds of information and SHA1 digest algorithm. In addition, OpenSSL also implements two types of information and DSS1 DSS DSS digest algorithm specified in the standard.

OpenSSL applications including key generation, certificate management, format conversion, data encryption and signing, SSL configuration testing and other auxiliary functions.

Purpose is to enable the OpenSSL Engine mechanism to transparently use encryption software libraries or third-party hardware encryption device to encrypt.

OpenSSL in Windows7 64bit + vs2010 in win32 compilation steps:

1. Download OpenSSL source code version openssl-1.0.1g from https://www.openssl.org/source/;

2. Download from http://www.activestate.com/activeperl/downloads ActivePerl5.16.3 x64 (ActivePerl is a perl script interpreter);

3. The ActivePerl installed to D: \ ProgramFiles \ directory under Perl64, open a command prompt, targeted to D: \ ProgramFiles Perl64 \ under \ eg directory, execute perl example.pl, if prompted Hello fromActivePerl then the Perl installation! , you can start using Perl commands related to OpenSSL installed;

4. openssl-1.0.1g unzip to E: \ under OpenSSL \ openssl-1.0.1g directory;

5. From http://sourceforge.net/projects/nasm/ download nasm 2.07, install it to D: \ ProgramFiles \ NASM, and the D: \ ProgramFiles \ NASM added to the system environment variable Path in;

6. Place the command prompt, navigate to E: \ OpenSSL \ openssl-1.0.1g;

7. Enter perl Configure VC-WIN32 --perfix = E: \ OpenSSL \ openssl (install to E: \ OpenSSL \ openssl);

8. Enter ms \ do_nasm;

9. the command prompt, navigate to C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ VC \ bin, and then enter vcvars32.bat, displays Settingenvironment for using Microsoft Visual Studio 2010 x86 tools Without this step, it will. Tip nmake not an internal or external command;

10. Again the command prompt, navigate to E: \ OpenSSL \ openssl-1.0.1g;

11. Enter the nmake -f ms \ ntdll.mak; after the implementation will generate a out32dll folder under openssl-1.0.1g directory, which contains some static library, dynamic library and .exe files;

12. Enter nmake -f ms \ ntdll.mak test; if the final display passed all tests generated library described correctly;

13. Enter the nmake -f ms \ ntdll.mak install; is in E: \ OpenSSL \ bin next generation openssl directory, include, lib, ssl four folders;

14. The above release is compiled library, if the library compiled debug, step 7 will be more change in the VC-WIN32 debug-VC-WIN32 can;

15. If you compile a static library use ms \ nt.mak used to replace the above-ms \ ntdll.mak can;

16. If you compile without generating support libraries, you need to use the above Step 7-8 perl Configure VC-WIN32 no-asm --prefix = E: \ OpenSSL \ openssl and ms \ do_ms can be replaced;

17. E: contains the corresponding assembly files \ OpenSSL \ openssl-1.0.1g \ tmp32dll folder.

Generate the appropriate library and compile files in win64 compilation steps:

1. Place the command prompt, navigate to E: \ OpenSSL \ openssl-1.0.1g;

2. Enter perl Configure VC-WIN64A --perfix = E: \ OpenSSL \ openssl \ win64;

3. Enter the ms \ do_nasm;

4. Enter the ms \ do_win64a;

5. Place the command prompt, navigate to C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ VC \ bin \ amd64, and then enter vcvars64.bat, displays Settingenvironment for using Microsoft Visual Studio 2010 x64 tools Without this step. It will prompt nmake not an internal or external command;

6. The command prompt re-locate to the E: \ OpenSSL \ openssl-1.0.1g;

7. Enter nmake -f ms \ nt.mak; after the implementation will generate out32 and tmp32 two folders in the directory openssl-1.0.1g, out32 folder will generate two static libraries and a number of executable files, tmp32 file folder will generate the appropriate assembly file;

8. Enter nmake -f ms \ nt.mak test; if the final display passed all tests generated library described correctly;

9. Enter nmake -f ms \ nt.mak install; is in E: \ OpenSSL \ bin next generation openssl \ win64 directory, include, lib, ssl four folders;

10. This release is compiled library, if the library compiled debug, step 2 will be more than the VC-WIN64A into debug-VC-WIN64A can;

11. If you compile the DLL with ms \ ntdll.mak used to replace the above-ms \ nt.mak can;

12. If you compile without generating support library, you need to step 2 above with perl Configure VC-WIN64A no-asm --prefix = E: \ OpenSSL \ openssl \ win64 can be replaced;

13. E: contains the corresponding assembly files \ OpenSSL \ openssl-1.0.1g \ tmp32 folder.

In the virtual machine Ubuntu 13.10 32bits generate the appropriate library and compile files in compilation step:

1. The openssl-1.0.1g.tar.gz stored under / home / spring / OpenSSL;

2. Extract the tar -xzf openssl-1.0.1g.tar.gz;

3. The terminal location to openssl-1.0.1g directory;

4. Perform ./config --prefix = / home / spring / OpenSSL / openssl / linux32 (install it into / home / spring / openssl / linux32 directory);

5. Perform ./config -t;

6. Run make depend;

7. Run make (in the directory will generate libcrypto.a /openssl-1.0.1g and libssl.a two static libraries);

8. Perform make test (if the display ALL TESTS SUCCESSFUL instructions for generating libraries correct);

9. The Executive make install (will be generated under / openssl / linux32 directory bin, include, lib, ssl four folders);

10. The above is generated under static library release, to generate a static library under debug, simply step 4 to ./config --prefix = / home / spring / OpenSSL / openssl / linux32 -g3 to ;

11. To generate release dynamic library, just to step 4 / config --prefix = / home / spring / OpenSSL / openssl / linux32-shared to; generate debug DLL, just change step 4 of / config --prefix = / home / spring / OpenSSL / openssl / linux32 -g3 -shared can;

12. /openssl-1.0.1g/crypto directory of each file contains the generated 32-bit assembly file.

In the virtual machine Ubuntu 13.10 64bits generate the appropriate library and compile files in compilation step:

1. The openssl-1.0.1g.tar.gz stored under / home / spring / OpenSSL;

2. Extract the tar -xzf openssl-1.0.1g.tar.gz;

3. The terminal location to openssl-1.0.1g directory;

4. Perform ./config --prefix = / home / spring / OpenSSL / openssl / linux64 -g3 (install it into / home / spring / openssl / linux64 directory);

5. Perform ./config -t;

6. Run make depend;

7. Run make (in the directory will generate libcrypto.a /openssl-1.0.1g and libssl.a two static libraries);

8. Perform make test (if the display ALL TESTS SUCCESSFUL instructions for generating libraries correct);

9. The Executive make install (will be generated under / openssl / linux64 directory bin, include, lib, ssl four folders);

10. The above is generated under static library debug, to generate a static library under the release, simply step 4 to ./config --prefix = / home / spring / OpenSSL / openssl / linux64 can;

11. To generate release dynamic library, just to step 4 / config --prefix = / home / spring / OpenSSL / openssl / linux64 -shared can; generate debug DLL, just change step 4 of / config --prefix = / home / spring / OpenSSL / openssl / linux64-g3 -shared can;

12. /openssl-1.0.1g/crypto directory of each file contains the generated 64-bit assembly file.

In the virtual machine under Mac OS X 10.8.2 64bits 32bits libraries and generate the corresponding assembly files compilation steps:

Mac has been on a virtual machine installed Xcode 4.5 and Command LineTools !!

1. The openssl-1.0.1g.tar.gz stored under / Users / spring / Desktop / OpenSSL;

2. Extract the tar -xzf openssl-1.0.1g.tar.gz;

3. The terminal location to openssl-1.0.1g directory;

4. Perform ./Configure darwin-i386-cc -shared --prefix = / Users / spring / Desktop / OpenSSL / openssl / mac32 (to install it under / Users / spring / Desktop / OpenSSL / openssl / mac32 directory);

5. Run make (at /openssl-1.0.1g directory will generate corresponding static and dynamic libraries);

6. Run make test (if the display ALL TESTS SUCCESSFUL instructions for generating libraries correct);

7. Executive make install (will be generated under / openssl / mac32 directory bin, include, lib, ssl four folders);

8. The above is generated under dynamic library release, to build a dynamic library under debug, simply step 4 to ./Configure darwin-i386-cc -shared --prefix = / Users / spring / Desktop / OpenSSL / openssl / mac32 -g3 can;

9. To generate release static library, simply step 4 to ./Configure darwin-i386-cc - prefix = / Users / spring / Desktop / OpenSSL / openssl / mac32 can; generate debug static library, only need to step 4 to ./Configuredarwin-i386-cc --prefix = / Users / spring / Desktop / OpenSSL / openssl / mac32 -g3 can;

10. /openssl-1.0.1g/crypto directory of each file contains the generated 32-bit assembly file.

64bits libraries generated in the corresponding virtual machine under Mac OS X 10.8.2 64bits and assembly files compilation steps:

1. The openssl-1.0.1g.tar.gz stored under / Users / spring / Desktop / OpenSSL;

2. Extract the tar -xzf openssl-1.0.1g.tar.gz;

3. The terminal location to openssl-1.0.1g directory;

4. Perform ./Configure darwin64-x86_64-cc --prefix = / Users / spring / Desktop / OpenSSL / openssl / mac64 (to install it under / Users / spring / Desktop / OpenSSL / openssl / mac64 directory);

5. Run make (in the directory will generate libssl.a /openssl-1.0.1g and libcrypto.a two static libraries);

6. Run make test (if the display ALL TESTS SUCCESSFUL instructions for generating libraries correct);

7. Executive make install (will be generated under / openssl / mac64 directory bin, include, lib, ssl four folders);

8. The above is generated under static library release, to build a dynamic library under debug, simply step 4 to ./Configure darwin64-x86_64-cc --prefix = / Users / spring / Desktop / OpenSSL / openssl / mac64 -g3 can;

9. To generate release dynamic libraries, simply Step 4 to ./Configure darwin64-x86_64-cc -shared --prefix = / Users / spring / Desktop / OpenSSL / openssl / mac64 can; generate debug DLL , simply step 4 to ./Configuredarwin64-x86_64-cc -shared --prefix = / Users / spring / Desktop / OpenSSL / openssl / mac64 -g3 can;

10. /openssl-1.0.1g/crypto directory of each file contains the generated 64-bit assembly file.

You can also run .pl files directly to generate the corresponding assembly file. As /openssl-1.0.1g/crypto/cast/asm folder, file generation Mac assembler under 32, it is positioned to asm folder, execute: perl cast-586.pl macosx> cast-586 .s can.
     
         
         
         
  More:      
 
- Android gets the global process information and the memory used by the process (Programming)
- Linux operating system security settings initial understanding (Linux)
- C language sorting instance (select, bubble, insert, binary, fast) (Programming)
- Redis configuration file interpretation (Database)
- Redis-2.8.17 installation and configuration process some errors (Linux)
- Guide: Trickle restrict application bandwidth usage (Linux)
- Cacti installation deployment under CentOS 6.6 (Server)
- Install snort intrusion detection system on Debian (Linux)
- CentOS 5.5 install ntop (Linux)
- Oracle 11g forget approach SYS and SYSTEM password (Database)
- Two minutes thoroughly so that you understand Android Activity Lifecycle (Programming)
- Redhat Close SELinux correct step (Linux)
- GAMIT10.5 under CentOS installation (Linux)
- Ubuntu 14.04 Nvidia proprietary drivers for install two graphic cards (Linux)
- Shell Scripting Interview Questions (Programming)
- Boot automatically remove Linux operating history records (Linux)
- Learning MySQL data types (Database)
- iOS constants, variables, properties and characteristics (Programming)
- DB2 commonly used scripting sort out (Database)
- GNU Linux system variables (sysctl configuration commands) integrated use (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.