yubico-c icon indicating copy to clipboard operation
yubico-c copied to clipboard

Incorrect parsing of hex values

Open MikhailRyazanov opened this issue 9 months ago • 0 comments

ykparse (and probably everything else) incorrectly parses hexadecimal strings with upper-case letters. Namely, all upper-case letters are treated as zeros instead of treating the letters AF the same way as af (and all other symbols besides 09, AF, af as input errors).

Example:

$ ykparse 0123456789ABCDEFGHIJKLMNOPQRSTUV cbdefghijklnrtuvcbdefghijklnrtuv
Input:
  token: cbdefghijklnrtuvcbdefghijklnrtuv
          01 23 45 67 89 ab cd ef 01 23 45 67 89 ab cd ef 
  aeskey: 0123456789ABCDEFGHIJKLMNOPQRSTUV
          01 23 45 67 89 00 00 00 00 00 00 00 00 00 00 00 
...

MikhailRyazanov avatar May 13 '24 02:05 MikhailRyazanov