Raspberry Pi Linux cross compiler to achieve - 3B (c) state secret algorithm SM9

  References This article first  Linux implementation Raspberry Pi cross compiler - 3B (ii) generate miracl library testing and static libraries  were miracl library of cross-compiler test and generate miracl static link library.

  This article introduces the realization state secret SM9 algorithm, and further generate dynamic link library SM9 state secret algorithm to achieve a state secret SM9 algorithm based miracl python call a static link library.

First, the country's secret algorithm introduced SM9

  Identifies the cryptographic algorithm SM9 (IBC) implementations, including key generation, SM9 all the features of standard signature verification check, decryption key exchange and processing mentioned. The implementation based on  Miracl cryptographic library  written in C, the compiler supports X86, X86_64, ARM and other platforms.

Second, the state secret algorithm SM9

 

Will get an error during compilation, you need a cross-compiler, add c ++ 11 parameters, you can solve the problem

Eclipse environment to configure C ++ 11 Details

Right-click the project -> Properties-> C / C ++ Builder-> Setting-> Tool Setting-> Miscellanous-> Other Flags Add -std = c ++ 0x

 

 

Reference: https: //www.ctolib.com/songgeng87-SM9_FREE.html

https://blog.csdn.net/qq_35703954/article/details/81540315

https://www.cnblogs.com/mrblue/p/3262114.html

Guess you like

Origin www.cnblogs.com/little-kwy/p/12306106.html