Skip to content

An identity with ten ML-KEM-1024 keys no longer decodes as a whole #6512

Backlog

Description

@thepastaclaw

PastaClaw flagged this while reviewing #6507, where it was deferred to a follow-up instead of being fixed in that pull request. This issue tracks the follow-up.

An identity with ten ML-KEM-1024 keys no longer decodes as a whole (blocking)

Impact: A JavaScript client can no longer fetch an identity through identities.fetchUnproved or load it through Identity.fromBytes after it accumulates enough valid keys.

Where: packages/rs-dpp/src/state_transition/state_transitions/identity/public_key_in_creation/methods/validate_identity_public_keys_structure/v1/mod.rs:155-156 at b635d5548b1a:

KeyType::ML_KEM_768 => ml_kem::ML_KEM_768_ENCAPSULATION_KEY_SIZE,
KeyType::ML_KEM_1024 => ml_kem::ML_KEM_1024_ENCAPSULATION_KEY_SIZE,

Ten ML-KEM-1024 public keys use 15,680 bytes before the master key or any identity metadata. An owner can add them across two updates: the six-key check is per transition, and disabling keys leaves them in the identity. Drive stores keys individually, but the unproved query assembles the full identity and both WASM entry points decode it using Identity’s 15,000-byte bincode budget. The proof path that decodes keys individually does not fix those APIs. Make the full-identity transport and its bounded decoder agree on what PV16 can store, and cover a round trip after successive updates.

Origin

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions