- 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.
- 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.
- Translated `Blake2bMessageDigest` and `Blake2sMessageDigest` to Kotlin.
- Replaced JVM-bound `java.util.Arrays` and `System.arraycopy` with
Kotlin's native `.fill()` and `.copyInto()`.
- Fixed nullable array type `Array<ByteArray?>` to `Array<ByteArray>`
for the `sigma` permutation matrix, removing the need for `!!` assertions.
- Refactored `while` loops into idiomatic Kotlin `for` loops in the `transform`
functions.
- Eliminated mutable parameter shadowing warnings by introducing
`currentOffset` and `remainingLen` local variables.
- Translated `SHA256MessageDigest` and `SHA512MessageDigest` to Kotlin.
- Removed `java.util.Arrays` and `System.arraycopy` dependencies, using
Kotlin's native `.fill()` and `.copyInto()`.
- Refactored legacy `while` loops into idiomatic Kotlin `for` loops.
- Improved variable scoping in the `transform` function by declaring
local variables at the point of use.
- Translated `RijndaelAES.java` to Kotlin.
- Removed JVM-specific `java.util.Arrays` dependency, utilizing Kotlin's
`.fill()`.
- Refactored C-style variable declarations, moving them closer to their
usage scope for better Kotlin idiomatics.
- Retained the original lookup tables (S-boxes) and bitwise logic to
ensure the fallback software AES implementation remains cryptographically
accurate.
* fix: add input validation for protocol decoding and fragment reassembly
* fix:subtract the old entry's size before adding the new one, so duplicate/retransmitted fragments don't inflate the counter
* fix: FragmentManager.handleFragment() can be entered concurrently (e.g., fragments for the same fragmentID arriving from multiple peers/relays). In order for this to happen multiple devices would be needed to connect to the mesh. even with a per-fragmentID byte cap, an attacker could open many fragment IDs at once and force the device to buffer lots of fragment data overall (risking memory pressure/OOM). In this fix we made fragments atomic and thread safe. When a fragment index is retransmitted, we compute the size delta (new - old) so duplicates don’t inflate counters and can’t be used to bypass limits. Under heavy load/attack the app will drop/reject fragment sets earlier instead of growing memory usage without bound to reduce risk of oom. tested on pixel 6 and pixel 8.
* fix: add fragmenttest
* Add 'Send private message' action to chat user sheet
* Change 'Send private message' action color to purple
* Fix: Resolve short ID against all participants, not just cached nicknames
* Fix: Correctly open private chat sheet for mesh peers
---------
Co-authored-by: a1denvalu3 <>
- Added DisposableEffect to LocationChannelsSheet to ensure cleanup runs when composable is removed
- Fixed ChatViewModel.endGeohashSampling() to correctly delegate to GeohashViewModel instead of being a no-op
- Prevents lingering kind 20001 subscriptions after closing the sheet