zed/crates/rpc/Cargo.toml
Marshall Bowers c84da37030
rpc: Add support for OAEP-based encryption format (#15058)
This PR adds support for a new encryption format for exchanging access
tokens during the authentication flow.

The new format uses Optimal Asymmetric Encryption Padding (OAEP) instead
of PKCS#1 v1.5, which is known to be vulnerable to side-channel attacks.

**Note: We are not yet encrypting access tokens using the new format, as
this is a breaking change between the client and the server. This PR
only adds support for it, and makes it so the client and server can
decrypt either format moving forward.**

This required bumping the RSA key size from 1024 bits to 2048 bits. This
is necessary to be able to encode the access token into the ciphertext
when using OAEP.

This also follows OWASP recommendations:

> If ECC is not available and RSA must be used, then ensure that the key
is at least 2048 bits.
>
> —
[source](https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html#algorithms)

Release Notes:

- N/A
2024-07-23 21:25:25 -04:00

48 lines
1.2 KiB
TOML

[package]
description = "Shared logic for communication between the Zed app and the zed.dev server"
edition = "2021"
name = "rpc"
version = "0.1.0"
publish = false
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
path = "src/rpc.rs"
doctest = false
[features]
test-support = ["collections/test-support", "gpui/test-support", "proto/test-support"]
[dependencies]
anyhow.workspace = true
async-tungstenite.workspace = true
base64.workspace = true
chrono.workspace = true
collections.workspace = true
futures.workspace = true
gpui = { workspace = true, optional = true }
parking_lot.workspace = true
proto.workspace = true
rand.workspace = true
rsa.workspace = true
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
strum.workspace = true
tracing = { version = "0.1.34", features = ["log"] }
util.workspace = true
zstd = "0.11"
[target.'cfg(target_os = "linux")'.dependencies]
zstd = { version = "0.11", features = [ "pkg-config" ] }
[dev-dependencies]
collections = { workspace = true, features = ["test-support"] }
env_logger.workspace = true
gpui = { workspace = true, features = ["test-support"] }
proto = { workspace = true, features = ["test-support"] }