RFC Errata
RFC 6030, "Portable Symmetric Key Container (PSKC)", October 2010
Source of RFC: keyprov (sec)
Errata ID: 3811
Status: Reported
Type: Technical
Publication Format(s) : TEXT
Reported By: Ivan Micanovic
Date Reported: 2013-11-25
Section 4.1. says:
All the elements listed above (and those defined in the future) obey a simple structure in that they MUST support child elements to convey the data value in either plaintext or encrypted format: Plaintext: The <PlainValue> element carries a plaintext value that is typed, for example, to xs:integer. Encrypted: The <EncryptedValue> element carries an encrypted value.
Notes:
In case that <Counter>, <Time>, <TimeInterval> or <TimeDrift> are encrypted in the PSKC file, the standard doesn't say anything about how to interpret this encrypted data.
After decrypting those values we have byte array.
Example:
Counter plain text value: 10000 decimal
In the case that this value is encrypted and later decrypted what should we expect?
Byte content 0x27 0x10 or 0x01 0x00 0x00 or something else?
1. Byte content 0x27 0x10 is interpreted as 10000 decimal if this bytes are interpreted as binary data (Big endian).
2. Byte content 0x01 0x00 0x00 is interpreted as 10000 decimal if this bytes are interpreted as hex data (Big endian).
Each hex digit will be mapped to a resulting decimal digit. From my point of view this way is a bit confusing.
My proposal to solve this issue is described in 1.