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:
yet300 2026-05-09 16:28:23 +04:00
parent 10a84ca56c
commit 5693bbfcd8
2 changed files with 907 additions and 2517 deletions