mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #317] Drop all use of DEFAULT_ALIGN #59
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @magnumripper on GitHub (May 29, 2013).
Original GitHub issue: https://github.com/openwall/john/issues/317
Any format using DEFAULT_ALIGN should be using BINARY_ALIGN and SALT_ALIGN instead, with correct values assigned to them.
After that is done, drop the actual definition of DEFAULT_ALIGN too, stopping anyone from using it.
@magnumripper commented on GitHub (Jun 3, 2013):
Basically, any format that has DEFAULT_ALIGN in its format struct (like NT_fmt.c in current bleeding-jumbo tree) should be modified to use BINARY_ALIGN and SALT_ALIGN instead, and those two new macros should be defined in top of format (like nt2_fmt_plug.c in current tree). The correct value for them depends on binary() and salt() and possibly also salt_hash(), binary_hash() and cmp_*(). The vast majority would have both set to either 1 or 4. For a salt- or binary size of 0, the corresponding align could be 1. Any format that casts the salt or binary eg. in binary_hash() or cmp_all() needs to have alignment set accordingly.
@kholia commented on GitHub (Jun 5, 2013):
I have started working on this issue.
@magnumripper commented on GitHub (Jun 9, 2013):
I fixed all formats that had my name in them (for any reason). Still 74 to go :-/
@magnumripper commented on GitHub (Feb 28, 2014):
Here's a way to make them show up:
Result:
@jfoug commented on GitHub (Nov 21, 2014):
worked through some more:
f5366a2Cuda stuff untested, but set safe. Binary align set to how binary used, and salt align set to largest member of salt struct. That is safe. Since cuda might be on intel only, alignment may not matter.
These changes tested on Sparc (Btw, I LOVELOVELOVE having ./configure now that sets up the sparc build properly, even though there are plenty of warnings)
Tested on 32/64 bit cygwin, 64 bit linux, 32 bit BE sparc. Did have one fix:
2603301@kholia commented on GitHub (Nov 21, 2014):
I hate to say it, but I am loving all the
configuremagic too 👍I was trying to get something like
configure --with-asanworking but no luck so far.@magnumripper @jfoug it would be awesome to get something like
configure --with-asanworking :)@magnumripper commented on GitHub (Nov 21, 2014):
That should be trivial. But context-switching into M4 takes me a while every time 😵
@jfoug commented on GitHub (Nov 21, 2014):
LOLOLOL M4 is your friend
(from hell)
@jfoug commented on GitHub (Nov 21, 2014):
Some more:
6c1b599gpg fixed (
f02231c) I do not understand why what one required 4 byte alignment, but it cored withouth it???@jfoug commented on GitHub (Nov 21, 2014):
More
ea17835I will test on BE, and this might be the last for a bit.ONLY 34 left...
@jfoug commented on GitHub (Nov 22, 2014):
@magnum, I am going to do opencl (I am just finishing up all non-opencl). For opencl,, I simply am going to make all of them MEM_ALIGN_WORD. There are no issue for BE systems, but I want ot keep them the same as they are today. If you want me to handle this differently let me know.
@jfoug commented on GitHub (Nov 22, 2014):
11a81c0will test on BE. Only ones left now are opencl, and of course formats.h@jfoug commented on GitHub (Nov 22, 2014):
Completed:
aac6b4bwas last of the formats (I did NOT do anything in ./src/unused)69523d4removes the #define from formats.h@magnumripper commented on GitHub (Nov 22, 2014):
Excellent!
If binary() or salt() returns (or may return) smalled alignment than that, we'll get annoying warnings on some systems. I don't see a single warning right now though.
@magnumripper commented on GitHub (Nov 22, 2014):
Good job. This was a boring issue!
@jfoug commented on GitHub (Nov 22, 2014):
the old default already WAS MEM_ALIGN_WORD, so that is why I wanted to keep them that way. I did change so that salt len=0 got a align=1 and binary=0 (with no 4 byte needed hash), then align was set to 1. I think others mostly got MEM_ALIGN_WORD
@magnumripper commented on GitHub (Nov 22, 2014):
Ah, yes. I always fixed formats that I saw warnings from so we're probably 99% set now.