Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ TorConfig ] Add support for HashedControlPassword #1

Open
05nelsonm opened this issue Feb 6, 2022 · 1 comment
Open

[ TorConfig ] Add support for HashedControlPassword #1

05nelsonm opened this issue Feb 6, 2022 · 1 comment

Comments

@05nelsonm
Copy link
Owner

Add ability to set HashedContorlPassword in the TorConfig.

  • :library:manager:kmp-tor-manager.TorConfigProvider.retrieve method should implement logic to discern between which method to utilize when authenticating (cookie auth, or password).
  • :library:controller:kmp-tor-controller-common should have implementation to generate or consume a secret, providing the S2K computed string value.
  • :library:controller:kmp-tor-controller-common should have implementation of a wrapper class to denote valid S2K computed value to be set in the config.

See the Spec for more details.

@05nelsonm 05nelsonm changed the title [ TorConfig ] Add HashControlPassword [ TorConfig ] Add support for HashControlPassword Feb 6, 2022
@05nelsonm 05nelsonm added this to the 2.0.0-alpha01 milestone Dec 26, 2023
@05nelsonm 05nelsonm changed the title [ TorConfig ] Add support for HashControlPassword [ TorConfig ] Add support for HashedControlPassword Aug 15, 2024
@05nelsonm
Copy link
Owner Author

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

@05nelsonm 05nelsonm removed this from the 2.0.0-alpha01 milestone Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant