Git Product home page Git Product logo

cryptobase's Introduction

CryptoBase

Channel Status
CI CI
CryptoBase NuGet.org
CryptoBase.Abstractions NuGet.org
CryptoBase.BouncyCastle NuGet.org

A fast crypto library for .NET

Wiki

Status

Icon Description
⚠️ Pending
Underway
Done

Digest algorithms

Digests Status
Blake3
CRC-32
CRC-32C
MD5
SHA1
SHA224
SHA256
SHA384
SHA512
SM3

Symmetric-key algorithms

Stream ciphers

Ciphers Status
ChaCha20(IETF 7539)
ChaCha20(Original)
RC4
Salsa20
XChaCha20
XSalsa20

Block ciphers

Ciphers Status
AES
SM4
Block cipher modes
  • ✅ CBC
  • ✅ CFB128(Stream)
  • ✅ CTR128(Stream)

Authenticated encryption algorithms

Ciphers Status
AES-GCM
ChaCha20Poly1305
SM4-GCM
XChaCha20Poly1305

Asymmetric cryptography

Ciphers Status
RSA
Curve25519
Ed25519
SM2
SM9

cryptobase's People

Contributors

dependabot[bot] avatar hmbsbige avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cryptobase's Issues

Using the range operator will result in significant performance loss

Jit

using System;

public class X
{
    public void A(ref Span<byte> span, int i)
    {
        span = span[i..];
    }

    public void B(ref Span<byte> span, int i)
    {
        span = span.Slice(i);
    }
}
; Core CLR 8.0.23.53103 on x64

X..ctor()
    L0000: ret

X.A(System.Span`1<Byte> ByRef, Int32)
    L0000: sub rsp, 0x28
    L0004: mov rax, rdx
    L0007: mov eax, [rax+8]
    L000a: mov ecx, eax
    L000c: sub ecx, r8d
    L000f: mov r8d, r8d
    L0012: mov r10d, ecx
    L0015: add r10, r8
    L0018: cmp r10, rax
    L001b: ja short L002b
    L001d: add r8, [rdx]
    L0020: mov [rdx], r8
    L0023: mov [rdx+8], ecx
    L0026: add rsp, 0x28
    L002a: ret
    L002b: mov rax, 0x7ffb10a5ead8
    L0035: call qword ptr [rax]
    L0037: int3

X.B(System.Span`1<Byte> ByRef, Int32)
    L0000: sub rsp, 0x28
    L0004: mov eax, [rdx+8]
    L0007: cmp r8d, eax
    L000a: ja short L0020
    L000c: mov ecx, r8d
    L000f: add rcx, [rdx]
    L0012: sub eax, r8d
    L0015: mov [rdx], rcx
    L0018: mov [rdx+8], eax
    L001b: add rsp, 0x28
    L001f: ret
    L0020: mov rax, 0x7ffb10a5ead8
    L002a: call qword ptr [rax]
    L002c: int3

So just ignore IDE0057

Faster ChaCha20 and Poly1305

  • Poly1305
    • 2 block SSE2
    • 4 block AVX2
  • ChaCha20
    • 2 block AVX2
    • 4 block SSSE3
    • 8 block AVX2
  • Salsa20
    • 2 block AVX2
    • 4 block SSE2
    • 8 block AVX2

More digest algorithms

  • CRC-32
    • PCLMULQDQ
  • CRC-32C
    • SSE4.2
    • SSE4.2 + PCLMULQDQ
  • SHA1
    • SSSE3
    • AVX2
    • SHA1NI
  • SHA2
    • SSSE3
    • AVX2
    • SHA2NI
    • SHA224
      • Software
    • SHA384
      • Software

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.