Skip to content

Possible to serialize/deserialize hasher state for later use? #523

@felstead

Description

@felstead

Hey BLAKE3 team - so I am prototyping something akin to a Proof of Data Possession/Proof of Retrievability system over a large number of large files. My thought is to BLAKE3(file_bytes) then serialize the hasher state (which is presumably quite small?) then, when trying to determine if someone owns a file, I provide a unique, random nonce, deserialize the state, then effectively BLAKE3(file_bytes + nonce) and use that to determine ownership. It's not perfect security wise (proof of possession moves from knowing the hash to knowing the hasher state) but I believe it works for my use-case.

To my question - is there a reliable way for me to serialize the state of a Hasher object prior to finalization such that I can load it at an arbitrary later time? There is plenty of stuff in hazmat that looks like it's viable, but I would need a couple of pointers in the right direction to work out how to do it.

Thank you!

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