Title: Invalid Electrum Key
Last modified: September 3, 2016

---

# Invalid Electrum Key

 *  [Chris_L](https://wordpress.org/support/users/chris_l/)
 * (@chris_l)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/invalid-electrum-key/)
 * I’m getting the following error after tying in my Master key. I’ve verified it’s
   correct several times.
 * Error:
    Bitcoin payment gateway is not operational: Electrum Master Public Key
   is invalid. Must be 128 characters long, consisting of digits and letters: ‘a
   b c d e f’

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [ohouse](https://wordpress.org/support/users/ohouse/)
 * (@ohouse)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938864)
 * I am having the same issue. What I discovered is the key that electrum provided
   is only 111 characters long. Which means the problem is with electrum not producing
   the correct length or Woocommerce is looking for the wrong length. Either way
   I hope this gets fixed soon because it has my whole site stopped dead in its 
   tracks.
 *  [BobsBURGS](https://wordpress.org/support/users/bobbysburgers/)
 * (@bobbysburgers)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938865)
 * Agreed no dice here.
 *  [jerry508](https://wordpress.org/support/users/jerry508/)
 * (@jerry508)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938866)
 * What version of electrum r u using?
 * I believe only the old v1.9.8 will work with its mpk format.
 * The new elec v2 mpk that starts with ‘xpub’ doesnt work with the woo plugin. 
   But the old v1.9.8 electrum mpk plugs in just fine..
 *  [ahmed04](https://wordpress.org/support/users/ahmed04/)
 * (@ahmed04)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938867)
 * I use electrum-2.0.3-setup and I get some problem with you ?
    can you tell where
   I can download v1.9.8 ?
 *  [anatolysavin](https://wordpress.org/support/users/anatolysavin/)
 * (@anatolysavin)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938868)
 * You can download v1.9.8 here [https://download.electrum.org/](https://download.electrum.org/)
   
   But it don’t run, even in capabitily mode.
 *  [neosin](https://wordpress.org/support/users/neosin/)
 * (@neosin)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938869)
 * there’s a post regarding the master key length bug here
    [https://bitcointalk.org/index.php?topic=1026571.0](https://bitcointalk.org/index.php?topic=1026571.0)
 * I’ve bookmarked it and will post an update here if anyone finds a solution
 *  [neosin](https://wordpress.org/support/users/neosin/)
 * (@neosin)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938870)
 * potential solution for those using v2+ with the new 111 character master keys,
   someone please verify
 * **open the file bwwc-bitcoin-gateway.php**
 * **find line**
    `else if (!preg_match ('/^[a-f0-9]{128}$/', $this->electrum_master_public_key))`
 * **replace with**
    `else if (!preg_match ('/^[0-9a-zA-Z]{111}$/', $this->electrum_master_public_key))`
 * **open file bcmath_Utils.php**
 * **find**
    `define('MAX_BASE', 128);`
 * **replace with**
    `define('MAX_BASE', 111);`
 *  [Greg Robertson](https://wordpress.org/support/users/517design/)
 * (@517design)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938872)
 * **neosin, Your solution worked perfectly for me. Thanks!**
 * potential solution for those using v2+ with the new 111 character master keys,
   someone please verify
 * open the file bwwc-bitcoin-gateway.php
 * find line
    else if (!preg_match (‘/^[a-f0-9]{128}$/’, $this->electrum_master_public_key))
 * replace with
    else if (!preg_match (‘/^[0-9a-zA-Z]{111}$/’, $this->electrum_master_public_key))
 * open file bcmath_Utils.php
 * find
    define(‘MAX_BASE’, 128);
 * replace with
    define(‘MAX_BASE’, 111);
 * **Paths to the files:**
    wp-content > plugins >bitcoin-payments-for-woocommerce
   >**bwwc-bitcoin-gateway.php**
 * wp-content > plugins >bitcoin-payments-for-woocommerce >phpecc > classes >util
   > **bcmath_Utils.php**
 *  [Greg Robertson](https://wordpress.org/support/users/517design/)
 * (@517design)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938873)
 * The above code let me use the key, but now I’m getting an error upon checkout.
   When I check Bitcoin as my payment, and click Place Order, the order does not
   go through and I get the following error at the top of the checkout page:
 * “CurveCurveFp Object ( [a:protected] => 0 [b:protected] => 7 [prime:protected]
   => 115792089237316195423570985008687907853269984665640564039457584007908834671663)
   does not contain point ( 20139727203196486522876591193063649819462947761513549103823800141681658369,
   369049320460203173903206256216019890340108033867982827520 )”
 * I don’t know if this error is related to the code changes (above) or if it is
   something different.
 * Here is the URL: [https://www.goldextradellc.com/checkout/](https://www.goldextradellc.com/checkout/)
 * Any help / suggestions you can give me would be great. Thanks
 *  [tkemmere](https://wordpress.org/support/users/tkemmere/)
 * (@tkemmere)
 * [11 years ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938875)
 * Hi,
 * In my test installation, after aplying [@neosin](https://wordpress.org/support/users/neosin/)’
   s fix, I get that too. (With the first long number matching exactly @571Design’s
   error msg. The sesond one matches partially, and the 3rd one not at all).
 * I’m running everything freshly downloaded, so:
    – WP 4.2.2 – Woo-commerce 2.3.9–
   Bitcoin Payments for WooCommerce 3.12 – Electrum 2.2
 *  [jerry508](https://wordpress.org/support/users/jerry508/)
 * (@jerry508)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938877)
 * Is anybody getting a syntax token error? Says something like error paraing line
   1 column 1 of json when clicking checkout,
 * I had this plugin working again but latest wordpress/woo update must have conflicted
   somehow.. Anybody have any advive?

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Invalid Electrum Key’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bitcoin-payments-for-woocommerce.
   svg)
 * [Bitcoin Payments for WooCommerce](https://wordpress.org/plugins/bitcoin-payments-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bitcoin-payments-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bitcoin-payments-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/bitcoin-payments-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bitcoin-payments-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bitcoin-payments-for-woocommerce/reviews/)

 * 11 replies
 * 9 participants
 * Last reply from: [jerry508](https://wordpress.org/support/users/jerry508/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/invalid-electrum-key/#post-7938877)