mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-11-01 07:51:15 +00:00
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.
This commit is contained in:
parent
10a84ca56c
commit
5693bbfcd8