> On Dec 9, 2022, at 4:06 AM, Hannes Tschofenig <[email protected]>
> wrote:
>
> Hi Laurence,
>
> When you say below that this is the code size, what exactly is included in
> the measurement?
It’s the QCBOR-based encoding/decoding to put the values into this structure:
struct t_cose_hpke_params {
uint16_t aead_alg_id;
uint16_t hkdf_alg_id;
struct q_useful_buf_c enc;
uint16_t kem_id;
};
In the “Laurence” option below, it uses the generic t_cose parameter
decoder/encoder and doesn’t count that decoder/encoder in the code size because
that already has to be there for the other COSE parameters.
LL
(I suspect using a ciphersuite would reduce total code size for encode and
decode to less than 100 bytes. That’s probably why COSE mostly used
ciphersuites)
>
> FWIW I agree with you statement that making the KEM ID mandatory simplifies
> decoding.
>
> Ciao
> Hannes
>
> From: COSE <[email protected]> On Behalf Of Laurence Lundblade
> Sent: Thursday, December 1, 2022 11:01 PM
> To: cose <[email protected]>
> Subject: [COSE] Code size of Ilari's proposal vs Laurence's
>
> x86 code bytes from rough implementations for t_cose using QCBOR:
>
> Laurence Ilari Ilari-kem-id-not-optional
> Encode 141 120 115
> Decode 123 194 169
> Total 264 314 284
>
> Not a very big difference. I’m fine with either.
>
> If we take Ilari’s, I’d like the KEM ID to not be optional. It will only add
> one or two bytes to what is transmitted and it will simplify decoding. It
> probably removes some ambiguity and error conditions too.
>
> LL
>
>
> In Laurence’s, t_cose works on a linked list of parameters including HPKE
> parameters that are encoded/decoded by the already-existing parameter
> processor. For Ilari’s the CBOR decoder is called to encode/decode the array
> in/out of a COSE parameter.
>
>
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
_______________________________________________
COSE mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/cose