Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 328
    • Issues 328
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #31589
Closed
Open
Issue created Sep 02, 2019 by George Kadianakis@asnContributor

hs-v3: Simplify decrypt_desc_layer interface

Here is how decrypt_desc_layer is called:

  superencrypted_len = decrypt_desc_layer(desc,
                                 desc->plaintext_data.superencrypted_blob,
                                 desc->plaintext_data.superencrypted_blob_size,
                                 NULL, 1, &superencrypted_plaintext);
  encrypted_len = decrypt_desc_layer(desc,
                                 desc->superencrypted_data.encrypted_blob,
                                 desc->superencrypted_data.encrypted_blob_size,
                                 descriptor_cookie, 0, &encrypted_plaintext);

There is no point in passing desc->superencrypted_data.encrypted_blob and desc->superencrypted_data.encrypted_blob_size since we are already passing the whole desc and is_superencrypted_layer which should be enough to figure out which fields to use.

We could either of the following two things:

  • Ditch desc as an argument and pass desc->plaintext_data.blinded_pubkey explicitly.
  • Ditch encrypted_blob and encrypted_blob_size as arguments and get them off desc.

I prefer the first, but I'm fine with either, since it will make the interface cleaner.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking