Skip to content

ECIES share encryption lacks AEAD context binding #308

Description

@p0mvn

The ECIES layer derives k = SHA256(E_compressed || S.x) and calls
ChaCha20-Poly1305.Seal(..., aad=nil) with a zero nonce. Fresh ephemeral
scalars make nonce reuse unlikely in the honest path, but the ciphertext is not
authenticated to round_id, sender, recipient, or the contributor commitment
digest. Envelope replay or recipient/context substitution is therefore detected
only indirectly by later Feldman verification, not by the AEAD boundary.

Remediation: version the envelope KDF/AEAD transcript and bind
round_id || sender_valoper || recipient_valoper || H(feldman_commitments) as
AEAD associated data. Add a KDF domain tag such as svote-ecies-v1.

Evidence:

  • crypto/ecies/ecies.go: deriveKey hashes only E and S.x.
  • crypto/ecies/ecies.go: Seal and Open pass nil associated data.
  • app/prepare_proposal_ceremony.go: callers pass only plaintext share bytes;
    no round/sender/recipient context enters ECIES.

Feldman verification should prevent a replayed/substituted share from being accepted if it does not match the sender’s public commitments for that context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions