All Projects → Hyperledger-TWGC → java-gm

Hyperledger-TWGC / java-gm

Licence: Apache-2.0 license
Java语言国密基础库

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to java-gm

libsm
A Rust Library of China's Standards of Encryption Algorithms (SM2/3/4)
Stars: ✭ 112 (+239.39%)
Mutual labels:  sm2, sm3, sm4
yogcrypt
A fast, general purpose crypto library in pure Rust.
Stars: ✭ 18 (-45.45%)
Mutual labels:  sm2, sm3, sm4
phpsm2sm3sm4
php版本,支持国密sm2的签名算法,非对称加解密,sm3的hash, sm4的对称加解密
Stars: ✭ 80 (+142.42%)
Mutual labels:  sm2, sm3, sm4
Gmssl
支持国密SM2/SM3/SM4/SM9/ZUC/SSL的OpenSSL分支
Stars: ✭ 2,747 (+8224.24%)
Mutual labels:  sm2, sm3, sm4
cryptogm
An implement of china crypto standards, including sm2,sm3 ,sm4 and sm9 algorithms.
Stars: ✭ 26 (-21.21%)
Mutual labels:  sm2, sm3, sm4
ngx http hmac secure link module
HMAC Secure Link module for NGINX.
Stars: ✭ 47 (+42.42%)
Mutual labels:  hash, sm3
sm
php国密SM3,sm4算法
Stars: ✭ 132 (+300%)
Mutual labels:  sm3, sm4
littleca
littleca是一个基于BC的小型ca库,支持ecc,rsa,dsa,sm2的证书签发,加密解密,签名验签操作,支持国密加解密,证书签发
Stars: ✭ 44 (+33.33%)
Mutual labels:  gm, sm2
hash-wasm
Lightning fast hash functions using hand-tuned WebAssembly binaries
Stars: ✭ 382 (+1057.58%)
Mutual labels:  hash, sm3
bookshelf-secure-password
A Bookshelf.js plugin for handling secure passwords
Stars: ✭ 24 (-27.27%)
Mutual labels:  hash
go-merkle
A fixed Merkle Tree implementation in Go
Stars: ✭ 36 (+9.09%)
Mutual labels:  hash
Dictionary
A dictionary data type with a fast b-tree based search
Stars: ✭ 39 (+18.18%)
Mutual labels:  hash
BruteForce
A simple brute forcer written in GO for SHA1, SHA256, SHA512, MD5 and bcrypt
Stars: ✭ 49 (+48.48%)
Mutual labels:  hash
telfhash
Symbol hash for ELF files
Stars: ✭ 75 (+127.27%)
Mutual labels:  hash
bcrypt
BCrypt is a password hashing function
Stars: ✭ 138 (+318.18%)
Mutual labels:  hash
hashids.pm
Hashids, ported for Perl
Stars: ✭ 15 (-54.55%)
Mutual labels:  hash
enigma
A fast, native, cryptographic engine for the web
Stars: ✭ 101 (+206.06%)
Mutual labels:  hash
patchmap
A fast and memory efficient hashmap using sorting to resolve collisions
Stars: ✭ 41 (+24.24%)
Mutual labels:  hash
fhash
fHash - an open source files hash calculator for Windows and macOS
Stars: ✭ 222 (+572.73%)
Mutual labels:  hash
MM.Hash
Profit Switching Miner For HiveOS/Linux- OLD VERSION: Project Moved To SWARM! https://github.com/MaynardMiner/SWARM
Stars: ✭ 17 (-48.48%)
Mutual labels:  hash

java-gm

基于BouncyCastle实现国密算法SM2、SM3、SM4的操作类,并验证与其他语言(NodeJS、Go)实现的国密库的互操作性。

Build Status

Feature 功能支持列表

SM2功能 支持范围
Generate KeyPair
Derive public key from private key
Sign
Verify
PEM格式导出 私钥/公钥/CSR
PEM文件加密 RFC5958
PEM格式导入 私钥/公钥/CSR

备注:

C1C3C2和SM2SM3作为默认的加密和Hash算法,同时接口层面保留C1C2C3和其他Hash方式的支持。

SM4功能 支持范围
Generate Key
Encrypt, Decrypt
PEM格式导出
PEM文件加密
分组模式 ECB/CBC/CFB/OFB/CTR
SM3功能 支持范围
当前语言Hash接口兼容

ObjectPoolSupport

我们采用了可配置的对象池的方案来提供相对便利的多线程支持。 如:

    static SM2EnginePool sm2EnginePool = new SM2EnginePool(SM2Engine.Mode.C1C3C2);
    SM2Engine sm2Engine = sm2EnginePool.borrowObject();
    byte[] encrypted = instance.encrypt(sm2Engine, this.pubKey, message);
    byte[] rs = instance.decrypt(sm2Engine, this.privKey, encrypted);
    Assert.assertEquals(new String(message), new String(rs));
    sm2EnginePool.returnObject(sm2Engine);

具体对象池的配置参考如下文件: pool-config.yaml, 我们目前尚未使用统一的对象池,而是根据不同密码学算法使用不同的对象池。 这里是考虑到不同算法的执行效率并不相同,因此例如sm2+sm3的操作: 我们可以考虑用一个数量更小的sm3对象池,来对接一个sm2对象池,来实现摘要(SM3)签名(SM2)这一密码学实现。

Terminology 术语

  • SM2: 国密椭圆曲线算法库
  • SM3: 国密hash算法库
  • SM4: 国密分组密码算法库

How to Contribute 贡献须知

We welcome contributions to Hyperledger in many forms, and there's always plenty to do!

Please visit the contributors guide in the docs to learn how to make contributions to this exciting project.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

License 许可证

Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].