-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The return of hashrat -p64 is not compliant with rfc 4648 #18
Comments
The testhashes in https://github.com/ColumPaget/Hashrat/blob/master/check.sh are also not rfc 4648 compliant:
|
The problem is probably in https://github.com/ColumPaget/libUseful/blob/master/Encodings.h:
This last line is not rfc 4648 compliant. It must be: See also: ColumPaget/libUseful#3 |
Hi jvw1954. I don't think I originally made the -p64 option to be rfc4648 compliant, I didn't even know that rfc existed, I think. I just found there were some issues with websites and came up with a schema to handle that. But there's no reason why I couldn't add another schema with the config you've given it here, and maybe call it '-r64' or '-rfc4648', or both! I'll do it and release a new version shortly. |
New version of Hashrat (v1.13) is now out with the -r64 (or also the -rfc4648) option. |
According to the manpage hashrat -64 returns a base64 encoded hash and hasrat -p64 a base64 encoded hash with a-z,A-Z and _-, for best compatibility with 'allowed characters' in websites.
According to rfc 4648 the return of these two commands should be the same, except for the values 62 '+' and 63 '/'. In the url safe variant these values are '-' and '_'. Onfortunately the returns are in practice very different, for example: ywu0vq367WZKEvDcqm6dwB/8wh88muIbHJJdV0uIftg= and mkiojeruvLO-4j3ReauSk1zwkWwwai8Q799SKoi8UhV.
Calculations with Python3 confirm the first (-64) return of hashrat: ywu0vq367WZKEvDcqm6dwB/8wh88muIbHJJdV0uIftg= and ywu0vq367WZKEvDcqm6dwB_8wh88muIbHJJdV0uIftg=. These calculations appear compliant with rfc 4648.
The text was updated successfully, but these errors were encountered: