[PATCH] scd: Improve KDF-DO support
arnaud.fontaine at ssi.gouv.fr
Thu Feb 8 19:03:08 CET 2018
I think adding some examples is a good idea to clarify ambiguous
sentences such as the one I have quoted.
So no encapsulating tag in the response, only the child ones. Correct ?
If this is correct, the following patch is enough to trigger the
KDF_ITERSALTED_S2K only when needed.
Le 08/02/2018 à 18:19, Achim Pietig a écrit :
> this is a common missunderstandig how data objects are read or written.
> The leading Tag (like 65 or F9) is the the index under what the data object is stored in the card.
> This Tag is used to address the content of the DO within commands like Get Data or Put Data in the P1P2 bytes.
> The data field or response field only contains the values of these DOs.
> In case of a simple DO it is a single value, in case of a constructed DO the child-DOs with Tag/Lenght/Value (TLV).
> "Constructed DOs (C, marked yellow) are returned including their tag and length" means the content of the DO, for constructed DOs a concatenation of all child DOs.
> The main Tag (in P1P2) is never used/given/returned in the data field of the commands.
> In the nearest future I will launch an update of the V3.3 specification with examples for all commands (no technical changes, only for better understanding).
> Achim Pietig
> Am 08.02.2018 um 09:35 schrieb Arnaud Fontaine:
>> the specification (section 4.4.1, page 22, in v3.3) says:
>> "Constructed DOs (C, marked yellow) are returned including their tag and
>> and in the same section, page 25, F9 (KDF-DO) in marked as a constructed
>> DO, "format C".
>> So, from my understanding of these elements, the KDF-DO must be returned
>> with its tag and length.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 510 bytes
Desc: not available
More information about the Gnupg-devel