Code Monkey home page Code Monkey logo

crypto_test's Introduction

常用加密算法使用,交叉编译RSICV平台进行测试

1234

opensource

https://github.com/weidai11/cryptopp
website https://www.cryptopp.com/index.html
example https://www.cryptopp.com/wiki/Category:Sample

修改编译文件

setenv-embedded.sh 修改 ARM_EMBEDDED_TOOLCHAIN,TOOL_PREFIX, ARM_EMBEDDED_SYSROOT,ARM_EMBEDDED_TOOLCHAIN_VERSION, ARM_EMBEDDED_FLAGS,ARM_EMBEDDED_CXX_HEADERS等参数,修改arm平台为RSICV平台

GNUmakefile-cross 去掉 --sysroot=$(ARM_EMBEDDED_SYSROOT) 编译选项

交叉编译命令

$ source ./setenv-embedded.sh
$ make -f GNUmakefile-cross

编译测试Demo

// x86编译
g++ -g3 -ggdb -O0 -Wall -Wextra -Wno-unused -o test test.cpp /usr/local/lib/libcryptopp.a

// 交叉编译
riscv64-unknown-linux-gnu-g++  -g3 -ggdb -O0 -Wall -Wextra -Wno-unused -o test_cross test.cpp -I/usr/local/include/ ./libcryptopp.a 

运行结果

以下是在RISCV Vitrual PlatForm 的运行结果
每个算法测试次数 TEST_COUNT 为 100万次 time_cost 为消耗的时间,单位为毫秒

riscv_test

运行时cpu占满

cpu

crypto_test's People

Contributors

yywbxgl avatar

Watchers

James Cloos 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.