Skip to content
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

fix multiple issues #4

Merged
merged 8 commits into from
Oct 3, 2016
Merged

fix multiple issues #4

merged 8 commits into from
Oct 3, 2016

Conversation

joeyh
Copy link
Contributor

@joeyh joeyh commented Aug 15, 2016

Fixes #2 #3 #5 #6

Fixes #2

Note that three header files were added via extra-source-files, not via
c-sources. This was necessary to get the build to work, otherwise cabal
tries to compile those three files and fails.
Useful for things like linux distributions that want to avoid duplication
of libraries to ease security maintenance.
Should fix #5 but I have not
tested it on a 32 bit architecture.

Note that this changes constructors of Argon2Exception which are part of
the exported interface.
Fixes #3

hashEncoded' still uses packCString, because there the encoded string does
in fact end at NULL.
ef26dce Merge pull request #164 from Leont/make-install
7e8f465 Merge pull request #165 from Leont/perl-binding
73d0ec1 Add install target
3a892e2 Add perl to list of bindings
eca23b5 Merge pull request #163 from technion/burn
8700990 Eliminate redundant function.
bb0bb0b Merge pull request #158 from darwinairola/master
5143e76 updated makefile to build under Cygwin environment
d162dea Merge pull request #156 from antelle/master
9f62708 add javascript browser port
4844d2f Merge pull request #155 from lucab/to-upstream/make-opttarget
c57a95f makefile: optional explicit target for optimizations
f87df8a Merge pull request #153 from WOnder93/master
91f7a15 Fix bad pointer copy when using custom allocator
9dc74e1 Fix for #152
1daab72 Added BlaMka reference
a41b714 Merge pull request #150 from kmaragon/addCoreCLRToLinks
50b0efd Add C# link to documentation
cf6d73b Merge pull request #148 from Qowyn/master
08639f3 Merge pull request #149 from ranisalt/patch-3
527154e Update languages to reflect binding implementation
bc60426 VS2015 DLL Projects + ReleaseStatic Configuration for Releases without dependencies
8e82f90 Merge pull request #147 from PlasmaPower/patch-1
a002f61 Add support for building DLLs with Visual Studio
7c1fde1 Merge pull request #145 from technion/size_t_check
eb831c3 Safer implementation of #135.
7ee1395 Merge pull request #142 from yonas/patch-2
1816dcb Fix documentation typo in run.c
d7266c4 Merge pull request #140 from yonas/patch-1
a46839d Consolidate FreeBSD, NetBSD, and OpenBSD in Makefile
4625cc5 Merge pull request #139 from Apsalar/Solaris
7de70b3 added build support for Solaris in the Makefile
ae5043b Merge pull request #136 from lucab/to-upstream/argon2-cli-usage
beee306 Merge pull request #137 from lucab/to-upstream/pkg-config-stub
02dc1b8 libargon2: add a pkg-config stub
93a9385 run: use `-h` as command line option for usage help
95cb6b9 Merge pull request #134 from phxql/feature/msys2
51e50e9 Now compiles with MSYS2
f741035 Merge pull request #132 from technion/readme_ctx
901445e Update README example code with newer context struct and function names.
1633bde Merge pull request #131 from technion/zero_memset
26a7234 Ensure memset is not called with n == 0. This is undefined in C.
00aaa66 Merge pull request #130 from lucab/lucab/manpage
a9e7efe argon2: add manpage with usage info
26c2724 Merge pull request #129 from technion/uninitialized
69a13b4 Properly zero pwd pointed before using it.
a42a5b1 prepare the next release
6bf7eea Merge pull request #128 from technion/inlength
5d2810e Improve handling of long passwords for command line utility.
cd77d12 Merge pull request #127 from aberaud/patch-1
8a86be6 use lower-case "windows.h"
137bf99 Merge branch 'test-ci'
f3600f7 Update README.md
d838a7b Run TestCI just for Release configuration
be3583e Merge pull request #126 from alipha/master
d209fc4 Add options for bare output to executable
964f0eb Merge pull request #125 from P-H-C/test-ci
c617fa9 added support for CI using AppVeyor
b93524a Merge pull request #124 from cjlarose/master
4d0522f Add alternative JavaScript implementation to README
6142868 Merge pull request #122 from technion/less_test
8d8b306 Remove test with m=20 for general test cases, as it takes too much RAM for many devices. Reintroduce large test - only for CI environment.
3495076 Merge pull request #121 from technion/decode_null
79442a8 Fix C90 compliance in previous commit.
843600e Check for NULL encoded strings. Fixes #120.
ba4b99a prevent unwanted wrapping
02bdff7 Missing size_t declaration
ccd37c8 Merge pull request #119 from P-H-C/decode
3aa6b14 Replaced ARGON2_OLD_VERSION_NUMBER with ARGON2_VERSION_10
e8181f9 Renamed the enumerators of Argon2_version Changed version position in Argon2_Context
50b6360 Replaced uit32_t with size_t
0349d51 fix arguments to memset_s
649bbb0 Avoid initial zeroing by calling fill_block on the first pass
32a5a63 Changed version number output from hexadecimal to decimal for the generated test vectors
ead743b Uncommented test code
b7b676e - included support for variable length hash, calculate the encoded hash lenght (see P-H-C/phc-winner-argon2#114) - updated tests - added test vectors for v16 - updated the checking of test vectors
ca0fd37 Changes: fixed the implementation for backward compatibility added tests for backward compatibility recomputed the test vectors changed test.sh to return an error code if it is the case ignore object file generated by OPTTEST
778f294 Double definition bug
c74eecd Update benchmark and core code
a06b3e4 Decoding change
0505ac7 Merge pull request #113 from technion/arch
9623a7a Merge branch 'master' of github.com:P-H-C/phc-winner-argon2
4153ed9 salt at least 8 chars
872dc4c Merge pull request #116 from jedisct1/usage-salt
92016bc Salt length is not at most 16 characters, but at least 8 characters
b12bee6 Merge pull request #114 from ranisalt/fix-cli
2a941cf Update README
ce96dda Merge branch 'sneves-master'
ae947cd merge
dbdd2f2 Replace magic numbers and remove dependency on math
74add0e Add option to set output hash length
54617af Merge pull request #115 from P-H-C/1.3
91c9780 Merged master into branch 1.3
aa1b587 Utilise optimised builds on supported platforms.
785634d Fix cli tool to handle variable length salts
dbe4c5e Improved attack descriptions
dd5bcbc New attack descriptions
b07d7b6 Merge pull request #111 from ranisalt/verify-mismatch
9fde315 Merge pull request #106 from jedisct1/calloc
4df441a Test for mismatching verify error code
7438782 Issue different code when verify mismatches
6525f74 Merge pull request #110 from UniQP/unreachable
d954c94 Fix bug introduced in 6887dae4889b36df87e50623dc8035f9fcfc0663.
6fbdb88 formatting
b8f0625 address issue #74
e452e2b New spec
01b288a Use calloc() instead of malloc()+memset()
2224f88 Fix code indentation
44c85a7 Fix code indentation
3b7374d Updates tests
f4e7584 Merge pull request #105 from technion/more_tests
67aacec Introduce a test for multiple threaded hash.
1d5d067 Fixed code indentation
c12a0fb Merge branch '1.3' of https://github.com/P-H-C/phc-winner-argon2 into 1.3
37e0312 Updated test vectors and test cases
a4ed1af Bugfix in bench
cffb8f1 XOR instead of overwrite: fill_block now XORs over the new block. Signatures and generate_addresses() updated accordingly
5c84080 bugfix
c91b47c Introducing overwrite operation and new version number
bd1347f Update .gitignore
e44140d Update .travis.yml
909baae Update .travis.yml
2a7c8ed Update .travis.yml
ee85850 Update README.md
42a8c23 Merge branch 'master' of https://github.com/P-H-C/phc-winner-argon2
c9f3ab7 Added support for code coverage using Codecov
55ca874 Update README.md
49dce68 Fix Makefile
c485df7 Changed testci flags
3c5df4e Changed testci flags
720dd76 Try: make testci
0b57e5b Test on OSX
f2acc07 Added gcc to compilers list
06d99a6 Bugfix in bench
2ae1225 XOR instead of overwrite: fill_block now XORs over the new block. Signatures and generate_addresses() updated accordingly
4861367 Test Travis CI
4394c01 bugfix
6f4e732 Introducing overwrite operation and new version number
166c401 Merge pull request #104 from technion/mem_leak
52eaf23 Free memory on thread failure.
c6805ac Merge pull request #102 from technion/testflags
a024628 Make general test compile flags more relaxed than CI test case. Fixes #101.
24b957b Merge pull request #99 from technion/travis
4c6ed70 Add C99 error flag to test.
a691d49 Formatter run on test suite.
17e6591 "make clean" to delete testcases. Run tests with FORTIFY_SOURCE.
98504c9 Introduce Travis CI config.
079c5a6 Var-length hash fixed
08db8e4 Merge pull request #89 from technion/testcases
37b1d28 Merge pull request #97 from lucab/lucab/public-cleaning
667e48d doc: reformat api doc in library header
2d0bedf doc: reword the Argon2i vs. Argon2d description
3855c8c argon2: remove undefined functions declarations
6b66b7e Merge pull request #93 from lucab/lucab/public-refactor
352eca3 Merge pull request #95 from hynek/master
4acb86e More C99
f961cb9 Merge pull request #94 from technion/secretzero
a4ee4fb Document test case in README.
e6268d8 Zero secrets. Fixes #90.
60caea9 argon2: move public header out of src/
0654d85 api: implement visibility control for library symbols
d32933e Run a make format to re-align code style
631cd1d Merge pull request #91 from hynek/master
fc35e8c Remove C99-style variable declaration
7450df8 Introduces an automated test suite.
6411c26 Merge pull request #88 from technion/formatting
b0d00e0 Fix corrected
370f1d2 Remove a mix of tabs and spaces.
2598c9f Merge pull request #86 from lucab/lucab/fix-bench-genkat-renaming
2297924 Fix bench and genkat after low-level API renaming
01b2c59 Renamed 'error_message' to 'argon2_error_message'
d9b0baf Refactored low-level API functions to include the '_ctx' suffix
6887dae decoding and argon2_ codes unifiedd
e3b38df Merge pull request #83 from P-H-C/pr/79
17fefb9 Function description changed
cd8e4c7 Conflicts resolved
2c1b9be Merge remote-tracking branch 'refs/remotes/origin/master' into pr/79
8793b5c Merge pull request #82 from technion/comment_fix
49364cd Remove // style comments.
f238da1 Merge pull request #80 from technion/constants
56c177a Decoding length clarified
660e98a Utilise existing constants more consistently.
6eedc8e Implements validate_input() call from libsodium. Fixes #77.
2d014c5 Remove stray character.
7788a0e Merge pull request #78 from Khady/patch-1
4113b4e Link to OCaml bindings
c09c835 bindings in a-z order
4e6ad32 Merge pull request #73 from seanhussey/patch-1
3ae2acb Fixing a minor typo
1db58fe Merge pull request #71 from thibaultCha/docs/readme-lua-binding
34ebe99 docs(readme) add Lua binding
ea8545a Merge pull request #69 from technion/thread_exit
cdbe53a Merge pull request #68 from mbroz/master
1456057 Introduces an error state for threading failures. Fixes #64. fill_memory_blocks() configured to return a status, this introduces checks for a number of a different error conditions, inlcuding calloc() and NULL pointer failures. These were previously ignored errors. Thread failures no longer call printf/exit, ensuring better support for higher level bindings. fill_memory_blocks() is only called in one place, it's return value is now checked.
fcabf6f Fix double declaration of fill_segment.
2c6d33e Explicitly cast const pointer assignment.
2146480 Merge pull request #67 from lucab/lucab/error-index-range
8a21f50 argon2: add negative index check to error_message
c6ff7ef Merge pull request #65 from tvdburgt/go-bindings
7962e5b Add Go bindings link to README
dc11c31 Merge pull request #63 from phxql/jvm-binding
6b00705 Added binding for the JVM.
9c14161 adding soname
c3c32a8 Merge pull request #62 from quininer/patch-1
5edcdc7 Link to Rust bindings
c6a54e9 Merge pull request #57 from ocharles/patch-1
e2b9ee5 Merge pull request #58 from dessant/patch-2
3105b25 Merge pull request #60 from lucab/lucab/makefile-flags
dfec9f5 makefile: preserve external flags
cab1f85 Add argon2_cffi to the list of bindings
5e0ebfb Link to Haskell bindings

git-subtree-dir: phc-winner-argon2
git-subtree-split: ef26dce8b07a5dfc3a0e0008ac447a6cf8b50c77
Update phc-winner-argon2, so hashes are generated using
version 1.3 of the argon2 spec.

Fixes #6

Note that phc-winner-argon2 supports generating either version 1.3 or
version 1.0 hashes. It would be possible to add the version to the API,
but I have not done so.
The haskell implementation has fallen out of sync with phc-winner-argon2,
since v= was added to the prefix of the encoded hash.
@joeyh joeyh changed the title add additional C source files to cabal file fix multiple issues Sep 26, 2016
@joeyh
Copy link
Contributor Author

joeyh commented Sep 26, 2016

Updated this PR to fix all currently open issues. Due the API change and update to a new version of the argon2 spec, this needs to bump the API version; I went ahead and set version to 1.2.0 with the changelog below.

It would be good to get a release dealing with these issues. If it would be helpful, I am willing to co-maintain this package.

  • Updated embedded phc-winner-argon2, so that hashes are generated
    using version 1.3 of the argon2 specification.

    Note that that hashes generated using this version are different than
    hashes generated using previous versions, so anything that compares them
    or relies on them being stable may be broken by this update.
    However, Crypto.Argon2.verify will continue to be able to verify
    hashes produced by previous versions.

  • Use CSize for portability instead of Word64, fixing build on 32 bit
    systems. This changed the constructors of Argon2Exception, an API change.

  • Bug fix: Crypto.Argon2.hash returned a ByteString truncated at the first
    NULL.

  • Added use-system-library build flag.

@ocharles ocharles merged commit 3319f9f into haskell-hvr:master Oct 3, 2016
@ocharles
Copy link
Collaborator

ocharles commented Oct 3, 2016

Thank you so much for your help on this! As you may have noticed, I'm not particularly active on this project at the moment, and I'd be happy to give you a maintainer bit if you're interested.

@ocharles
Copy link
Collaborator

ocharles commented Oct 3, 2016

This is now on Hackage.

@joeyh
Copy link
Contributor Author

joeyh commented Oct 3, 2016

Happy to co-maintain it.

see shy jo

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.

None yet

2 participants