whatisgithub

What is sm2_sm4_codesign?

huangjing3555-blip/sm2_sm4_codesign — explained in plain English

Analysis updated 2026-05-18

11PythonAudience · researcherComplexity · 4/5Setup · moderate

In one sentence

An academic demo pairing a Windows PC and an Orange Pi board to show SM2/SM4 Chinese cryptography with hardware accelerated decryption on the Pi's chip.

Mindmap

mindmap
  root((SM2 SM4 Codesign))
    What it does
      Demonstrates SM2 key negotiation
      Encrypts files with SM4
      Compares hardware vs software decrypt
    Tech stack
      Python
      gmssl library
      RK3588 hardware crypto engine
    Use cases
      Academic cryptography demo
      Benchmark hardware acceleration
      Thesis defense chart generation
    Audience
      Cryptography students
      Embedded security researchers
    Setup
      Windows PC client
      Orange Pi 5 Plus server
      Manual public key exchange

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Demonstrate SM2 based key negotiation between two devices over a local network.

USE CASE 2

Compare hardware accelerated versus software SM4 file decryption performance on an Orange Pi.

USE CASE 3

Teach or present applied Chinese national cryptography standards in an academic setting.

USE CASE 4

Export throughput and CPU usage data as a CSV chart for a thesis or presentation.

What is it built with?

PythongmsslFastAPIRK3588

How does it compare?

huangjing3555-blip/sm2_sm4_codesign2arons/llm-cliadzza/guardium-dns
Stars111111
LanguagePythonPythonPython
Setup difficultymoderateeasymoderate
Complexity4/52/53/5
Audienceresearcherdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires an Orange Pi 5 Plus board plus a manual public key exchange step between both machines.

No license information is given in the README, so terms of use are unclear.

So what is it?

This project is a demonstration system built by researchers at Jinan University's College of Cyber Security, showing how software and hardware can work together to encrypt data using SM2 and SM4, two Chinese national cryptography standards. It pairs a Windows PC acting as a client with an Orange Pi 5 Plus single board computer acting as a server, communicating over a local network connection. The system's main point of interest is that the Orange Pi server does not rely purely on software for its encryption work. Its RK3588 chip includes a hardware cryptography engine, and the project calls into it directly through a Linux kernel interface so that SM4 decryption can be sped up by real hardware instead of running entirely in software. If that hardware acceleration is not available on a given device, the code automatically falls back to a pure software implementation, so the demo still works either way. To use it, a person installs Python along with a Chinese cryptography library called gmssl on both machines, starts the server script on the Orange Pi and a small local web app on the Windows PC, and then exchanges each side's public identity key with the other, a manual step meant to represent how real certificate distribution would prevent a middleman from intercepting the connection. From there, the PC's browser interface is used to log in, connect to the Orange Pi over the network, and trigger an SM2 based key negotiation between the two machines. Once the two sides agree on a session key, the interface lets a user pick a file, typically in the tens of megabytes, and send it encrypted with SM4, choosing whether the receiving side should decrypt it using its hardware engine or a plain software routine. A live chart compares the throughput and CPU usage of the two decryption paths side by side, and scrolling text shows the encrypted data as it moves. Results can be exported as a CSV file, which the authors describe as useful for building charts for an academic presentation or thesis defense. This project is aimed at students and researchers studying applied cryptography and embedded hardware acceleration, not general developers looking for a ready made encryption library.

Copy-paste prompts

Prompt 1
Help me set up the Orange Pi server and Windows client for this SM2/SM4 demo.
Prompt 2
Explain how the SM2 key negotiation step works between the client and server in this project.
Prompt 3
Show me how to exchange public identity keys between the PC and Orange Pi safely.
Prompt 4
Explain how the Orange Pi uses its hardware crypto engine to speed up SM4 decryption.
Prompt 5
Help me interpret the exported performance CSV comparing hardware and software decryption.

Frequently asked questions

What is sm2_sm4_codesign?

An academic demo pairing a Windows PC and an Orange Pi board to show SM2/SM4 Chinese cryptography with hardware accelerated decryption on the Pi's chip.

What language is sm2_sm4_codesign written in?

Mainly Python. The stack also includes Python, gmssl, FastAPI.

What license does sm2_sm4_codesign use?

No license information is given in the README, so terms of use are unclear.

How hard is sm2_sm4_codesign to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is sm2_sm4_codesign for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.