Subject: [core] Questions dealing with Blockwise Transfer

From: Jim Schaad <[email-masked]>
Date: Thu, 2 Apr 2020 11:00:29 -0700

I am running into a couple of issues when getting my OSCORE secure blockwise
transfer debugged.  I accidentally introduced  an error in my OSCORE
decryption code and that caused my blockwise code to fall over.

1.  Based on the below text, I am not sure if this is saying that only
success status codes are permitted to use blockwise or if you can use this
for error status codes as well.  This question comes about partly due to the
draft https://www.ietf.org/id/draft-fossati-core-coap-problem-02.html which
might return some "large" size error resources.

Hence, for the methods defined in [RFC7252], Block1 is useful with
   the payload-bearing POST and PUT requests and their responses.
   Block2 is useful with GET, POST, and PUT requests and their payload-
   bearing responses (2.01, 2.02, 2.04, and 2.05 -- see Section 5.5 of
   [RFC7252]).

2.  The document does not explicitly give any way for a server to stop a
block transfer half way through.  While it would make sense to an error
status is returned, I do not know if the block option is also supposed to be
returned or not.  Note that this would not necessarily interact well with
the idea of doing a blockwise return for an error status content.

Jim

---

From: Christian Amsüss <[email-masked]>
Date: Mon, 6 Apr 2020 18:30:06 +0200

Hello Jim,

On Thu, Apr 02, 2020 at 11:00:29AM -0700, Jim Schaad wrote:
> 1.  [...] might return some "large" size error resources.

Good questions.

> the idea of doing a blockwise return for an error status content.

Section 2.3 item 1 (on descriptive usage) clearly relates the numand
block size to the payload of that message. Thus, an error would only use
Block2 in descriptive use if the error payload is being fragmented.

(I know, that does not answer all the question.)

KR
c

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom