Code Monkey home page Code Monkey logo

crypto's Introduction

Rust Crypto

๐Ÿšง Interested but not implemented yet โœ… Implemented โŒ Not Interested

Hardware:MacBook Pro(Retina, 15-inch, Mid 2015)
CPU:2.2 GHz Quad-Core Intel Core i7

OpenSSL:

sm4-ecb                  92 mb/s
aria-128-ecb            127 mb/s
camellia-128-ecb        141 mb/s
aes-128-ecb             636 mb/s

aes-128-gcm             356 mb/s
aes-128-ccm             133 mb/s
aes-128-ocb             346 mb/s
aria-128-gcm            103 mb/s
aria-128-ccm             31 mb/s
chacha20                538 mb/s
chacha20-poly1305       417 mb/s

sha256                   89 mb/s
sm3                      68 mb/s

Rust Crypto:

test blockcipher::bench_aes128_enc            ... bench:           3 ns/iter (+/- 0) = 5333 MB/s
test blockcipher::bench_aes256_enc            ... bench:           6 ns/iter (+/- 1) = 2666 MB/s
test blockcipher::bench_aria128_enc           ... bench:         347 ns/iter (+/- 33) = 46 MB/s
test blockcipher::bench_aria256_enc           ... bench:         444 ns/iter (+/- 25) = 36 MB/s
test blockcipher::bench_camellia128_enc       ... bench:         106 ns/iter (+/- 17) = 150 MB/s
test blockcipher::bench_camellia256_enc       ... bench:         133 ns/iter (+/- 11) = 120 MB/s
test blockcipher::bench_sm4_enc               ... bench:         210 ns/iter (+/- 27) = 76 MB/s

test streamcipher::bench_chacha20             ... bench:         203 ns/iter (+/- 22) = 315 MB/s

test aeadcipher::bench_aes128_ccm_enc         ... bench:          60 ns/iter (+/- 7) = 266 MB/s
test aeadcipher::bench_aes128_gcm_enc         ... bench:          40 ns/iter (+/- 1) = 400 MB/s
test aeadcipher::bench_aes128_gcm_siv_enc     ... bench:          75 ns/iter (+/- 3) = 213 MB/s
test aeadcipher::bench_aes128_ocb_tag_128_enc ... bench:           9 ns/iter (+/- 1) = 1777 MB/s
test aeadcipher::bench_aes_siv_cmac_256_enc   ... bench:         117 ns/iter (+/- 16) = 136 MB/s
test aeadcipher::bench_chacha20_poly1305_enc  ... bench:         359 ns/iter (+/- 27) = 178 MB/s

test hash::bench_sha256                       ... bench:         651 ns/iter (+/- 39) = 98 MB/s
test hash::bench_sm3                          ... bench:         800 ns/iter (+/- 48) = 80 MB/s
Platform:Huawei Cloud - Kunpeng General Computing-plus KC1 ECS ๏ผˆkc1.small.1 | 1vCPUs | 1GB๏ผ‰
CPU:Huawei Kunpeng 920 2.6GHz
OS:Debian 10.2.0 64bit for ARM

OpenSSL:

sm4-ecb                  73 mb/s
aria-128-ecb             87 mb/s
camellia-128-ecb        100 mb/s
aes-128-ecb             577 mb/s
aes-128-gcm             342 mb/s
aes-128-ccm             133 mb/s
aes-128-ocb             318 mb/s
aria-128-gcm             79 mb/s
aria-128-ccm             21 mb/s
chacha20                377 mb/s
chacha20-poly1305       312 mb/s
sm3                      84 mb/s
sha256                  190 mb/s

Rust Crypto:

test aeadcipher::bench_aes128_ccm_enc         ... bench:          25 ns/iter (+/- 0) = 640 MB/s
test aeadcipher::bench_aes128_gcm_enc         ... bench:          27 ns/iter (+/- 0) = 592 MB/s
test aeadcipher::bench_aes128_gcm_siv_enc     ... bench:          79 ns/iter (+/- 0) = 202 MB/s
test aeadcipher::bench_aes128_ocb_tag_128_enc ... bench:          21 ns/iter (+/- 0) = 761 MB/s
test aeadcipher::bench_aes_siv_cmac_256_enc   ... bench:          63 ns/iter (+/- 0) = 262 MB/s
test aeadcipher::bench_chacha20_poly1305_enc  ... bench:         436 ns/iter (+/- 7) = 146 MB/s
test blockcipher::bench_aes128_enc            ... bench:           6 ns/iter (+/- 0) = 2666 MB/s
test blockcipher::bench_aes256_enc            ... bench:          10 ns/iter (+/- 0) = 1600 MB/s
test blockcipher::bench_aria128_enc           ... bench:         289 ns/iter (+/- 2) = 55 MB/s
test blockcipher::bench_aria256_enc           ... bench:         390 ns/iter (+/- 4) = 41 MB/s
test blockcipher::bench_camellia128_enc       ... bench:         135 ns/iter (+/- 1) = 118 MB/s
test blockcipher::bench_camellia256_enc       ... bench:         177 ns/iter (+/- 1) = 90 MB/s

test blockcipher::bench_sm4_enc               ... bench:         434 ns/iter (+/- 3) = 36 MB/s
test blockmode::cfb::bench_aes128_cfb128_enc  ... bench:          20 ns/iter (+/- 0) = 800 MB/s
test blockmode::ofb::bench_aes128_ofb_enc     ... bench:          20 ns/iter (+/- 0) = 800 MB/s

test hash::bench_sha256                       ... bench:         103 ns/iter (+/- 0) = 621 MB/s

test hash::bench_sm3                          ... bench:       1,024 ns/iter (+/- 10) = 62 MB/s

test mac::bench_ghash                         ... bench:           0 ns/iter (+/- 0) = 16000 MB/s
test mac::bench_poly1305                      ... bench:          21 ns/iter (+/- 0) = 761 MB/s
test mac::bench_polyval                       ... bench:           0 ns/iter (+/- 8) = 16000 MB/s

test streamcipher::bench_chacha20             ... bench:         320 ns/iter (+/- 6) = 200 MB/s

X86/X86-64:

  • โœ… AES
  • โœ… CLMUL
  • โŒ SHA๏ผˆSHA1๏ผ‰
  • โœ… SHA๏ผˆSHA2-256๏ผ‰

AArch64:

  • โœ… AES
  • โœ… PMULL
  • โŒ SHA1
  • โœ… SHA2 ๏ผˆSHA2-256๏ผ‰
  • โŒ SHA512 (SHA2-512)
  • โŒ SHA3
  • โŒ SM3
  • โŒ SM4
  • โœ… MD2
  • โœ… MD4
  • โœ… MD5
  • โŒ MD6
  • โœ… SHA1
  • โœ… SHA2-256
  • โœ… SHA2-384
  • โœ… SHA2-512
  • ๐Ÿšง SHA3-256
  • ๐Ÿšง SHA3-384
  • ๐Ÿšง SHA3-512
  • โœ… SM3
  • โŒ BLAKE2b
  • โŒ BLAKE2s
  • โŒ BLAKE3
  • โŒ RIPEMD
  • โŒ Whirlpool
  • ๐Ÿšง GOST
  • โŒ DES
  • โŒ 3DES
  • โœ… RC2 (or: ARC2)
  • ๐Ÿšง RC5
  • โŒ RC6
  • โœ… AES
  • โœ… SM4
  • โœ… Camellia
  • โœ… ARIA
  • ๐Ÿšง GOST๏ผˆMagmaใ€Kuznyechik๏ผ‰
  • โŒ Blowfish
  • โŒ Twofish
  • โŒ Threefish
  • โœ… RC4
  • โœ… Chacha20
  • ๐Ÿšง ZUC (in Chinese: ็ฅ–ๅ†ฒไน‹็ฎ—ๆณ•)
  • โŒ RSA
  • โŒ ED25519
  • ๐Ÿšง SM2 ๏ผˆๅŸบไบŽๆคญๅœ†ๆ›ฒ็บฟ๏ผš็ญพๅ็ฎ—ๆณ•ใ€ๅฏ†้’ฅไบคๆข็ฎ—ๆณ•ใ€ๅŠ ๅฏ†็ฎ—ๆณ•๏ผ‰
  • ๐Ÿšง SM9 ๏ผˆๅŸบไบŽ็ฆปๆ•ฃๅฏนๆ•ฐ็š„ๆœบๅˆถ๏ผš็ญพๅ็ฎ—ๆณ•ใ€ๅฏ†้’ฅไบคๆข็ฎ—ๆณ•ใ€ๅŠ ๅฏ†็ฎ—ๆณ•๏ผ‰
  • โœ… Chacha20Poly1305 (RFC7539)
  • ๐Ÿšง Chacha20Poly1305OpenSSH
  • โœ… AES-CCM
  • โœ… AES-OCB
  • โœ… AES-GCM
  • โœ… AES-GCM-SIV
  • โœ… AES-SIV (AesSivCmac256ใ€AesSivCmac384ใ€AesSivCmac512)
  • โœ… CAMELLIA-CCM
  • โœ… CAMELLIA-GCM
  • โœ… CAMELLIA-GCM-SIV
  • โœ… ARIA-CCM
  • โœ… ARIA-GCM
  • โœ… ARIA-GCM-SIV
  • โœ… SM4-CCM
  • โœ… SM4-GCM
  • โœ… SM4-GCM-SIV
  • โœ… AES-ECB
  • โœ… AES-CBC
  • ๐Ÿšง AES-PCBC
  • โœ… AES-CFB1
  • โœ… AES-CFB8
  • โœ… AES-CFB64
  • โœ… AES-CFB128
  • โœ… AES-OFB
  • โœ… AES-CTR
  • โœ… CAMELLIA-CBC
  • โœ… CAMELLIA-CFB1
  • โœ… CAMELLIA-CFB8
  • โœ… CAMELLIA-CFB64
  • โœ… CAMELLIA-CFB128
  • โœ… CAMELLIA-OFB
  • โœ… CAMELLIA-CTR
  • โœ… ARIA-CBC
  • โœ… ARIA-CFB1
  • โœ… ARIA-CFB8
  • โœ… ARIA-CFB64
  • โœ… ARIA-CFB128
  • โœ… ARIA-OFB
  • โœ… ARIA-CTR
  • โœ… SM4-CBC
  • โœ… SM4-CFB1
  • โœ… SM4-CFB8
  • โœ… SM4-CFB64
  • โœ… SM4-CFB128
  • โœ… SM4-OFB
  • โœ… SM4-CTR
  • โœ… HKDF
  • ๐Ÿšง Scrypt
  • โŒ PBKDF2
  • โœ… HMAC
  • โœ… Poly1305
  • โœ… GMAC
  • โœ… CBC-Mac
  • โœ… CMac
  • ๐Ÿšง bcrypt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.