Skip to content

Shell we insert original_size of file into payload section of manifest.json? #46

@woodlyer

Description

@woodlyer

like this:

"payload": {
    "type": "reference",
    "url": "0.payload",
    "protocol": "zip",
    "isEncrypted": true,
    "mimeType": "application/pdf",
    "tdf_spec_version:": "x.y.z",
    "original_size": 1024000   // insert the original size of file before encryption to here.
}

Now, we can get the original file size from encryptionInformation->segments.
It's an array, but low efficiency.
When the file is very big(larger than 64GB), manifest.json will be very big.

            "segments": [{
                    "encryptedSegmentSize": 131100,
                    "hash": "ZTc0OWUyZDA2NzM2YjkwNGY2YjBmMWU3NTI3YWQxOTI=",
                    "segmentSize": 131072
                }, {
                    "encryptedSegmentSize": 131100,
                    "hash": "YjZhYWRkNzFiMDQyZDE2N2Y4ZmJhNTJkZWQzODQxZDI=",
                    "segmentSize": 131072
                },
                ...

Imagine the use case. tdf file is on the server. We use FUSE to load and decrypt it.
When user ls the file, we should show the right file size before encryption.
It's low efficiency to get it from manifest.json, especially when the file is very big.

tdf is a good thing. It can be used in big data security.
Maybe tdf need some little update?

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