Skip to content

Incremental signing #7

@sirex

Description

@sirex

There are several places, where CEC has to sign something. For this, we need a function that can incrementally sign data stream.

Function signature could look something like this:

for hash, signature in sign(data, state):
    pass

Here hash is SHA-1 hash, signature is a hash of hash signature made with CEC private key. hash and signature both have to be incremental, meaning that if you will hash all data you will get hash from the last sign call with last passed data.

data is an iterable of strings.

state is an optional argument and if state is given, then it should continue hashing from where it left. I'm not sure how to implement this, if will have to find-out it yourself. But the idea, that it should be enough to hash only new items, not everything from the beginning.

Metadata

Metadata

Assignees

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