#block-cipher #cipher #block-size #key-exchange #key-length

libsm

A Rust Library of China's Standards of Encryption Algorithms (SM2/3/4)

5 unstable releases

0.6.0 Dec 26, 2023
0.5.1 Apr 19, 2023
0.5.0 May 26, 2022
0.4.1 Aug 20, 2021
0.3.0 Jul 10, 2018

#1188 in Cryptography

Download history 82/week @ 2024-09-11 107/week @ 2024-09-18 153/week @ 2024-09-25 52/week @ 2024-10-02 57/week @ 2024-10-09 92/week @ 2024-10-16 54/week @ 2024-10-23 56/week @ 2024-10-30 63/week @ 2024-11-06 53/week @ 2024-11-13 64/week @ 2024-11-20 87/week @ 2024-11-27 114/week @ 2024-12-04 183/week @ 2024-12-11 65/week @ 2024-12-18 5/week @ 2024-12-25

379 downloads per month
Used in 24 crates (15 directly)

Apache-2.0

120KB
3K SLoC

Libsm

Libsm is an open source pure rust library of China Cryptographic Algorithm Standards. It is completed by a collaborative effort between the Cryptape Technology LLC. and BEIHANG KNOC LAB. And now this project is maintained by Cryptape Technology LLC.

GM/T Algorithms

Libsm implements the following GM/T cryptographic algorithms:

  • SM2 (GM/T 0003-2012): elliptic curve cryptographic schemes including digital signature scheme, public key encryption, (authenticated) key exchange protocol and one recommended 256-bit prime field curve sm2p256v1.
  • SM3 (GM/T 0004-2012): cryptographic hash function with 256-bit digest length.
  • SM4 (GM/T 0002-2012): block cipher with 128-bit key length and 128-bit block size, also named SMS4.

Documents

License

Libsm is currently under the Apache 2.0 license.

Dependencies

~1–1.6MB
~31K SLoC