Skip to content

Add external padding, pad_to structure#40

Merged
Gulianrdgd merged 11 commits intomainfrom
pad_to_structure
Feb 17, 2026
Merged

Add external padding, pad_to structure#40
Gulianrdgd merged 11 commits intomainfrom
pad_to_structure

Conversation

@JobDoesburg
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds “structure” descriptors and pad_to APIs to normalize long pseudonyms/attributes/records (and JSON values) to a consistent block shape, enabling batch transcryption without leaking length/shape differences (unlinkability). It also introduces JSON structure unification helpers for computing a common target shape across multiple values.

Changes:

  • Add pad_to(...) and structure() for LongPseudonym, LongAttribute, and LongRecord (plus WASM + Python bindings).
  • Add PEPJSONValue::{structure, pad_to} and expose unify_structures through WASM/Python.
  • Add LongRecordStructure / wrapper classes and a macro entry point for standalone pep_json!(pseudonym(...)).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/lib/data/long.rs Implements external-padding pad_to, updates decoding to try to strip external padding, adds tests.
src/lib/data/records.rs Adds LongRecordStructure, plus LongRecord::{structure, pad_to}.
src/lib/data/json/structure.rs Introduces UnifyError and unify_structures for JSON structure descriptors, with tests.
src/lib/data/json/data.rs Adds PEPJSONValue::{structure, pad_to} + new JSON padding-related errors and tests.
src/lib/data/json/macros.rs Adds standalone pep_json!(pseudonym(...)) macro arm.
src/lib/data/wasm/long.rs Exposes padTo for long pseudonyms/attributes in WASM.
src/lib/data/wasm/records.rs Exposes LongRecordStructure, LongRecord.structure(), and LongRecord.padTo() in WASM.
src/lib/data/wasm/json.rs Exposes structure(), padTo(), and unifyStructures() in WASM.
src/lib/data/py/long.rs Exposes pad_to for long pseudonyms/attributes in Python.
src/lib/data/py/records.rs Exposes LongRecordStructure, LongRecord.structure(), and LongRecord.pad_to() in Python.
src/lib/data/py/json.rs Exposes structure(), pad_to(), and unify_structures() in Python.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JobDoesburg JobDoesburg changed the title Add pad_to structure Add external padding, pad_to structure Feb 13, 2026
@JobDoesburg JobDoesburg requested a review from Copilot February 13, 2026 10:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

JobDoesburg and others added 4 commits February 13, 2026 12:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Gulianrdgd Gulianrdgd merged commit 983ddc8 into main Feb 17, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants