Skip to content

Contact requests fail when recipient identity only has ENCRYPTION key (no DECRYPTION key) #3224

@thepastaclaw

Description

@thepastaclaw

Bug Description

Contact requests fail when the recipient identity only has an ENCRYPTION key and no DECRYPTION key. Many identities created by the mobile wallet or other tools only carry an ENCRYPTION key, which should be equally valid for ECDH operations.

Steps to Reproduce

  1. Have a recipient identity that was created with only a Purpose::ENCRYPTION key (common for mobile wallet identities)
  2. Attempt to send a contact request to that identity
  3. The contact request fails because the key lookup only searches for Purpose::DECRYPTION keys

Expected Behavior

Contact requests should succeed when the recipient has either an ENCRYPTION or DECRYPTION key, since both are valid ECDSA_SECP256K1 keys that work identically for ECDH.

Actual Behavior

The request fails with an error implying the sender should add keys, when in reality the recipient's ENCRYPTION key should be accepted as a valid alternative for the ECDH operation.

Context

This was originally reported as dashpay/dash-evo-tool#687 and a workaround PR was opened at dashpay/dash-evo-tool#725, but @lklimek identified this as a known Platform-level bug that should be fixed upstream rather than worked around in dash-evo-tool.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions