The key insight from go-proton-api SaltForKey: ProtonMail uses only the last 31 chars of the bcrypt output as the key passphrase — not the full 60-char string. One line fix, two days of debugging. Also adds the full crypto layer (crypto.rs): user key unlock, address key token decryption, and message body decryption via rpgp. Includes SRP auth, session caching with locked-scope handling, TOTP, and the ProtonMail API client for inbox listing and message fetch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
689 B
TOML
22 lines
689 B
TOML
[package]
|
|
name = "proton-bridge"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
tokio = { version = "1", features = ["net", "io-util", "rt-multi-thread", "macros"] }
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "native-tls"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
toml = "1.0"
|
|
sha2 = "0.10"
|
|
num-bigint = "0.4"
|
|
base64 = "0.22"
|
|
rand = "0.8"
|
|
pwhash = "0.3" # bcrypt with caller-supplied salt (used for SRP)
|
|
bcrypt = "0.15" # reference bcrypt impl for key passphrase derivation
|
|
pgp = { version = "0.14", default-features = false } # rpgp — OpenPGP decrypt
|
|
env_logger = "0.11"
|
|
aes = "0.8"
|
|
cfb-mode = "0.8"
|
|
sha1 = "0.10"
|