Giter Site home page Giter Site logo

greendow / sm2-encrypt-and-decrypt Goto Github PK

View Code? Open in Web Editor NEW
96.0 96.0 54.0 16 KB

An implementation of computing SM2 encryption and decryption is provided. Header files and library files of OpenSSL 1.1.1 or higher version are needed while compiling and linking.

License: MIT License

C 100.00%

sm2-encrypt-and-decrypt's People

Contributors

greendow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sm2-encrypt-and-decrypt's Issues

可不可以把密钥交换也完善了

有的场合需要密钥交换(密钥协商)。如:新能源国标数据传送,非道路国六数据给国家平台传送,很多都需要。
但是在openssl1.1.1d 里面我看貌似没有。
GMssl 那个里面封装的很麻烦,而且他的sm2test.c 里面的不是用高级接口,而是使用的那种低级直接的接口搞得。
因此,恳请大侠有空的时候,把这个也给实现了。小弟将不胜感激。

更换公钥报错

if ( !(EC_POINT_set_affine_coordinates_GFp(group,
pub_key_pt,
bn_pub_key_x,
bn_pub_key_y,
ctx)) )
{
goto clean_up;//错误走到这里,是什么问题,谢谢基于OpenSSL 1.1.1
}

resource leak

in file: sm2_encrypt_and_decrypt.c
func: sm2_decrypt
md_ctx forget free

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.