Git Product home page Git Product logo

sm3_try_fast's Introduction

SM3实现并加速

运行方式

编译器运行即可

文件说明

main.cpp 速度测试

fast_sm3.h 算法实现过程的各种函数声明

fast_sm3.cpp SM3算法函数定义

函数解释

SM3_cpmpress

对传入的block进行压缩,主要调用消息拓展和CF函数

image

CF

对64byte的大端序数据进行压缩,得到传入block的压缩值,更新到ctx->state中

image

SM3_process

处理input的前几个block,并将最后一个不满64byte的block预处理一下

image

SM3_paddingpart

处理最后一个不满64byte的数据块,主要是填充后进行压缩,并将最终结果正确拷贝到output

image

SM3

计算传入的input的SM3值并储存到output中

image

timetest

时间测试函数

main函数

image

运行结果

image

一秒做180w次计算

sm3_try_fast's People

Contributors

jinyuanliu1 avatar

Watchers

 avatar

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.