Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • briar briar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 786
    • Issues 786
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briarbriar
  • briarbriar
  • Merge requests
  • !1114

Add contact manager and key manager methods for converting a pending contact

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged akwizgran requested to merge 1570-derive-handshake-root-key into master May 31, 2019
  • Overview 14
  • Commits 10
  • Pipelines 4
  • Changes 23

Third attempt, this time solving the tag reuse issue by deriving a new root key for handshake mode when the pending contact becomes a contact. Keys are no longer transferred inside the DB. Instead we derive the new keys, remove the pending contact and add the contact.

The static master key is derived while holding a database transaction, which is acceptable but not ideal as this is an expensive crypto operation. We could consider moving this onto the crypto executor in future, which would mean splitting ContactManager#addPendingContact() into separate create and add methods, and likewise for the addContact() method that takes a pending contact ID. The static master key would become a PendingContact field, and would be stored in the DB, saving us the cost of re-deriving it (at startup to get the rendezvous keys, and when converting the pending contact to a contact). These are fairly big changes that can be deferred, so I thought I'd put this up for review first.

Closes #1570 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 1570-derive-handshake-root-key