501 Commits

Author SHA1 Message Date
Ruslan
fa62e63c35
Merge f2dc1388ca190f855d72e1c9b76c155fb5268977 into c8f45408b1984753a4df7f05aff03ceaa17bbba6 2026-07-26 12:24:00 +03:00
GitHub Action
c8f45408b1 Automated update of relay data - Sun Jul 26 06:56:54 UTC 2026 2026-07-26 06:56:54 +00:00
callebtc
b7f0b33d3a
bump to 1.7.5 (#723) 2026-06-25 22:48:26 +02:00
Hamza Öztürk
c26460ae02
feat: Implement iOS-compatible selective padding for BLE messages (#501)
* feat: Implement iOS-compatible selective padding for BLE messages

* regression tests for padding

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2026-06-25 22:45:03 +02:00
Moe Hamade
793b215457
fix: geohash online count accuracy and channel switch latency (#672)
- Keep max lastSeen per user so relay's newest-first delivery doesn't
  overwrite a fresh timestamp with a stale one
- Serialize event processing on Main dispatcher to eliminate
  ConcurrentModificationException on geohashParticipants maps
- Immediately refresh people list on channel switch so sampling data
  is reflected before the first relay response arrives
2026-06-25 22:07:59 +02:00
Moe Hamade
f0d312827e
feat: Disable system screenshots in recents screen (#608)
This change prevents the app's content from being visible in the recents screen on Android 13 (Tiramisu) and newer devices.

It achieves this by calling `setRecentsScreenshotEnabled(false)` in the `onCreate` method of `MainActivity` after checking the device's SDK version. This enhances user privacy by hiding potentially sensitive information from the system's app overview.
2026-06-25 22:07:09 +02:00
a1denvalu3
8607ce84ba
Fix geohash block case sensitivity issue (#645)
Co-authored-by: a1denvalu3 <>
2026-06-25 22:06:46 +02:00
AleksPlekhov
37a20ebf34
[ticket 640] added nickname to note (#687)
* [ticket 640] added nickname to note

* [640] added check for empty value
2026-06-25 22:06:05 +02:00
5t34k
34a6f37041
Fix hashtags incorrectly displayed inside URLs (#692)
When a URL contains a # fragment (e.g. https://example.com/page#section),
the hashtag regex matches the fragment as a hashtag. The overlap removal
logic already removes hashtags overlapping geohashes, and geohashes
overlapping URLs, but did not remove hashtags overlapping URLs. Add the
missing overlapsUrl check to the hashtag condition.
2026-06-25 22:04:23 +02:00
bladexian94-code
648ae6c1dd
Harden GeohashPickerActivity WebView security by blocking mixed content and restricting navigation to local asset only on experimental security branch. (#698) 2026-06-25 21:57:17 +02:00
David Carrington
13c771aa29
Pause Nostr geohash firehose in background to cut mobile data Closes: #700 (#706)
* Pause Nostr geohash firehose in background to cut mobile data

The Bluetooth mesh uses no mobile data, but the Nostr relay layer ran
unbounded in the background: the live geohash channel subscription kept
streaming across 5 relays, the presence heartbeat broadcast every ~60s,
and a participant-refresh timer polled every 30s. Combined with
reconnect/re-subscribe replay on public relays, this could burn gigabytes
while idle.

GeohashViewModel now tears down the high-volume subscriptions when the app
is backgrounded (onStop) and restores them on foreground (onStart):
- drop the live channel message stream (currentGeohashSubId)
- drop sampling subscriptions
- cancel the presence heartbeat and participant-refresh timer

Gift-wrap DM subscriptions are intentionally kept alive in the background
since they are filtered to our pubkey (lightweight) so DMs still arrive.

The selected channel is tracked in activeChannelGeohash so the stream can
be rebuilt on foreground without losing the user's selection. The channel
subscription logic is extracted into subscribeChannelStream() /
subscribeChannelDM() helpers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* separate the heartbeat firehose from message delivery

* correct comment

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2026-06-25 21:56:29 +02:00
GitHub Action
ff15bddfc8 Automated update of relay data - Sun Jun 21 07:41:57 UTC 2026 2026-06-21 07:41:57 +00:00
callebtc
ffe62bf1fd
bump to 1.7.4 (#715)
Co-authored-by: CC <cc@ggg.local>
1.7.4
2026-06-17 12:27:54 -05:00
callebtc
b89644f5f7
Fix foreground service start eligibility (#714)
* Fix foreground service start eligibility

* Defer foreground service start when backgrounded

* fix crash

---------

Co-authored-by: CC <cc@ggg.local>
2026-06-17 11:59:43 -05:00
callebtc
9e0a919cb8
bump version (#713)
Co-authored-by: CC <cc@ggg.local>
2026-06-16 12:49:36 -05:00
callebtc
ae6641270a
feat: disable Wi‑Fi Aware by default (#712)
Co-authored-by: CC <cc@ggg.local>
1.7.3
2026-06-16 12:45:23 -05:00
callebtc
3a983c5767
Wifi aware refactor mesh core (#711)
* wifi aware wip

* wifi aware wip

* starting to work

* werk

* dms work

* wip

* fix(wifi-aware): use bindSocket and scoped IPv6 instead of bindProcessToNetwork

* Merge branch 'upstream/main' into fix/wifi-aware-socket-binding

* Fix Wi-Fi Aware connectivity and UI integration post-merge

- Replace bindProcessToNetwork with bindSocket for VPN compatibility.
- Implement Scoped IPv6 address resolution (aware0) for mesh routing.
- Bridge Wi-Fi Aware incoming messages to AppStateStore for UI visibility.
- Fix syntax errors and variable name conflicts in Debug UI.

* Enhance Wi-Fi Aware robustness and debug UI display

- Clean up transport resources (sockets, server sockets, network callbacks) immediately on peer disconnection.
- Implement resolveScopedAddress to show scoped IPv6 (e.g., %aware0) in Debug UI.
- Fix Map type mismatch warning in ChatViewModel bridge.
- Filter self-ID from peer cleanup tables to prevent recursive self-removal.

* Share GossipSyncManager across transports to prevent redundant message synchronization

- Registered BluetoothMeshService's GossipSyncManager as a singleton in MeshServiceHolder.
- Modified WifiAwareMeshService to use the shared GossipSyncManager if available.
- Added background cleanup for peer mappings on socket disconnection.
- Fixed Kotlin type mismatch during nickname map merging.

* Restore VPN acquisition logic and improve peer cleanup

- Revert removal of NET_CAPABILITY_NOT_VPN to allow hardware handle acquisition while VPN is active.
- Refactor handlePeerDisconnection to more reliably cleanup initial and routed IDs.
- Switch cleanup logging to debug level to reduce log noise.

* Fix wifi aware socket binding 2 (#536)

* Background persistence (#505)

* persistence step 1

* fix build

* messages in the background work, notifications not yet

* app state store

* DM icon shows up

* notification launches when app is closed!

* keep ui updated

* lifecycle fixes

* extensive logging, maybe revert later

* send nickname in announcement

* quit in notification

* setting in about sheet

* fix quit bitchat

* lifecycle fixes

* power mode based on background state

* stats for both direciotns

* fix graph persistence

* better counting

* count per device

* only compute when debug sheet is open? untested

* fix read receipts

* fix read receipts fully

* fix unread badge if messages have been read in focus

* foreground promotion fix

* fix app kill in notification

* adjust to new tor

* nice

* about sheet design

* bump version 1.6.0 (#524)

* Automated update of relay data - Sun Dec 14 06:06:53 UTC 2025

* bump targetSdk (#526)

* Automated update of relay data - Sun Dec 21 06:06:56 UTC 2025

* Automated update of relay data - Sun Dec 28 06:07:12 UTC 2025

* Prevent quit notification from reappearing (#530)

* shutdown sequence

* Prevent quit notification from reappearing

* Restrict force-finish broadcast

* Cancel quit shutdown on relaunch

* fix(wifi-aware): use bindSocket and scoped IPv6 instead of bindProcessToNetwork

* Merge branch 'upstream/main' into fix/wifi-aware-socket-binding

* Fix Wi-Fi Aware connectivity and UI integration post-merge

- Replace bindProcessToNetwork with bindSocket for VPN compatibility.
- Implement Scoped IPv6 address resolution (aware0) for mesh routing.
- Bridge Wi-Fi Aware incoming messages to AppStateStore for UI visibility.
- Fix syntax errors and variable name conflicts in Debug UI.

* Enhance Wi-Fi Aware robustness and debug UI display

- Clean up transport resources (sockets, server sockets, network callbacks) immediately on peer disconnection.
- Implement resolveScopedAddress to show scoped IPv6 (e.g., %aware0) in Debug UI.
- Fix Map type mismatch warning in ChatViewModel bridge.
- Filter self-ID from peer cleanup tables to prevent recursive self-removal.

* Share GossipSyncManager across transports to prevent redundant message synchronization

- Registered BluetoothMeshService's GossipSyncManager as a singleton in MeshServiceHolder.
- Modified WifiAwareMeshService to use the shared GossipSyncManager if available.
- Added background cleanup for peer mappings on socket disconnection.
- Fixed Kotlin type mismatch during nickname map merging.

* Restore VPN acquisition logic and improve peer cleanup

- Revert removal of NET_CAPABILITY_NOT_VPN to allow hardware handle acquisition while VPN is active.
- Refactor handlePeerDisconnection to more reliably cleanup initial and routed IDs.
- Switch cleanup logging to debug level to reduce log noise.

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: aidenvalue <>

* Fix wifi aware routing (#534)

* Background persistence (#505)

* persistence step 1

* fix build

* messages in the background work, notifications not yet

* app state store

* DM icon shows up

* notification launches when app is closed!

* keep ui updated

* lifecycle fixes

* extensive logging, maybe revert later

* send nickname in announcement

* quit in notification

* setting in about sheet

* fix quit bitchat

* lifecycle fixes

* power mode based on background state

* stats for both direciotns

* fix graph persistence

* better counting

* count per device

* only compute when debug sheet is open? untested

* fix read receipts

* fix read receipts fully

* fix unread badge if messages have been read in focus

* foreground promotion fix

* fix app kill in notification

* adjust to new tor

* nice

* about sheet design

* bump version 1.6.0 (#524)

* Automated update of relay data - Sun Dec 14 06:06:53 UTC 2025

* bump targetSdk (#526)

* Automated update of relay data - Sun Dec 21 06:06:56 UTC 2025

* Automated update of relay data - Sun Dec 28 06:07:12 UTC 2025

* Prevent quit notification from reappearing (#530)

* shutdown sequence

* Prevent quit notification from reappearing

* Restrict force-finish broadcast

* Cancel quit shutdown on relaunch

* fix(wifi-aware): use bindSocket and scoped IPv6 instead of bindProcessToNetwork

* Merge branch 'upstream/main' into fix/wifi-aware-socket-binding

* Fix Wi-Fi Aware connectivity and UI integration post-merge

- Replace bindProcessToNetwork with bindSocket for VPN compatibility.
- Implement Scoped IPv6 address resolution (aware0) for mesh routing.
- Bridge Wi-Fi Aware incoming messages to AppStateStore for UI visibility.
- Fix syntax errors and variable name conflicts in Debug UI.

* Enhance Wi-Fi Aware robustness and debug UI display

- Clean up transport resources (sockets, server sockets, network callbacks) immediately on peer disconnection.
- Implement resolveScopedAddress to show scoped IPv6 (e.g., %aware0) in Debug UI.
- Fix Map type mismatch warning in ChatViewModel bridge.
- Filter self-ID from peer cleanup tables to prevent recursive self-removal.

* Share GossipSyncManager across transports to prevent redundant message synchronization

- Registered BluetoothMeshService's GossipSyncManager as a singleton in MeshServiceHolder.
- Modified WifiAwareMeshService to use the shared GossipSyncManager if available.
- Added background cleanup for peer mappings on socket disconnection.
- Fixed Kotlin type mismatch during nickname map merging.

* Restore VPN acquisition logic and improve peer cleanup

- Revert removal of NET_CAPABILITY_NOT_VPN to allow hardware handle acquisition while VPN is active.
- Refactor handlePeerDisconnection to more reliably cleanup initial and routed IDs.
- Switch cleanup logging to debug level to reduce log noise.

* fix wifi aware routing

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: aidenvalue <>

* unify connection tracker for ble and wifi (#537)

* unify connection tracker for ble and wifi

* cleanup nicely

* Wifi aware skip bluetooth (#538)

* unify connection tracker for ble and wifi

* bluetooth optional

* refactor mesh core

* tests

* share gossip

* refresh peer list more often

* patches: wifi aware mesh refactor core (#549)

* Refactor WifiAware memory management and lifecycle handling

* Fix Wi-Fi Aware reconnection by ensuring callback unregistration and session watchdog

* fix(wifiaware): allow WifiAwareController to restart service if session drops

* Enhance WiFi Aware logging with network request timeouts and detailed callback status

* Ensure explicit release of WiFi Aware network callbacks on failure or disconnection

---------

Co-authored-by: aidenvalue <>

* fix: wifi aware mesh private dms (#561)

* fix(wifi-aware): restore peer check and remove aggressive session restarts

* synchronized access to sockets.

* clear old peer socket `onClientConnected` if one was found.

* address second round of review

* fix: Restart publish session on termination in WifiAwareMeshService

* fix: cleanup connection tracker resources when handling peer disconnection without active socket

---------

Co-authored-by: aidenvalu3 <>

* fix(mesh): address memory leaks and background persistence issues in Wi-Fi Aware

- Move message persistence and background notifications for Wi-Fi Aware into the service layer via MeshCore hooks.
- Fix memory leak in MainActivity by properly detaching WifiAwareMeshDelegate on pause.
- Ensure BluetoothMeshService is initialized before WifiAwareMeshService to guarantee shared GossipSyncManager instance.
- Deduplicate persistence logic from MainActivity delegate.

* wifi aware working

* more robust

* fragments work

* new files

* wifi improvements

* handshake works

* improve

* wifi mesh more robust

* fix review

* check for support

* wifi aware fixes

---------

Co-authored-by: aidenvalue <>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: aidenvalu3 <erendentman@gmail.com>
Co-authored-by: a1denvalu3 <43107113+a1denvalu3@users.noreply.github.com>
Co-authored-by: CC <cc@ggg.local>
2026-06-16 12:11:33 -05:00
callebtc
6189f0cb84
fix(security): apply iOS audit parity fixes (#709)
Co-authored-by: CC <cc@ggg.local>
2026-06-15 08:35:37 -05:00
GitHub Action
13585a9a9c Automated update of relay data - Sun Jun 14 07:39:17 UTC 2026 2026-06-14 07:39:17 +00:00
a1denvalu3
b079ae8742
fix(sync): resolve hash alignment and early break bugs on GCS filter trimming (#708)
* fix(sync): resolve hash alignment and early break bugs on GCS filter trimming

* fix(sync): filter out zero bucket and deduplicate buckets before encoding

* fix(sync): preserve zero-bucket mapping by clamping 0 to 1 during encoding and decoding
2026-06-08 19:00:03 -05:00
callebtc
054887bad8
Fix request sync duplicate public messages (#707)
Co-authored-by: CC <cc@ggg.local>
2026-06-08 15:41:11 -05:00
GitHub Action
f7ce1f4be6 Automated update of relay data - Sun Jun 7 07:27:22 UTC 2026 2026-06-07 07:27:22 +00:00
GitHub Action
1a99064fc7 Automated update of relay data - Sun May 31 07:22:04 UTC 2026 2026-05-31 07:22:04 +00:00
GitHub Action
2a8dbac89d Automated update of relay data - Sun May 24 07:09:35 UTC 2026 2026-05-24 07:09:35 +00:00
GitHub Action
67e767237b Automated update of relay data - Sun May 17 07:01:09 UTC 2026 2026-05-17 07:01:09 +00:00
yet
f2dc1388ca refactor(noise/protocol): convert remaining log concatenations to templates
Missed by the prior idiomatic-polish pass: SymmetricState had 13 Log.d
calls still using "..." + bytesToHex(...) instead of string templates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 18:26:30 +04:00
yet
f1645e73f2 refactor(noise/protocol): polish Kotlin idioms and remove Java legacy
Address IDE/compiler warnings across the protocol/ package after the
Java to Kotlin migration:

- Replace reference-identity ByteArray checks `!=` with `!==` in
  ChaChaPoly/AESGCM*CipherState (in-place encrypt/decrypt guards) to
  silence the "dangerous array comparison" warning while preserving
  the original semantics.
- Drop `java.util.Arrays.fill` and `Arrays`-style helpers in favour of
  ByteArray.fill / copyInto / copyOfRange where appropriate. Cold paths
  in NewHopeDHState, Curve25519DHState, Curve448DHState and parts of
  SymmetricState now use Kotlin extensions; tight crypto inner loops
  (HMAC body, ChaChaPoly) keep System.arraycopy intentionally.
- Use property access (`digestLength`) instead of `getDigestLength()`.
- Fold redundant if/else into `if-expression`, drop redundant
  `val space: Int` + assignment, redundant `Companion.` qualifiers,
  and unused `val cipher` re-assign in fork().
- Rename `prev_h` to `prevH` (style).
- Replace string concatenation with templates in log statements and
  exception messages.
- Convert unused catch parameters `e` to `_` and remove stale local
  `var index: Int` in hmac().
- Strip stale `@param secondaryKey/offset/length` KDoc block above
  SymmetricState.split (the params moved to the merged doc).
- Drop dead `check(!(local == null || remote == null))` from
  HandshakeState.mixDH — Kotlin types are already non-null.

Crypto behaviour is unchanged; output of every method matches the
prior Kotlin/Java implementation byte-for-byte.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 18:18:23 +04:00
yet
544d569708 refactor(noise): update NoiseSession for Kotlin-property accessors
External callers must use the property form for HandshakeState
and CipherStatePair members that the protocol package now exposes
as `val`s:

- handshakeState.getLocalKeyPair()    -> handshakeState.localKeyPair
- handshakeState.getAction()          -> handshakeState.action
- handshakeState.getRemotePublicKey() -> handshakeState.remotePublicKey
- handshakeState.getHandshakeHash()   -> handshakeState.handshakeHash
- cipherPair.getSender() / getReceiver() -> .sender / .receiver

DH operations with arguments (`setPrivateKey`, `getPublicKey`, etc.)
remain regular method calls.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 18:00:24 +04:00
yet
84f70ff12d refactor(noise/protocol): migrate HandshakeState to Kotlin
- Use Kotlin properties (`protocolName`, `handshakeHash`) and update
  every getter call (`getDHName/getPublicKeyLength/getMACLength/
  getSharedKeyLength/getProtocolName/getHandshakeHash`) to the new
  property names exposed by the migrated DHState / SymmetricState /
  CipherState interfaces.
- Initialize `pattern` non-null via `requireNotNull(lookup(...))`,
  and give the other late-init `var` fields (`patternIndex`,
  `preSharedKey`, `prologue`) sensible defaults so the class
  compiles cleanly.
- Resolve smart-cast errors on mutable nullable fields (`prologue`,
  `fixedEphemeral`, `fixedHybrid`, `localHybrid`) by copying to
  local `val`s before use.
- Replace `preSharedKey != null` / `mixPreSharedKey(preSharedKey)`
  guards with `?.let` blocks, and pass `localKeyPair!!` etc. into
  `mixPublicKey` to satisfy its now-non-null parameter.
- Tighten the cipher/hash name locals in the protocol-name parser
  from `String?` to `String` so the SymmetricState constructor
  accepts them.
- Token-processing loop, fallback bookkeeping and message buffer
  layout are unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 18:00:06 +04:00
yet
1f2c62d205 refactor(noise/protocol): migrate SymmetricState to Kotlin
- Expose `protocolName` as a non-null Kotlin property and rename the
  IDE's `mACLength` accessor to `macLength` (delegates to
  `cipher.macLength`).
- Update internal `dh.getPublicKeyLength()` calls to use the new
  property form.
- Rewrite the HMAC inner/outer-pad XOR loops as `for`-in-range with
  an explicit `.toByte()` on the result, satisfying Kotlin's
  stricter Int-vs-Byte rules.
- Keep `split()`'s `secondaryKey` parameter nullable to match the
  original Java contract; an empty buffer is substituted when null
  so the HKDF helper signature can stay non-null.
- HKDF/HMAC/handshake-hash logic is otherwise unchanged, including
  the iOS-parity debug logging.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:59:54 +04:00
yet
6f8fcf8022 refactor(noise/protocol): migrate AESGCMFallbackCipherState to Kotlin
- Override CipherState properties; initialize `val` fields inline.
- Rewrite the big-endian 4-byte CTR-counter increment at iv[12..15]
  as an explicit `(iv[i] + 1).toByte()` chain — Kotlin rejects the
  `++(iv[15])` form on Byte array elements.
- Replace `Arrays.fill(arr, 0.toByte())` with `arr.fill(0)` and fix
  the GHASH-tag XOR loop to cast back to Byte explicitly.
- Rijndael CTR keystream and GHASH paths preserved byte-for-byte.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:59:39 +04:00
yet
e0a390996f refactor(noise/protocol): migrate AESGCMOnCtrCipherState to Kotlin
- Override CipherState properties; tighten `initializeKey` parameter
  type to non-null `ByteArray`.
- Promote the constructor to a `@Throws(NoSuchAlgorithmException)`
  primary constructor with the `Cipher` instance assigned once as a
  non-null `val`, removing the bogus `cipher: Cipher? = null`
  initializer the IDE emitted.
- Replace `Arrays.fill(arr, 0.toByte())` with `arr.fill(0)`.
- Inline-byte XOR loop in `encryptWithAd` now casts back to `Byte`
  explicitly to satisfy Kotlin's stricter type rules.
- `fork()` rethrows the (impossible) NoSuchAlgorithmException as
  IllegalStateException instead of returning null — matches the
  non-null contract on `CipherState.fork`.
- AES/CTR keystream and GHASH paths preserved byte-for-byte.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:58:47 +04:00
yet
eabe6eb622 refactor(noise/protocol): migrate ChaChaPolyCipherState to Kotlin
- Override CipherState properties (`cipherName`, `keyLength`,
  `macLength`) instead of Java-style getters.
- Initialize `val` fields inline and drop the now-empty constructor
  `init` block.
- Replace `Arrays.fill(arr, 0.toByte())` with `arr.fill(0)` and
  `Arrays.fill(intArr, 0)` with `intArr.fill(0)`.
- Tighten counter increments (`++input[12]`) — Kotlin no longer needs
  the parenthesized form the IDE emitted.
- Crypto path (ChaCha20 keystream, Poly1305 MAC, AD padding) is
  unchanged byte-for-byte.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:58:05 +04:00
yet
2b4db2f634 refactor(noise/protocol): migrate NewHopeDHState to Kotlin
- Override DHState/DHStateHybrid properties idiomatically; collapse
  branchy length getters via single-expression `if`.
- Replace `Arrays.fill` and `arraycopy` of in-memory key buffers
  with `ByteArray.copyOf()` where the intent is "duplicate buffer".
- Use safe `?.let` / local `val` patterns for the nullable `nh`,
  `publicKey`, `privateKey` fields to satisfy Kotlin smart-cast rules.
- Restructure the if/else-if chains in `calculate` and `copyFrom`
  as `when` blocks for readability.
- Crypto parity preserved: `shareda` and the BobCalculated arraycopy
  intentionally use offset=0 to match the original Java, which never
  honored the caller's `offset` parameter; documented in a comment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:57:54 +04:00
yet
f3306091d5 refactor(noise/protocol): migrate Curve448DHState to Kotlin
- Override DHState properties instead of Java-style getters.
- Use `ByteArray.fill(0)` in place of `Arrays.fill(arr, 0.toByte())`.
- Preserve bit-identical crypto behavior (56-byte key sizes,
  Curve448.eval call signature, constant-time null-key scan).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:57:40 +04:00
yet
e7c0f28f76 refactor(noise/protocol): migrate Curve25519DHState to Kotlin
- Override DHState properties (`dhName`, `publicKeyLength`,
  `privateKeyLength`, `sharedKeyLength`) instead of Java-style getters.
- Replace `Arrays.fill(arr, 0.toByte())` with `arr.fill(0)`.
- Drop redundant `val dh = other` alias after the `is` smart cast.
- Preserve bit-identical crypto behavior (Curve25519.eval ordering,
  null-public-key constant-time scan, mode bitfield semantics).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:57:31 +04:00
yet
2655aa7636 refactor(noise/protocol): align DHStateHybrid with non-null DHState
- Match the tightened `copyFrom` signature on DHState by making the
  primary `other` parameter non-null while keeping `remote` nullable
  (a missing peer is meaningful for hybrid algorithms).
- Note the inheritance relationship between the single- and two-arg
  copyFrom overloads.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:57:22 +04:00
yet
c04027774f refactor(noise/protocol): migrate DHState interface to Kotlin
- Convert getDHName/getPublicKeyLength/getPrivateKeyLength/getSharedKeyLength
  from Java getters into idiomatic Kotlin `val` properties.
- Tighten nullability: key buffers and DH peer parameters are non-null
  per the original Java @param contract; isNullPublicKey kept as a
  function so existing call sites (`isNullPublicKey()`) keep resolving.
- Trim redundant KDoc; preserve upstream license header.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:56:13 +04:00
yet
597d9a1ba9 refactor(noise/protocol): drop invalid @JvmName on CipherState.macLength
- Remove `@get:JvmName("getMACLength")` — Kotlin rejects @JvmName on
  interface getters and all remaining callers in this module are Kotlin.
- macLength is now exposed idiomatically as a Kotlin property.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 17:43:48 +04:00
yet
fbb1342439 Convert CipherStatePair from Java to Kotlin 2026-05-15 17:37:47 +04:00
yet
8b3fe53c99 Rename .java to .kt 2026-05-15 17:37:47 +04:00
yet
e8882d6ab1 Convert CipherState to Kotlin 2026-05-15 17:36:07 +04:00
yet
ec60cb3543 Rename .java to .kt 2026-05-15 17:36:07 +04:00
yet
67808f22b8 Convert Pattern.java to Kotlin and refactor lookup logic to use a Map. 2026-05-15 17:32:46 +04:00
yet
f7477d87e9 Rename .java to .kt 2026-05-15 17:32:46 +04:00
yet
bea44f988f Convert Noise utility class to Kotlin
- Migrate `Noise.java` to `Noise.kt`.
- Refactor factory methods using Kotlin `when` expressions and destructuring.
- Use `ByteArray.fill()` and `copyOfRange()` for internal utility functions.
- Update reflection logic in `throwBadTagException` for better readability.
- Apply `@JvmStatic` and `const` to maintain compatibility with existing Java callers.
2026-05-15 17:29:34 +04:00
yet
f9923992f0 Rename .java to .kt 2026-05-15 17:29:34 +04:00
GitHub Action
8ddf03d139 Automated update of relay data - Sun May 10 06:58:05 UTC 2026 2026-05-10 06:58:05 +00:00
yet300
f09d4b90d3 Update ChaChaPolyCipherState to access ChaChaCore via INSTANCE field 2026-05-09 16:52:06 +04:00
yet300
5693bbfcd8 refactor(crypto): migrate NewHope and NewHopeTor implementations to Kotlin
- Ported the NewHope and NewHopeTor key exchange algorithms from Java to idiomatic Kotlin.
- Maintained strict functional parity with the original verified Java implementation.
- Preserved all necessary cryptographic lookup tables (NTT Montgomery, bit-reversal) to ensure mathematical correctness.
- Converted Keccak-f[1600] and ChaCha20 core algorithms into more compact Kotlin structures while retaining constant-time execution safety.
- Ensured seamless Java interoperability by using `const val` for protocol constants like `SENDABYTES` and `SENDBBYTES`.
- Improved overall code readability and removed legacy/redundant constructs.
2026-05-09 16:52:06 +04:00