remove cryptopp dependency #535

pull tcatm wants to merge 2 commits into bitcoin:master from tcatm:no-cryptopp changing 28 files +68 −6057
  1. tcatm commented at 8:20 PM on September 27, 2011: none
    • removes cryptopp dependency in BitcoinMiner() and replace it with OpenSSL
    • add simple unittest for SHA256Transform()

    This has only been tested on Linux so it would be great if someone can try this on win/osx.

  2. in src/util.h:None in 65aaec60a4 outdated
     689 | +	return T((x>>y) | (x<<(sizeof(T)*8-y)));
     690 | +}
     691 | +
     692 | +inline uint32_t ByteReverse(uint32_t value)
     693 | +{
     694 | +#if defined(__MWERKS__) && TARGET_CPU_PPC
    


    gavinandresen commented at 3:03 PM on September 29, 2011:

    I vote for getting rid of these #ifdefs and just using the generic code.

  3. in src/util.h:None in 65aaec60a4 outdated
     681 | +{
     682 | +	assert(y < sizeof(T)*8);
     683 | +	return T((x<<y) | (x>>(sizeof(T)*8-y)));
     684 | +}
     685 | +
     686 | +template <class T> inline T rotrFixed(T x, unsigned int y)
    


    gavinandresen commented at 3:04 PM on September 29, 2011:

    rotrFixed isn't used anywhere, right?

  4. tcatm commented at 4:25 PM on September 29, 2011: none

    Now that midstate is deprecated I will rework this patch to as it does not need to support midstate anymore. Though, what is the most generic code for ByteSwap/Reverse that we can safely use in bitcoin and works on GCC (lin/win/osx) and VisualStudio?

  5. gavinandresen commented at 5:48 PM on September 29, 2011: contributor

    The generic byte-swap would be the code in the #else that uses rotlFixed...

    Also, I think it'd be cleaner to move rotlFixed and the body of ByteReverse to util.cpp.

    Can you hold off on removing midstate support? I'd like to pull this for the 0.5 release, we can remove the deprecated midstate a few months AFTER the 0.5 release (gotta give people time to adapt).

  6. tcatm commented at 2:52 PM on September 30, 2011: none

    Looks like github does not handle rebased pull requests correctly.

    Changes:

    • reduced ByteReverse() to a single function using shift, OR and AND

    We can't move it to util.cpp because it is declared inline and it is used when looping over arrays so performance is still somewhat important.

  7. gavinandresen commented at 3:56 PM on September 30, 2011: contributor

    Can you cherry-pick just the (two?) commits into a fresh tree, merge them, and update this pull request? github or your branch are very confused...

  8. remove cryptopp dependency, add simple unittest for SHA256Transform() 6ccff2cbde
  9. simpler ByteReverse 452506fc41
  10. gavinandresen merged this on Oct 5, 2011
  11. gavinandresen closed this on Oct 5, 2011

  12. ptschip referenced this in commit 1b7efb3faa on May 9, 2017
  13. KolbyML referenced this in commit bc86927231 on Sep 4, 2020
  14. rajarshimaitra referenced this in commit d31a9c2042 on Aug 5, 2021
  15. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me