liboqs icon indicating copy to clipboard operation
liboqs copied to clipboard

OQS_SHA*_sha***_ API does not support arbitrary length updates

Open ashman-p opened this issue 1 year ago • 3 comments

For example OQS_SHA2_sha256_inc_blocks(OQS_SHA2_sha256_ctx *state, const uint8_t *in, size_t inblocks) This makes an assumption that all the data is present at the time of processing and thus can be broken up into blocks. This also does not easily allow parse and update processing of arbitrary fields.

The proposal would be to add a new API to support this.

OQS_SHA*_sha***_inc(OQS_SHA2_sha***_ctx *state, const uint8_t *in, size_t in_len)

ashman-p avatar Nov 07 '23 17:11 ashman-p

This change could be added to "Make low-level crypto algorithms implementation switchable #1599"

ashman-p avatar Nov 07 '23 17:11 ashman-p

@dstebila : What was the reason to add this issue to the 0.10.0 milestone? OK to postpone this to 0.11.0 such as to bring the 0.10.0 milestone to completion/"RC-readiness"?

baentsch avatar Mar 07 '24 09:03 baentsch

@dstebila : What was the reason to add this issue to the 0.10.0 milestone? OK to postpone this to 0.11.0 such as to bring the 0.10.0 milestone to completion/"RC-readiness"?

This was needed to implement LMS. Since that work is slated for a later release, I think it's safe to do the same here.

SWilson4 avatar Mar 07 '24 14:03 SWilson4

Completed (for SHA256) in #1650.

SWilson4 avatar Jul 24 '24 16:07 SWilson4