Skip to content

Fix aes_ff1_base85 alphabet errors#241

Open
cpu wants to merge 1 commit into
mainfrom
cpu-239
Open

Fix aes_ff1_base85 alphabet errors#241
cpu wants to merge 1 commit into
mainfrom
cpu-239

Conversation

@cpu
Copy link
Copy Markdown
Member

@cpu cpu commented May 29, 2026

Implements the fixed vectors offered by @dspdon in #239

  • Corrects the base85 alphabet. Previously it was only 83 distinct characters: s/t were transposed, w was omitted, and _ appeared twice.
  • Standardizes the invalid-plaintext sentinels. Previously digit -1 was rendered inconsistently as one of 10 different out-of-alphabet characters (', ,, -, ., /, :, [, \, ], w), and digit 85 was rendered as \x7f (non-printable DEL). The updated vectors use - for both (which is not in the new alphabet, so the test cases remain invalid).

I did a quick sanity pass on the other aes_ff1_* testvectors and didn't spot any similar issues in their alphabets. Further review input welcome.

Resolves #239

@cpu cpu self-assigned this May 29, 2026
* Corrects the base85 alphabet. Previously it was only 83 distinct
  characters: s/t were transposed, w was omitted, and _ appeared twice.
* Switches to a consistent invalid plaintext sentinel. Previously digit
  -1 was rendered as any of {'.', ',', "'", ':', '-', '/', '[', ']',
  '\\', 'w'} depending on the test, and digit 85 was rendered
  as '\x7f' (a non-printable DEL). The updated vectors standardizes both
  to '-' (which is not in the new alphabet, so it remains "invalid").
@cpu cpu changed the title Fix aes_ff1_base85 alpahabet errors Fix aes_ff1_base85 alphabet errors May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aes_ff1_base85_test.json: alphabet has duplicate symbols

2 participants