Skip to content

Instantly share code, notes, and snippets.

@rayyee
Last active August 4, 2021 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rayyee/53433c2b5dbb7e39eee795b5a6af07ba to your computer and use it in GitHub Desktop.
Save rayyee/53433c2b5dbb7e39eee795b5a6af07ba to your computer and use it in GitHub Desktop.
GM/T0003-2012

GM/T0003-2012《SM2 public key cryptographic algorithm based on elliptic curves》

#!/usr/bin/env node
const { SM2 } = require('gm-crypto');
const { publicKey, privateKey } = SM2.generateKeyPair();
console.log("publicKey is: ", publicKey);
console.log("privateKey is: ", privateKey);
{
"name": "gm",
"version": "0.0.0",
"bin": "./index.js",
"dependencies": {
"gm-crypto": "https://github.com/byte-fe/gm-crypto.git"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment