2
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/mkproof synced 2024-05-18 20:36:06 +02:00
Commit Graph

675 Commits

Author SHA1 Message Date
Drew DeVault 6f9ea7d249 Overwrite spinner when showing proof 2020-12-26 19:24:50 -05:00
Tom Lebreux 2efaf30d3a Add -j option to specify number of processes 2020-12-26 19:21:20 -05:00
Tom Lebreux aea879847a Draw spinner while waiting for a proof 2020-12-26 19:21:20 -05:00
Tom Lebreux 4c1cba82b2 Use multiple processes to find proof 2020-12-26 19:21:19 -05:00
Tom Lebreux e73a6e9c66 Split mkproof logic into own function 2020-12-26 19:21:18 -05:00
William Casarin 4a8e70d38c Fix build on macos
I'm not sure entirely sure why arc4random_buf needs to be forward
declared, but these changes are needed for macos builds to work.

Fixed build errors:

include/random.h:4:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
ssize_t get_random_bytes(unsigned char *buf, size_t nbytes);
^~~~~~~

src/random-arc4.c:7:2: error: implicit declaration of function 'arc4random_buf'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        arc4random_buf(buf, nbytes);

Signed-off-by: William Casarin <jb55@jb55.com>
2020-12-24 14:22:11 -05:00
William Casarin 738f584ff6 Use leading zero bits instead of digits
This allows for a more granular difficulty setting

Signed-off-by: William Casarin <jb55@jb55.com>
2020-12-24 09:04:22 -05:00
Christopher Wellons 14cfc3f783 Set .version field in the Argon2 context
I couldn't get my own, independent mkproof implementation to match
outputs. After some debugging, I discovered this is because mkproof
implicitly uses 0 for its Argon2 version number. As a result, mkproof's
actual KDF is something unique, slightly different from Argon2id.

Of course, challenges generated before this patch will be incompatible
with proofs created after this patch, so perhaps it's too late to
correct? On the other hand, most Argon2 libraries hardcode the version
number, so leaving it creates serious challenges for alternative
implementations.
2020-12-06 19:49:31 -05:00
Tom Lebreux 7de01c930f Return 1 for invalid proof, 2 for usage errors
This makes it easier to detect if the input proof is valid or if there
was another error (eg: badly formatted challenge, etc)
2020-12-06 12:17:10 -05:00
Tom Lebreux a91ef0ee2c Output Invalid proof on proof bad format 2020-12-04 19:43:02 -05:00
Eyal Sawady e734a4e5af .gitignore: add object files and manpages 2020-11-26 08:06:19 -05:00
Eyal Sawady ec45c16f4f Fix segfault on mkproof with no arguments 2020-11-26 08:06:18 -05:00
Drew DeVault e14d1d1c5c Remove hashcat comparison
I was mistaken about the issues with generating tokens in advance. The
main advantage is then just that argon2id is much better than sha1 for
this use-case.
2020-11-25 14:21:56 -05:00
Drew DeVault 111f9f34da Update algorithm
This changed a bit while I was tuning it
2020-11-25 14:13:32 -05:00
Drew DeVault 9152700eaa README: Compare mkproof with hashcat 2020-11-25 14:03:19 -05:00
Drew DeVault fbeed4ab3f README: s/seed/password/g
Leftover from old version of this algo
2020-11-25 13:55:16 -05:00
Drew DeVault 8454780c5e Correct tuning details in README 2020-11-25 13:54:41 -05:00
Drew DeVault 97bfdd7ead Tune defaults 2020-11-25 13:51:59 -05:00
Drew DeVault 66d4788762 Add note about packages 2020-11-25 13:51:59 -05:00
Drew DeVault c8de2d8da2 Add install and uninstall targets 2020-11-25 12:26:09 -05:00
Drew DeVault c49aff35e3 Add man pages 2020-11-25 12:22:22 -05:00
Drew DeVault 1f58a37098 mkproof: use unsigned long for attempt count 2020-11-25 12:22:03 -05:00
Drew DeVault 773cdb5582 mkchallenge: multiply difficulty by two 2020-11-25 12:21:47 -05:00
Drew DeVault 2a81538b02 mkproof: improve final output a bit 2020-11-25 12:07:40 -05:00
Drew DeVault 8f5c12ace0 Implement everything 2020-11-25 12:05:19 -05:00
Drew DeVault 4267a36811 Initial commit 2020-11-25 11:15:59 -05:00
Drew DeVault 87d922c6c6 Add 'argon2i/' from commit '440ceb9612d5a20997e3e12728542df2de713ca4'
git-subtree-dir: argon2i
git-subtree-mainline: 3e7a084af1
git-subtree-split: 440ceb9612
2020-11-25 10:48:57 -05:00
Drew DeVault 3e7a084af1 Initial commit 2020-11-25 10:48:52 -05:00
Dmitry Khovratovich 440ceb9612
Merge pull request #285 from dra27/mingw-w64-fixes
mingw-w64 / MSYS2 fixes
2020-07-09 14:56:35 +02:00
Dmitry Khovratovich 3df7b847b1
Merge pull request #289 from ultrahorizon/issue-288
Add reference to pyargon2 in README Bindings
2020-07-09 14:52:28 +02:00
Dmitry Khovratovich 4a296310b3
Merge pull request #292 from fturco/https
use HTTPS instead of HTTP for URLs
2020-07-09 14:52:01 +02:00
Francesco Turco 92cd2e19b5 use HTTPS instead of HTTP for URLs
Signed-off-by: Francesco Turco <mail@fturco.net>
2020-07-05 09:29:02 +02:00
James Webb f72f8cde3f
Add reference to pyargon2 in README Bindings 2020-06-21 18:02:18 +01:00
David Allsopp 6d8620941f Use PRIx64 on mingw-w64 instead llx
mingw-w64 is able to work with old enough Microsoft C runtimes which
don't support %llx. However, all versions of mingw-w64 do have
inttypes.h, so use it (PRIx64 is shimmed for other platforms, since
inttypes.h is a C99 header).
2020-04-10 21:38:28 +01:00
David Allsopp ec465c85fd Generalise MSVC-specific changes to mingw-w64 2020-04-10 21:37:37 +01:00
Dmitry Khovratovich cd5dd35996
Merge pull request #277 from kisik21/patch-1
Fix cross-compilation on some Linux systems
2020-04-06 16:55:43 +02:00
Dmitry Khovratovich 288d50eaef
Merge pull request #281 from pmjdebruijn/master
Don't fail on existing symlink
2020-04-06 16:54:41 +02:00
Dmitry Khovratovich 84241b40a9
Merge pull request #282 from pks-t/pks/win32-undefined-error
Fix possible compiler error due to undefined _MSC_VER
2020-04-06 16:53:57 +02:00
Dmitry Khovratovich d13f825a25
Merge pull request #276 from lambdapioneer/patch-1
Adding new Android binding to README.md
2020-04-06 16:52:55 +02:00
Patrick Steinhardt 48829f87eb Fix possible compiler error due to undefined _MSC_VER
In order to determine how to set up the ARGON2_PUBLIC and ARGON2_LOCAL
macros, we check for various different environments via preprocessor
defines. For Microsoft Visual Studio, we check that the macro _MSC_VER
evaluates to non-zero via `#elif _MSC_VER`. This may raise a compile
error when compiling with "-Werror=undef" if the variable isn't defined.

