keepassxc-specs icon indicating copy to clipboard operation
keepassxc-specs copied to clipboard

Outdated _DATETIME_ specification

Open palant opened this issue 2 years ago • 5 comments

Note: I meant this to be a pull request but I cannot quite figure out the toolchain you use to generate all the formats from rfc.md. The tools I try produce a way too verbose diff.

Section 3.1.1 currently claims _DATETIME_ to be in ISO 8601 format. This actually changed from KDBX 3.1 to KDBX 4.0 however. The new format is a base64-encoded 64 bit LE integer representing a number of seconds since 0001-01-01 00:00:00 UTC. There is a corresponding note at the bottom of https://keepass.info/help/kb/kdbx_4.html.

palant avatar Apr 08 '23 20:04 palant

Good catch, although I think that the behaviour is very inconsistent. Not even sure if this should be part of the XML spec, but it should definitely be mentioned.

phoerious avatar Apr 11 '23 08:04 phoerious

Not sure what’s inconsistent here. In my test database I can see only one ISO date: _LAST_MODIFIED key stored under <CustomData>. That’s a non-standard entry by KeePassXC. Everything else is base64-encoded dates and only those.

palant avatar Apr 13 '23 15:04 palant

It's inconsistent that we have two different formats for the XML plaintext and the XML-In-KDBX formats. Also, I don't really see the point of a binary date format for performance reasons. If you are really concerned about that, you should drop the XML serialisation altogether and replace the entire thing with a binary format.

phoerious avatar Apr 14 '23 17:04 phoerious

Ah, I see. Yes, I was also surprised when I read about performance being the reason for this change. I cannot imagine there being enough dates in a database to justify this change, even if all of them are processed at once.

Question is: is this RFC describing the KDBX format as it currently exists or the format we’d rather have? If it’s the latter, I’d certainly have more suggestions. :smiley:

palant avatar Apr 14 '23 17:04 palant

It's entirely descriptive. You can formulate wishes for KDBX5, though.

phoerious avatar Apr 14 '23 18:04 phoerious