24 lines
909 B
Go
24 lines
909 B
Go
// Copyright 2022 xdx. All Rights Reserved.
|
|
// Created by xdx <xdx@xdx.jelly>.
|
|
|
|
// Package sm2 implements the GM/T 0003
|
|
package sm2
|
|
|
|
// Package ec256 实现SM2里的需要用到的curve接口。
|
|
// 可选tags
|
|
// generic64 pure go code, 64bits
|
|
// generic32 pure go code, 32bits
|
|
// generic =generic64
|
|
// amd64 with assamble code, in amd64 platform
|
|
// arm64 with assamble code, in arm64 platform, for android and iphone
|
|
|
|
/************************************************************
|
|
1、对公私钥、签名、密文等数据结构均使用MarshalBinary和UnmarshalBinary
|
|
来和字节序列转化,格式满足GMT0018。
|
|
MarshalBinary implements the encoding.BinaryMarshaler interface
|
|
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface
|
|
if o.UnmarshalBinary return error, then o is unchanged
|
|
*************************************************************/
|
|
|
|
// FIXME sm2曲线名改为 sm2p256v1
|