[GH-ISSUE #2952] Replace the base64 decoder function #1853

Closed
opened 2026-10-15 04:26:41 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @solardiz on GitHub (Dec 1, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2952

Originally assigned to: @jfoug on GitHub.

Our base64.[ch] specify no copyright holders nor a license, and the approach used looks rather inefficient (unneeded tiny memcpy, then lots of if's on the different character ranges). I recently optimized a MIME base64 decoder for blists, this is function decode_base64() in:

http://cvsweb.openwall.com/cgi/cvsweb.cgi/projects/blists/mime.c?rev=HEAD

I am the only copyright holder for it, and it's under our 0-clause BSD. I suggest we reuse it for JtR as well, perhaps replacing only the uses of blists' buffer API with explicit writes to the output buffer - or we can import the buffer API (that's blists' buffer.[ch]) into JtR as well, if we expect to make more use of it.

Originally created by @solardiz on GitHub (Dec 1, 2017). Original GitHub issue: https://github.com/openwall/john/issues/2952 Originally assigned to: @jfoug on GitHub. Our `base64.[ch]` specify no copyright holders nor a license, and the approach used looks rather inefficient (unneeded tiny `memcpy`, then lots of if's on the different character ranges). I recently optimized a MIME base64 decoder for blists, this is function `decode_base64()` in: http://cvsweb.openwall.com/cgi/cvsweb.cgi/projects/blists/mime.c?rev=HEAD I am the only copyright holder for it, and it's under our 0-clause BSD. I suggest we reuse it for JtR as well, perhaps replacing only the uses of blists' buffer API with explicit writes to the output buffer - or we can import the buffer API (that's blists' `buffer.[ch]`) into JtR as well, if we expect to make more use of it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1853
No description provided.