Skip to content

dev: split the Jubjub key agreement Ecdh out of EcdhMask #879

Description

@0xisk

crypto/EcdhMask carries the Jubjub key agreement inline, so a consumer that needs several masks from one shared secret (the Field pad in #735) cannot reach the shared point without going through encrypt.

Move the key agreement into its own crypto/Ecdh module: deriveShared (sender side, owns the identity-key and zero-ephemeral guards), recoverShared (recipient side), and a SharedSecret struct. EcdhMask.encrypt / decrypt delegate to it and keep their ciphertexts unchanged.

Prerequisite for #735.

PR: #866

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2-lowNice-to-have / deferredeffort: 2-SSmall effortenhancementNew feature or requestfeat:cryptoFeature: cryptography (signatures, curves, hashers, nullifiers, primitives)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions