feat: add public I2P network mode to router daemon
- Add `--public`, `--hops`, `--hosts`, and `--debug` router flags; `--public` auto-reseeds from the live network and keeps a status loop running. - Route NetDB lookups through tunnels with Noise_N garlic wrapping, fan out to two floodfills, and fetch unknown RouterInfos in the background. - Back off failed NTCP2 peers and fall back to IPv6 addresses when no IPv4 NTCP2 address is available. - Size session LeaseSet2 expiry from lease end dates and use the destination's X25519 key when present. - Add canonical Ed25519 Destination KeyCertificate constructors with round-trip tests. - Fix DatabaseStore gzip handling to honor the length prefix, and send `Wget/1.11.4` as the reseed User-Agent.
This commit is contained in:
1 parent
ae72b00323
commit
54cfb2faa9
25 files changed
+2033
-191
No files matched your search
@@ -198,6 +198,26 @@ pub fn StreamingPacket::sign_ed25519(
|
||||
}
|
||||
}
|
||||
|
||||
///|
|
||||
/// Verifies the Ed25519 signature of a `StreamingPacket` directly against a 32-byte
|
||||
/// Ed25519 public key (used for follow-on packets signed by a cached offline transient key).
|
||||
pub fn StreamingPacket::verify_signature_with_key(
|
||||
self : StreamingPacket,
|
||||
signing_pub : Bytes,
|
||||
) -> Bool {
|
||||
if (self.flags & flag_signature_included) == 0U || signing_pub.length() != 32 {
|
||||
return false
|
||||
}
|
||||
let sig = match self.signature {
|
||||
Some(s) => s
|
||||
None => return false
|
||||
}
|
||||
let to_verify = encode_with_opt_zero_sig(self, zero_sig_len=sig.length()) catch {
|
||||
_ => return false
|
||||
}
|
||||
@crypto.ed25519_verify(signing_pub, to_verify, sig)
|
||||
}
|
||||
|
||||
///|
|
||||
/// Verifies the Ed25519 signature of a `StreamingPacket` against `sender_dest`
|
||||
/// (or the embedded `offline_sig.transient_pub_key` when `FLAG_OFFLINE_SIGNATURE` is set).
|
||||
|
||||
Reference in new issue
Block a user