[package]
name = "typhoon-protocol"
version = "0.1.0"
edition = "2024"
license = "GPL-3.0-only"
description = "A sample implementation of TYPHOON protocol"
repository = "https://github.com/pseusys/TYPHOON"
readme = "README.md"
authors = [
"Alexander Sergeev <aleksandr.sergeev.dm@gmail.com>"
]
[lib]
name = "typhoon"
[features]
default = ["fast_software", "server", "client", "tokio"]
fast_software = ["dep:chacha20"]
fast_hardware = ["dep:aes", "dep:ctr"]
full_software = ["dep:chacha20", "dep:chacha20poly1305"]
full_hardware = ["dep:aes", "dep:ctr", "dep:aes-gcm"]
server = ["dep:socket2"]
client = []
debug = ["client", "server"]
capture = []
async-std = ["dep:async-channel", "dep:async-executor", "dep:async-io", "dep:async-lock"]
tokio = ["dep:tokio"]
[dependencies]
aes = { version = "^0.8.4", optional = true }
aes-gcm = { version = "^0.10.3", features = ["std"], optional = true }
async-channel = { version = "^2.5.0", optional = true }
async-executor = { version = "^1.13.3", optional = true }
async-io = { version = "^2.6.0", optional = true }
async-lock = { version = "^3.4.2", optional = true }
arc-swap = "^1.7"
async-trait = "^0.1"
bitflags = "^2.10.0"
clap = { version = "^4.5", features = ["derive"], optional = true }
blake3 = "^1.8.3"
cfg-if = "^1.0.4"
crossbeam = "^0.8.4"
ctr = { version = "^0.9.2", optional = true }
chacha20 = { version = "^0.10.0", features = ["xchacha"], optional = true }
chacha20poly1305 = { version = "^0.10.1", features = ["std"], optional = true }
classic-mceliece-rust = { version = "^3.1.0", features = ["mceliece348864"] }
ed25519-dalek = "^2.2.0"
futures = "^0.3.31"
log = "^0.4.29"
rand = "^0.8.5"
subtle = "^2.6.1"
thiserror = "^2.0.18"
tokio = { version = "^1.47.1", features = ["net", "sync", "time", "rt", "rt-multi-thread", "macros"], optional = true }
rand_distr = "^0.4.3"
socket2 = { version = "^0.5", features = ["all"], optional = true }
weighted_rand = "^0.4.2"
x25519-dalek = { version = "^2.0.1", features = ["static_secrets"] }
[target.'cfg(target_os = "linux")'.dependencies]
libc = "^0.2"
[dev-dependencies]
criterion = { version = "^0.5", features = ["async_tokio"] }
env_logger = "^0.11"
rand_chacha = "^0.3"
tempfile = "^3.15"
[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
cast_possible_truncation = "allow"
cast_sign_loss = "allow"
cast_precision_loss = "allow"
cast_lossless = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
doc_markdown = "allow"
must_use_candidate = "allow"
similar_names = "allow"
too_many_lines = "allow"
too_many_arguments = "allow"
type_complexity = "allow"
trivially_copy_pass_by_ref = "allow"
wildcard_imports = "allow"
large_enum_variant = "allow"
return_self_not_must_use = "allow"
needless_pass_by_value = "allow"
mut_from_ref = "allow"
large_stack_arrays = "allow"
float_cmp = "allow"
same_length_and_capacity = "allow"
module_inception = "allow"
missing_fields_in_debug = "allow"
unnecessary_wraps = "allow"
len_without_is_empty = "allow"
unused_async = "allow"
[[test]]
name = "network"
path = "tests/network/main.rs"
required-features = ["client", "server", "tokio"]
[[bin]]
name = "typhoon-debug"
path = "src/bin/typhoon_debug.rs"
required-features = ["debug"]
[[bin]]
name = "typhoon-gen-key"
path = "src/bin/typhoon_gen_key.rs"
required-features = ["server", "clap"]
[[bench]]
name = "roundtrip"
path = "benches/roundtrip.rs"
harness = false
required-features = ["client", "server", "tokio"]
[[bench]]
name = "handshake"
path = "benches/handshake.rs"
harness = false
required-features = ["client", "server", "tokio"]
[[example]]
name = "hello_world"
path = "example/hello_world.rs"
required-features = ["client", "server"]
[[example]]
name = "debug_probe"
path = "example/debug_probe.rs"
required-features = ["debug"]
[[example]]
name = "multi_flow"
path = "example/multi_flow.rs"
required-features = ["client", "server"]
[[example]]
name = "long_session"
path = "example/long_session.rs"
required-features = ["client", "server"]
[[example]]
name = "multi_client"
path = "example/multi_client.rs"
required-features = ["client", "server"]
[[example]]
name = "heavy_traffic"
path = "example/heavy_traffic.rs"
required-features = ["client", "server"]
[[example]]
name = "use_case"
path = "example/use_case.rs"
required-features = ["client", "server"]
[[example]]
name = "mirror_decoy"
path = "example/mirror_decoy.rs"
required-features = ["client", "server"]
[[example]]
name = "flat_iat_decoy"
path = "example/flat_iat_decoy.rs"
required-features = ["client", "server"]
[profile.release]
debug = 1