packages feed

longshot 0.1.0.4 → 0.1.0.5

raw patch · 5 files changed

+30/−39 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -12,6 +12,7 @@ * Up to 10% performance improvement while using 30% less memory * Additional explanations on the arguments of the core function -## 0.1.0.4+## 0.1.0.5 * Deep search performance improvement * Clean up unnecessary arguments+* Fixed typos
LICENSE view
@@ -1,30 +1,19 @@-Copyright Francis Lim (c) 2020--All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:--    * Redistributions of source code must retain the above copyright-      notice, this list of conditions and the following disclaimer.+Copyright (c) 2020 Francis Lim -    * Redistributions in binary form must reproduce the above-      copyright notice, this list of conditions and the following-      disclaimer in the documentation and/or other materials provided-      with the distribution.+Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions: -    * Neither the name of Francis Lim nor the names of other-      contributors may be used to endorse or promote products derived-      from this software without specific prior written permission.+The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
README.md view
@@ -12,7 +12,7 @@  * Support various __search lengths__, __character sets__ and __hashers__. * Strict mode: searches only for a given _exact length_-* Deep mode: Incrementally searches when you do not know the exact length of search+* Deep mode: **Incrementally searches** when you *do not know the exact length of search* * Use `CPUs` as _much_ as possible. __Get the most out of them!__ * Use, however, `memory` as _little_ as possible.   @@ -113,15 +113,16 @@  ## You should consider the following if there might be more characters in preimage. ## More characters, much longer time to find!-$ ./longshot run -c 'abcdefghijklmnopqrstuvwxyz0123456789' -a blake2b --deep bb40f6..e02830+$ ./longshot run --deep -c 'abcdefghijklmnopqrstuvwxyz0123456789' -a blake2b bb40f6..e02830  ## Roughly, time spending is proportional to (Number of char available) ^ (char length). ## Exponent 'char length' is surely more dominant! Use long-long password as always! -## longshot is very efficient and get the most of CPU's power in parallel.-## But this kind of work would be very painful time even for longshot.-$ ./longshot run -n 12 -c 'abcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-=_+[]{}\|' \-                 -a blake2b --deep bb40f6..e02830 +RTS -s+## Longshot is very efficient and get the most of CPU's power in parallel.+## But this kind of work would need a lot of time even for longshot +## due to exponentially increased search space.+$ ./longshot run -deep -c 'abcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-=_+[]{}\|' \+                 -a blake2b bb40f6..e02830 +RTS -s  ## '+RTS -s' the end of line is optional, and that is for a summary of CPU time and memory. ```
longshot.cabal view
@@ -4,17 +4,17 @@ -- -- see: https://github.com/sol/hpack ----- hash: 77e95d459d9fba67fbf3f6f7adcfb1c70e549c1c1b4bfe5c5b84ff131adef03c+-- hash: c10047924761d0fcff4dbb2e8ff88afe21db7e63864eacee60ac943577718ef3  name:           longshot-version:        0.1.0.4+version:        0.1.0.5 synopsis:       Fast Brute-force search using parallelism description:    Longshot enables to search for preimages from a given hash value                 using a brute-force method based on parallelism.                 .                 * Support various search lengths, character sets and hashers                 * Strict mode: searches only for a given exact length-                * Deep mode: searches everything less than or equal to a given length.+                * Deep mode: Incrementally searches when you do not know the exact length of search                 * Use @CPUs@ as much as possible. Get the most out of them!                 * Use, however, @memory@ as little as possible.                 .
src/Crypto/Longshot/Internal.hs view
@@ -56,7 +56,7 @@ --   runPar | A partially applied function for parallel execution -- ------------------------------------------------------------------------------ -- prefixes | All possible combinations of given prefix characters.---          | The search space is equally partioned based on these prefixes.+--          | The search space is equally partitioned based on these prefixes. --          | length of prefixes == number of sparks -- ------------------------------------------------------------------------------ -- @@@ -93,7 +93,7 @@  -- | Parallel map using deepseq, par and pseq ----- Type of any argument in this map should be instance of 'NFData'.+-- Type of any argument in this map should be an instance of 'NFData'. -- (<%>) :: (NFData a, NFData b) => (a -> b) -> [a] -> [b] f <%> []       = []