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

Add Secondary Key to MasterKeyComponent #6462

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Oct 18, 2021

This PR adds a Secondary Key to the MasterKeyComponent.

In PR:

  • Refactoring of MasterKeyComponent has been made
  • The secondary key now has been using by TagCommunity

Related to #6214 and addresses the anonymity issue of associating content with Public Key and IP.

@drew2a drew2a changed the title Add AlterEgoComponent Add secondary_key to MasterKeyComponent Oct 18, 2021
@drew2a drew2a changed the title Add secondary_key to MasterKeyComponent Add Secondary Key to MasterKeyComponent Oct 18, 2021
@ichorid
Copy link
Contributor

ichorid commented Oct 18, 2021

Why not use the Derived Keys functionality of LibNaCl for this?

@drew2a drew2a force-pushed the feature/alter_ego branch 3 times, most recently from 1921756 to c2e7f80 Compare October 18, 2021 14:59
@drew2a drew2a marked this pull request as ready for review October 18, 2021 15:32
@drew2a drew2a requested review from a team, ichorid and devos50 and removed request for a team October 18, 2021 15:32
ichorid
ichorid previously approved these changes Oct 18, 2021
@ichorid
Copy link
Contributor

ichorid commented Oct 19, 2021

I suspect the whole PR could be replaced with a single line of:

 derived_key = crypto_kdf_derive_from_key(libnacl.crypto_box_SECRETKEYBYTES, 12345, "BLA", trustchain_keypair)

Hmm... 🤔

@drew2a
Copy link
Contributor Author

drew2a commented Oct 19, 2021

@ichorid

I suspect the whole PR could be replaced with a single line of...

It is not possible, because this PR contains not only new logic for a MasterKeyComponent (which can be implemented in one line), but also refactoring and changes to the TagCommunity.

@drew2a drew2a marked this pull request as draft October 19, 2021 10:20
@drew2a drew2a force-pushed the feature/alter_ego branch 2 times, most recently from 0e9c84d to 66ba43e Compare October 19, 2021 10:32
@drew2a drew2a marked this pull request as ready for review October 19, 2021 10:43
@drew2a drew2a force-pushed the feature/alter_ego branch from 66ba43e to 716ae65 Compare October 19, 2021 12:15
@drew2a drew2a force-pushed the feature/alter_ego branch from 716ae65 to ab38f20 Compare October 19, 2021 12:32
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@drew2a drew2a merged commit 9658b61 into Tribler:main Oct 19, 2021
@drew2a drew2a deleted the feature/alter_ego branch October 19, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants