Masayuki Hatta pushed to branch upstream at Debian Java Maintainers / orchid


Commits:
d617c124 by Masayuki Hatta at 2026-11-19T20:52:42+09:00
Fetch missing guard descriptors at once; follow guard-spec 4.9

Since 2.6.0 a circuit waits for the descriptor of its primary guard,
but a few missing descriptors were only downloaded once 16 were
missing or ten minutes had passed, so a client could build no circuit
for up to ten minutes.  Entry guard selection now asks the directory
for such descriptors (Directory.requestDescriptorsNow()), and they
are downloaded at once and tried again every 15 seconds.

A guard that accepts the connection but does not create the first
hop now counts as unreachable, as in Tor.

A circuit through a non-primary guard is no longer used if one of
the primary guards it replaced may be reachable again by the time it
is built (guard-spec 4.9); it is closed and the next circuit tries
the primary guard.

- - - - -
abcf8ef8 by Masayuki Hatta at 2026-11-19T20:55:14+09:00
Refuse older onion service descriptors; use Bouncy Castle's X25519

An HSDir could answer with an older, unexpired descriptor of an onion
service, with introduction points the service no longer uses.  A
descriptor with a lower revision counter than one already accepted
for the same time period is now refused, and the next HSDir is tried.

Replace the X25519 code from jnacl with X25519 and X25519Field from
Bouncy Castle 1.87: a Montgomery ladder with constant-time swaps.
The public key is computed by the same ladder from u = 9, and the
inverse by Fermat's little theorem, so that no other Bouncy Castle
code is needed.  The top bit of the peer's u-coordinate is now
ignored, as RFC 7748 requires.  Add the RFC 7748 test vectors.

- - - - -
aab38e54 by Masayuki Hatta at 2026-11-19T22:08:01+09:00
Check bridge descriptors against the bridge; fuzz the parsers

A bridge's descriptor must now carry the identity key the bridge
proved in the link handshake; before, a bridge could hand out the
descriptor of another router.  Bridge lines without a fingerprint
are warned about.

Add Jazzer targets for consensus documents, microdescriptors, key
certificates, router descriptors, v3 onion service descriptors,
CERTS cells and link cells, with seed corpora and a CI workflow.
The first runs found parsers that let runtime exceptions escape
(bad hex or base64, a bad PEM key, five-octet addresses, "/" in an
exit policy, an object header without a keyword or at the end of
the document, a descriptor without a signing key, an empty history
interval, an empty CERTS cell); they now refuse such input as a
parsing error.

- - - - -
c397f0fa by Masayuki Hatta at 2026-11-19T22:08:47+09:00
CI: run the emulator test on API 26 and 28 as well

The instrumented test also logs whether the platform's own TLS
completes a handshake over a Tor stream, to find from which API
level AndroidSSLSocketFactory is no longer needed.

- - - - -
3c50ab2d by Masayuki Hatta at 2026-11-19T22:30:12+09:00
CI: do not name the fuzz workflow's variables JAZZER_*

Jazzer reads every JAZZER_<OPTION> environment variable as one of
its options, so JAZZER_VERSION=0.24.0 stopped it at once as an
invalid value for its --version option, and every fuzz job failed.

- - - - -
e3fbf334 by Masayuki Hatta at 2026-11-19T22:31:35+09:00
CI: do not fail the emulator job when logcat cannot be cleared

On the API 26 image, "adb logcat -c" right after boot fails with
"failed to clear the 'main' log", and since each line of the
emulator script must succeed, the job stopped before the test ran.
Clearing only tidies the saved log, so ignore its failure.

- - - - -
f5d9d1c7 by Masayuki Hatta at 2026-11-20T09:43:50+09:00
Fetch only requested descriptors and back off when they stay missing

A descriptor asked for with Directory.requestDescriptorsNow() made
DescriptorProcessor download every missing descriptor, and the request
was retried every 15 seconds for as long as it was missing.  EntryGuards
renews the request on every attempt to build a circuit, so a primary
guard whose microdescriptor could not be fetched kept the client
downloading all missing descriptors every 15 seconds indefinitely.

Now an urgent download asks only for the requested descriptors, and a
descriptor that stays missing is retried after 15 seconds, then 30, 60
and so on, up to the ten minutes between ordinary downloads.  A request
for a router not asked for before is still fetched at once and starts
the wait again at 15 seconds; the backoff is cleared once no requested
descriptor is missing.  An ordinary download no longer has its timer
reset by an urgent one.

- - - - -
4708a65d by Masayuki Hatta at 2026-11-20T09:44:14+09:00
Update dependency examples to 2.7.0

Bump the version in the Gradle and Maven examples in README.md and
in the Android sample's build.gradle, and list the API levels 26 and
28 that the Android workflow now also runs on in the sample's README.

- - - - -
cc5ecf15 by Masayuki Hatta at 2026-11-20T10:17:05+09:00
README: fix dead links, add badges, update contact

The Tor documentation page now redirects to the support portal, so
point to spec.torproject.org for the specifications; link Tor Browser
to its download page; drop the Orchid logo, which Subgraph no longer
serves; link Subgraph's Orchid page by its working address; unlink
geo-gs, whose GitHub account is gone; replace the old "coming very
soon" note on library documentation with a pointer to the Android
sample.

Add badges for CI, the Android emulator test, Maven Central, Repology
and the license.  The maintainer is now reachable on Bluesky instead
of Twitter.

- - - - -
0d00d76f by Masayuki Hatta at 2026-11-20T10:50:34+09:00
New upstream version 2.7.0+ds
- - - - -


56 changed files:

- .git-archival.txt
- .github/workflows/android.yml
- + .github/workflows/fuzz.yml
- LICENSE
- README.md
- samples/android/README.md
- samples/android/app/build.gradle
- 
samples/android/app/src/androidTest/java/org/mhatta/orchid/sample/TorConnectionTest.java
- src/main/java/com/subgraph/orchid/Directory.java
- src/main/java/com/subgraph/orchid/circuits/CircuitBuildTask.java
- src/main/java/com/subgraph/orchid/circuits/CircuitCreationRequest.java
- src/main/java/com/subgraph/orchid/circuits/guards/Bridges.java
- src/main/java/com/subgraph/orchid/circuits/guards/EntryGuards.java
- src/main/java/com/subgraph/orchid/circuits/hs/HSV3DescriptorDownloader.java
- src/main/java/com/subgraph/orchid/circuits/hs/HSV3DescriptorParser.java
- src/main/java/com/subgraph/orchid/circuits/hs/HiddenService.java
- src/main/java/com/subgraph/orchid/circuits/path/CircuitPathChooser.java
- src/main/java/com/subgraph/orchid/connections/ConnectionHandshakeV3.java
- src/main/java/com/subgraph/orchid/crypto/Curve25519.java
- + src/main/java/com/subgraph/orchid/crypto/X25519.java
- + src/main/java/com/subgraph/orchid/crypto/X25519Field.java
- src/main/java/com/subgraph/orchid/data/HexDigest.java
- src/main/java/com/subgraph/orchid/data/IPv4Address.java
- src/main/java/com/subgraph/orchid/data/exitpolicy/Network.java
- src/main/java/com/subgraph/orchid/directory/DirectoryImpl.java
- src/main/java/com/subgraph/orchid/directory/DocumentFieldParserImpl.java
- 
src/main/java/com/subgraph/orchid/directory/downloader/DescriptorProcessor.java
- src/main/java/com/subgraph/orchid/directory/router/RouterDescriptorParser.java
- + test/com/subgraph/orchid/circuits/guards/BridgeDescriptorTest.java
- test/com/subgraph/orchid/circuits/guards/EntryGuardsTest.java
- test/com/subgraph/orchid/circuits/guards/FakeNetwork.java
- + test/com/subgraph/orchid/circuits/hs/HSV3DescriptorFuzzer.java
- + test/com/subgraph/orchid/circuits/hs/HSV3DescriptorRevisionTest.java
- + test/com/subgraph/orchid/connections/CertsCellFuzzer.java
- + test/com/subgraph/orchid/crypto/Curve25519Test.java
- + test/com/subgraph/orchid/directory/downloader/DescriptorProcessorTest.java
- + test/com/subgraph/orchid/fuzz/CellFuzzer.java
- + test/com/subgraph/orchid/fuzz/ConsensusFuzzer.java
- + test/com/subgraph/orchid/fuzz/FuzzFindingsTest.java
- + test/com/subgraph/orchid/fuzz/FuzzSupport.java
- + test/com/subgraph/orchid/fuzz/KeyCertificateFuzzer.java
- + test/com/subgraph/orchid/fuzz/MicrodescriptorFuzzer.java
- + test/com/subgraph/orchid/fuzz/RouterDescriptorFuzzer.java
- + test/fuzz/corpus/cell/seed-link
- + test/fuzz/corpus/cell/seed-relay
- + test/fuzz/corpus/certs-cell/seed-five-certs
- + test/fuzz/corpus/certs-cell/seed-two-certs
- + test/fuzz/corpus/consensus/seed-empty-params
- + test/fuzz/corpus/consensus/seed-params
- + test/fuzz/corpus/hs-descriptor/seed-descriptor
- + test/fuzz/corpus/hs-descriptor/seed-first-layer
- + test/fuzz/corpus/hs-descriptor/seed-inner-layer
- + test/fuzz/corpus/key-certificate/seed-cert
- + test/fuzz/corpus/microdescriptor/seed-one
- + test/fuzz/corpus/microdescriptor/seed-two
- + test/fuzz/corpus/router-descriptor/seed-descriptor


The diff was not included because it is too large.


View it on GitLab: 
https://salsa.debian.org/java-team/orchid/-/compare/b6efa0ef1eb0b3967359c523dd9ce35cbe47045b...0d00d76fba1ec3b750364daa5a1c59b4e5195f51

-- 
View it on GitLab: 
https://salsa.debian.org/java-team/orchid/-/compare/b6efa0ef1eb0b3967359c523dd9ce35cbe47045b...0d00d76fba1ec3b750364daa5a1c59b4e5195f51
You're receiving this email because of your account on salsa.debian.org. Manage 
all notifications: https://salsa.debian.org/-/profile/notifications | Help: 
https://salsa.debian.org/help


_______________________________________________
pkg-java-commits mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to