Fix the issue by using `#elif defined(_MSC_VER)` instead.
2020-02-20 17:37:32 +01:00
Pascal de Bruijn b997b9e7d4 Don't fail on existing symlink 2019-11-07 09:55:32 +01:00
Vika cd1c1d8d20
Fix cross-compilation on some systems
Some Linux distributions (e.g. NixOS, where this issue was spotted) don't provide an unprefixed ar when cross-compiling. This PR aims to fix this.

See[NixOS/nixpkgs#67490](https://github.com/NixOS/nixpkgs/pull/67490) for information on where did it start.
2019-08-26 14:05:22 +03:00
Daniel H 267ae44e71
Adding new Android binding to README.md
I've published an Android binding for Argon2 that makes it simple for Android developers to use Argon2. It emerged from a personal mobile app project. I've found that the existing Java bindings don't work too well with Android - especially with the now mandatory 64-bit support.

I hope adding to the listing will help other mobile developers.
2019-08-22 15:45:10 +02:00
JP Aumasson 62358ba212
Merge pull request #270 from bitmark-property-system/master
fix the Makefile to install libargon2.pc
2019-05-20 11:18:00 +02:00
Christopher Hall d3639142fa fix the Makefile to install libargon2.pc
make sure that lib or libdata are selected based on Kernel
and sed the template file to have correct paths

If kernel is Linux then default path for  Ubuntu
  For others add LIBRARY_REL=lib64 (or similar to make command)

Signed-off-by: Christopher Hall <hsw@bitmark.com>
2019-04-24 17:48:41 +08:00
Samuel Neves e4ca309b04
Merge pull request #268 from mbroz/master
Wait for already running threads if a thread creation failed.
2019-03-12 21:52:42 +00:00
Milan Broz cfa4385e72 Wait for already running threads if a thread creation failed.
On memory-constrained systems (like cgroups limited processes)
thread creation often fails.

The code needs to wait for already running threads on error path;
otherwise these threads can access deallocated memory
(and cause a segfault or another crash).
2019-03-11 21:43:42 +01:00
Samuel Neves 80dca8559b
Merge pull request #267 from maciejsszmigiero/use-explicit_bzero-glibc
use explicit_bzero() on recent glibc versions
2019-03-10 15:55:27 +00:00
Samuel Neves 6b4420ffcf
Merge pull request #266 from noloader/master
Visual Studio improvements
2019-03-10 15:52:41 +00:00
Maciej S. Szmigiero fea3943ada
Use explicit_bzero() on recent glibc versions
glibc 2.25+ has explicit_bzero(), so we can use it to securely wipe memory
instead of hacking our own memset-based replacement, just like we already
do on OpenBSD.
2019-03-05 14:30:44 +01:00