05nelsonm / kmp-tor

Kotlin Multiplatform Library for embedding Tor into your applications
Apache License 2.0
34 stars 5 forks source link

[ TorConfig ] Add support for HashedControlPassword #1

Open 05nelsonm opened 2 years ago

05nelsonm commented 2 years ago

Add ability to set HashedContorlPassword in the TorConfig.

See the Spec for more details.

05nelsonm commented 2 months ago

Will have to wait until an implementation for Salsa is available for Kotlin Multiplatform.

See type 02 https://gitlab.torproject.org/tpo/core/tor/-/blob/release-0.4.8/src/lib/crypt_ops/crypto_s2k.c?ref_type=heads#L50

The other types are deprecated and should not be utilized because of their underlying algorithms which have been broken. Tor uses the latest when TorConfig.CookieAuthFile is specified, and as this is a "nice to have" for 2.0.0-alpha01, I believe it will be best to hold off until an implementation can be had via KotlinCrypto.hash