Skip to content

Commit d88e4c8

Browse files
Fix bridge protocol: descriptor validation, dir proxy, flow control, CREATE2/ntor
Major changes to get the Tor bridge working with a real Tor client: - Fix descriptor: add onion-key-crosscert (RSA crosscert), strip base64 padding for inline values, SHA-256-then-sign for Ed25519 descriptor signature, add reject *:* exit policy, use actual OR port and address - Implement directory proxy to gabelmoo dir authority for consensus, authority key certs, and microdescriptor downloads - Fix flow control: remove inline SENDME handler that was dropping non-SENDME cells during large transfers, use pacing instead. Fix SENDME handling to only count circuit-level SENDMEs (stream_id==0) - Implement CREATE2/ntor handshake for circuit creation - Add linked Ed25519/Curve25519 onion key pair for ntor-onion-key-crosscert - Increase TLS read timeout from 30s to 300s for slow downloads - Add BEGIN cell handler with TCP connect and bidirectional forwarding Achieves 95% Tor client bootstrap (pending ntor auth fix). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 79565d2 commit d88e4c8

File tree

5 files changed

+1230
-48
lines changed

5 files changed

+1230
-48
lines changed

include/tor/crypto/keys.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ struct RelayKeyPair {
210210
Curve25519SecretKey onion_key;
211211
Rsa1024Identity rsa_identity;
212212

213+
// Ed25519 key derived from the same seed as onion_key, used for
214+
// ntor-onion-key-crosscert in descriptors.
215+
Ed25519SecretKey onion_ed_key;
216+
uint8_t onion_ed_sign_bit = 0;
217+
213218
[[nodiscard]] static std::expected<RelayKeyPair, KeyError> generate();
214219
};
215220

0 commit comments

Comments
 (0)