ietf-openpgp
[Top] [All Lists]

Re: [openpgp] Algorithm-specific data: problems with Simple Octet Strings, and possible alternatives

2021-03-31 02:52:05
Hi Ángel,

Just a minor note from me reading the MPI section:

On 26.03.2021 03:44, Ángel wrote:
Spurious leading zeroes (e.g. [00 09 00 00 00 01 FF]) are not allowed
now.

If by "now" you mean MPIs then a careful reading of "3.2. Multiprecision Integers" [0] reveals that was is forbidden is counting leading zeros in length. If the length is properly computed ("starting from its most significant non-zero bit") then there is nothing that prevents implementations from inserting zero bytes between length and the first non-zero byte.

[0]: https://tools.ietf.org/html/rfc4880#section-3.2

Example:

"Thus, the MPI [00 02 01] is not formed correctly. It should be [00 01 01]."

But there is no rule that prevents [00 01 00 01] from being valid.

Kind regards,
Wiktor

_______________________________________________
openpgp mailing list
openpgp(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/openpgp