ty 31e8910b6a chore(deps): upgrade RustCrypto stack to latest versions
Upgrade all cryptography dependencies to their latest versions and
migrate the codebase to the new RustCrypto 0.11 ecosystem APIs.

Dependency updates:
- aes-gcm 0.10 -> 0.11.0-rc.3
- aes-gcm-siv 0.11 -> 0.12.0-rc.3
- ccm 0.5 -> 0.6.0-rc.3
- chacha20poly1305 0.10 -> 0.11.0-rc.3
- aead 0.5 -> 0.6.0-rc.10
- aes 0.8 -> 0.9
- chacha20 0.9 -> 0.10
- ctr 0.9 -> 0.10
- camellia 0.1 -> 0.2
- sm4 0.5 -> 0.6
- ghash 0.5 -> 0.6
- subtle 2.5 -> 2.6
- bytes 1.3 -> 1.11
- blake3 1.3 -> 1.8

The AEAD crates remain on their 0.11 rc releases because the stable
0.10 line still pins aes 0.8 and ghash 0.5, which would conflict with
the upgraded block/universal-hash stack.

API migration:
- Replace aead::generic_array with aead::array (hybrid-array)
- Replace AeadInPlace with AeadInOut (encrypt_inout_detached /
  decrypt_inout_detached take InOutBuf)
- Update AeadCore impl for SM4-GCM: drop CiphertextOverhead, add
  TAG_POSITION constant
- Replace deprecated Array::from_slice / from_mut_slice with TryFrom
- Rename cipher::{BlockEncrypt, BlockDecrypt} imports to their
  BlockCipher{Encrypt,Decrypt} counterparts
- Import Unsigned from typenum (cipher::typenum / aead::array::typenum)
- Use cipher::Iv for chacha20 nonce (Nonce is no longer re-exported)

Also bump rust-version to 1.85 to match the MSRV of the new
RustCrypto crates.
2026-08-27 01:25:38 +08:00
2020-11-07 19:24:27 +08:00
2023-10-24 00:06:49 +08:00

shadowsocks-crypto

Build & Test

shadowsocks' flavored cryptographic algorithm in pure Rust.

Supported Ciphers

Stream Ciphers:

  • SS_TABLE
  • SS_RC4_MD5
  • AES_128_CTR, AES_192_CTR, AES_256_CTR
  • AES_128_CFB1, AES_128_CFB8, AES_128_CFB128, AES_192_CFB1, AES_192_CFB8, AES_192_CFB128, AES_256_CFB1, AES_256_CFB8, AES_256_CFB128
  • AES_128_OFB, AES_192_OFB, AES_256_OFB
  • CAMELLIA_128_CTR, CAMELLIA_192_CTR, CAMELLIA_256_CTR
  • CAMELLIA_128_CFB1, CAMELLIA_128_CFB8, CAMELLIA_128_CFB128, CAMELLIA_192_CFB1, CAMELLIA_192_CFB8, CAMELLIA_192_CFB128, CAMELLIA_256_CFB1, CAMELLIA_256_CFB8, CAMELLIA_256_CFB128
  • CAMELLIA_128_OFB, CAMELLIA_192_OFB, CAMELLIA_256_OFB
  • RC4
  • CHACHA20 (IETF Version)

AEAD Ciphers:

  • AES_128_CCM, AES_256_CCM
  • AES_128_GCM, AES_256_GCM
  • AES_128_GCM_SIV, AES_256_GCM_SIV
  • CHACHA20_POLY1305 (IETF Version)
  • XCHACHA20_POLY1305 (IETF Version)
  • AES_128_OCB_TAGLEN128, AES_192_OCB_TAGLEN128, AES_256_OCB_TAGLEN128
  • AES_SIV_CMAC_256, AES_SIV_CMAC_384, AES_SIV_CMAC_512
  • SM4_GCM, SM4_CCM

AEAD 2022 Ciphers (SIP022):

  • AEAD2022_BLAKE3_AES_128_GCM, AEAD2022_BLAKE3_AES_256_GCM
  • AEAD2022_BLAKE3_CHACHA20_POLY1305, AEAD2022_BLAKE3_CHACHA8_POLY1305
Languages
Rust 100%