upgrade shadowsocks-crypto

- AArch64 intrinsics are now available on stable rust since v1.59
- Upgrades rust-crypto to v0.10
This commit is contained in:
zonyitoo
2022-12-10 12:15:39 +08:00
parent 5fd7ec6386
commit bd5badbc2f
6 changed files with 49 additions and 91 deletions
+1 -5
View File
@@ -48,10 +48,6 @@ jobs:
fi
fi
if [[ "$compile_target" == "aarch64-"* ]]; then
compile_features="$compile_features -f armv8 -f neon"
fi
cd build
./build-release -t ${{ matrix.target }} $compile_features $compile_compress
@@ -64,7 +60,7 @@ jobs:
build-unix:
runs-on: ${{ matrix.os }}
env:
BUILD_EXTRA_FEATURES: "local-redir local-tun armv8 neon"
BUILD_EXTRA_FEATURES: "local-redir local-tun"
RUST_BACKTRACE: full
strategy:
matrix:
+1 -5
View File
@@ -62,10 +62,6 @@ jobs:
fi
fi
if [[ "$compile_target" == "aarch64-"* ]]; then
compile_features="$compile_features -f armv8 -f neon"
fi
cd build
./build-release -t ${{ matrix.target }} $compile_features $compile_compress
@@ -80,7 +76,7 @@ jobs:
build-unix:
runs-on: ${{ matrix.os }}
env:
BUILD_EXTRA_FEATURES: "local-redir local-tun armv8 neon"
BUILD_EXTRA_FEATURES: "local-redir local-tun"
RUST_BACKTRACE: full
strategy:
matrix:
Generated
+43 -64
View File
@@ -4,26 +4,14 @@ version = 3
[[package]]
name = "aead"
version = "0.4.3"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8"
dependencies = [
"crypto-common",
"generic-array",
]
[[package]]
name = "aes"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
dependencies = [
"cfg-if",
"cipher 0.3.0",
"cpufeatures",
"ctr",
"opaque-debug",
]
[[package]]
name = "aes"
version = "0.8.2"
@@ -31,19 +19,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241"
dependencies = [
"cfg-if",
"cipher 0.4.3",
"cipher",
"cpufeatures",
]
[[package]]
name = "aes-gcm"
version = "0.9.4"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6"
checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c"
dependencies = [
"aead",
"aes 0.7.5",
"cipher 0.3.0",
"aes",
"cipher",
"ctr",
"ghash",
"subtle",
@@ -51,13 +39,13 @@ dependencies = [
[[package]]
name = "aes-gcm-siv"
version = "0.10.3"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc"
checksum = "ae0784134ba9375416d469ec31e7c5f9fa94405049cf08c5ce5b4698be673e0d"
dependencies = [
"aead",
"aes 0.7.5",
"cipher 0.3.0",
"aes",
"cipher",
"ctr",
"polyval",
"subtle",
@@ -243,12 +231,12 @@ checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
[[package]]
name = "ccm"
version = "0.4.4"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a9cf981c7e62b6fb02225592ee7ebf221e0b0b5317984a57a1e9d21af20e317"
checksum = "9ae3c82e4355234767756212c570e29833699ab63e6ffd161887314cc5b43847"
dependencies = [
"aead",
"cipher 0.3.0",
"cipher",
"ctr",
"subtle",
]
@@ -261,25 +249,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chacha20"
version = "0.8.2"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6"
checksum = "c7fc89c7c5b9e7a02dfe45cd2367bae382f9ed31c61ca8debe5f827c420a2f08"
dependencies = [
"cfg-if",
"cipher 0.3.0",
"cipher",
"cpufeatures",
"zeroize",
]
[[package]]
name = "chacha20poly1305"
version = "0.9.1"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5"
checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
dependencies = [
"aead",
"chacha20",
"cipher 0.3.0",
"cipher",
"poly1305",
"zeroize",
]
@@ -305,15 +292,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "cipher"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
"generic-array",
]
[[package]]
name = "cipher"
version = "0.4.3"
@@ -322,6 +300,7 @@ checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e"
dependencies = [
"crypto-common",
"inout",
"zeroize",
]
[[package]]
@@ -441,16 +420,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
"rand_core",
"typenum",
]
[[package]]
name = "ctr"
version = "0.8.0"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
dependencies = [
"cipher 0.3.0",
"cipher",
]
[[package]]
@@ -857,9 +837,9 @@ dependencies = [
[[package]]
name = "ghash"
version = "0.4.4"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99"
checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40"
dependencies = [
"opaque-debug",
"polyval",
@@ -1681,9 +1661,9 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "poly1305"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede"
checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
dependencies = [
"cpufeatures",
"opaque-debug",
@@ -1692,9 +1672,9 @@ dependencies = [
[[package]]
name = "polyval"
version = "0.5.3"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1"
checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -1845,8 +1825,7 @@ dependencies = [
[[package]]
name = "ring-compat"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6242f589b69a0555addb0bb759f81e5cba40485d38b36f780ab3a588b2bdf064"
source = "git+https://github.com/RustCrypto/ring-compat.git#64db60e8f6752bc7cc506dd134037b198a5511f6"
dependencies = [
"aead",
"digest 0.9.0",
@@ -2119,7 +2098,7 @@ dependencies = [
name = "shadowsocks"
version = "1.15.0"
dependencies = [
"aes 0.8.2",
"aes",
"arc-swap",
"async-trait",
"base64",
@@ -2155,11 +2134,10 @@ dependencies = [
[[package]]
name = "shadowsocks-crypto"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db328db53587068194944fb659b7c8853bfd8b314178231c69d34656e687e08d"
version = "0.5.0"
source = "git+https://github.com/shadowsocks/shadowsocks-crypto.git#bae4a3701e6110ddf82e77d14142c504f35e982e"
dependencies = [
"aes 0.7.5",
"aes",
"aes-gcm",
"aes-gcm-siv",
"blake3",
@@ -2168,6 +2146,7 @@ dependencies = [
"cfg-if",
"chacha20",
"chacha20poly1305",
"ctr",
"hkdf",
"md-5",
"rand",
@@ -2767,11 +2746,11 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
[[package]]
name = "universal-hash"
version = "0.4.1"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05"
checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5"
dependencies = [
"generic-array",
"crypto-common",
"subtle",
]
@@ -3096,6 +3075,6 @@ dependencies = [
[[package]]
name = "zeroize"
version = "1.3.0"
version = "1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd"
checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f"
-5
View File
@@ -136,11 +136,6 @@ aead-cipher-2022-extra = ["shadowsocks-service/aead-cipher-2022-extra"]
security-replay-attack-detect = ["shadowsocks-service/security-replay-attack-detect"]
replay-attack-detect = ["security-replay-attack-detect"] # Backward compatibility. DO NOT USE.
# Enable ARMv8 related optimizations
armv8 = ["shadowsocks-service/armv8"]
# Enable NEON releated optimizations
neon = ["shadowsocks-service/neon"]
[dependencies]
log = "0.4"
log4rs = { version = "1.2", optional = true }
-5
View File
@@ -76,11 +76,6 @@ aead-cipher-2022-extra = ["shadowsocks/aead-cipher-2022-extra"]
# Enable detection against replay attack
security-replay-attack-detect = ["shadowsocks/security-replay-attack-detect"]
# Enable ARMv8 related optimizations
armv8 = ["shadowsocks/armv8"]
# Enable NEON releated optimizations
neon = ["shadowsocks/neon"]
[dependencies]
log = "0.4"
+4 -7
View File
@@ -39,11 +39,6 @@ aead-cipher-2022-extra = ["aead-cipher-2022", "shadowsocks-crypto/v2-extra"]
# Enable detection against replay attack
security-replay-attack-detect = ["bloomfilter"]
# Enable ARMv8 related optimizations
armv8 = ["shadowsocks-crypto/armv8"]
# Enable NEON releated optimizations
neon = ["shadowsocks-crypto/neon"]
[dependencies]
log = "0.4"
@@ -81,10 +76,12 @@ aes = { version = "0.8", optional = true }
blake3 = "1.3"
[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
shadowsocks-crypto = { version = "0.4", features = ["ring"] }
#shadowsocks-crypto = { version = "0.4", features = ["ring"] }
shadowsocks-crypto = { git = "https://github.com/shadowsocks/shadowsocks-crypto.git", features = ["ring"] }
[target.'cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies]
shadowsocks-crypto = { version = "0.4", features = [] }
#shadowsocks-crypto = { version = "0.4", features = [] }
shadowsocks-crypto = { git = "https://github.com/shadowsocks/shadowsocks-crypto.git", features = [] }
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.42", features = ["Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_System_IO"] }