go

module
v0.0.0-...-a3cb33a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2020 License: BSD-3-Clause

README

The Go Language with SM2/SM3/SM4

This project add Chinese SM2/SM3/SM4 crypto standards into Go language.

run src/all.bash to build Go binaries.

SM3

SM3 is a hash function with 256-bit digest size.

package main

import (
	"crypto/sm3"
	"fmt"
)

func main() {
	sum := sm3.Sum([]byte("hello world\n"))
	fmt.Printf("%x", sum)
}

SM4

SM4 is a block cipher with 128-bit key length and 128-bit block size.

import "crypto/sm4"

SM2

SM2 is an ellptic curve crypto standards with the 256-bit recommanded curve.

Directories

Path Synopsis
doc
codewalk command
Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
play command
You can edit this code! Click here and start typing.
You can edit this code! Click here and start typing.
test
bench/garbage command
chan command
closure3.dir command
dwarf/dwarf.dir command
intrinsic.dir command
ken command
retjmp.dir command
stress command
The runstress tool stresses the runtime.
The runstress tool stresses the runtime.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL