Skip to content

Cleanup encrypt, decrypt + new TKM format with metadata included in the ciphertext#47

Merged
jMyles merged 7 commits into
cryptograss:mainfrom
kubic71:cleanup-encrypt-new-tkm-format
Aug 13, 2023
Merged

Cleanup encrypt, decrypt + new TKM format with metadata included in the ciphertext#47
jMyles merged 7 commits into
cryptograss:mainfrom
kubic71:cleanup-encrypt-new-tkm-format

Conversation

@kubic71

@kubic71 kubic71 commented Jul 23, 2023

Copy link
Copy Markdown
Collaborator

What was done:

New TKM format

@dataclass
class TMK:
    bulk_ciphertext: BulkCipherText
    encrypted_sym_key: bytes
    conditions: Lingo

The payload ClearText now contains both the file content as well as the metadata.

@dataclass
class Payload:
    file_content: bytes
    metadata: dict[str, Any]

We got rid of the JSON / base64 encodings, as msgpack is now used for the serialization / deserialization.

Refactoring

This is a followup to the (yet unmerged) PR #42

@kubic71

kubic71 commented Jul 23, 2023

Copy link
Copy Markdown
Collaborator Author

Maybe related PR: nucypher/taco-web#254

@jMyles
jMyles merged commit 2b8bbcf into cryptograss:main Aug 13, 2023
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