laurencelundblade / t_cose

Commercial quality COSE_Sign1 implementation in C for constrained environment. Works with MbtedTLS and OpenSSL Crypto.
BSD 3-Clause "New" or "Revised" License
26 stars 24 forks source link

Add support for indefinite length strings for verification #2

Open laurencelundblade opened 5 years ago

laurencelundblade commented 5 years ago

This requires the ability to set up a memory pool allocator for the internal QCBOR encoder

letmaik commented 2 years ago

What's the use case for indefinite length strings? COSE requires to use Canonical CBOR which forbids those.

laurencelundblade commented 2 years ago

It is only required in the one internal instance where a hash must be computed the independently by sender and receiver. Inputs to create_tbs_hash() in the t_cose.

The payload can be an indefinite length string, the headers can be indefinite length strings and so on.

The use case would be some super constrained environment where something like the payload might not fit in RAM.

COSE is "flexible" on this in that there is no requirement to decode this or to not encode this. EAT has profiles that ask the use case to declare what they are doing about it.