Bitcoin Forum
June 21, 2024, 07:24:17 PM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 »
1  Bitcoin / Hardware wallets / Re: [NOW AVAILABLE] BTChip / Ledger HW1 : Bitcoin Hardware Wallet in a USB smartcard on: May 16, 2015, 07:57:09 AM
@Muhammed Zakir:
Quote
It is working good for me. Was it broken after you made an commit(if any)?

In my case under Win7 64 bit btchip-python is unstable, can't be used together with Electrum.

Did you use libusb-win32-bin-1.2.6.0?
Did you compile cython with Microsoft Visual C++ VCForPython27?
Or you used a MinGW environment?

2  Bitcoin / Hardware wallets / Re: [NOW AVAILABLE] BTChip / Ledger HW1 : Bitcoin Hardware Wallet in a USB smartcard on: May 15, 2015, 05:38:17 PM
I tried to install btchip-python under Win 7, 64 bit.

- installed python-2.7.9.amd64.msi
- added to PATH C:\Python27\;C:\Python27\Scripts\
- installed Microsoft Visual C++ VCForPython27.msi
- pip install cython
- pip install hidapi
- downloaded https://github.com/walac/pyusb/archive/pyusb-master.zip
- cd pyusb-master
- python setup.py install
- downloaded https://github.com/LedgerHQ/btchip-python/archive/btchip-python-master.zip
- cd btchip-python-master
- python setup.py install
- cd samples
- python getFirmwareVersion.py
[hang up]

I tried to run pyusb again:
cd pyusb-master\tests
python testall.py
PyUSB ValueError: No backend available

I Googled to this error, and found: http://stackoverflow.com/questions/5152133/pyusb-backend-not-accessible
It said that "You need to install libusb-1.0, libusb-0.1, or openusb as a backend to pyusb."

I downloaded libusb-win32-bin-1.2.6.0
cd libusb-win32-bin-1.2.6.0\bin
inf-wizard.exe

created a driver kit for
Vendor ID        Product ID      Description
0x2581            0x2B7C          Plug-up

Then installed the created driver.

Now pyusb tests run without errors.
Also, btchip-python is operational, gets back the firmware version, but not always:

btchip-python-master\samples>python getFirmwareVersion.py
=> e0c4000000
<= 010001040e014e9000
1.4.14

btchip-python-master\samples>python getFirmwareVersion.py
=> e0c4000000
Traceback (most recent call last):
  File "getFirmwareVersion.py", line 25, in <module>
.
.
    timeout
  File "C:\Python27\lib\site-packages\usb\backend\libusb0.py", line 381, in _che
ck
    raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] libusb0-dll:err [_usb_reap_async] reaping reques
t failed, win error: "A device connected to the system doesn't operate properly"

The next test runs only ONCE conrrectly, then gives an error, then gangs up.
After pwercycle, the same...

\btchip-python-master\tests>python testConnectivity.py
btchip firmware version:
=> e0c4000000
<= 010001040e014e9000
{'compressedKeys': True, 'version': '1.4.14', 'specialVersion': 0}
some random number from the dongle:
=> e0c0000014
<= f673c10e1ce482848366cbc75fe42cd61f41ea3f9000
['0xf6', '0x73', '0xc1', '0xe', '0x1c', '0xe4', '0x82', '0x84', '0x83', '0x66',
'0xcb', '0xc7', '0x5f', '0xe4', '0x2c', '0xd6', '0x1f', '0x41', '0xea', '0x3f']

\btchip-python-master\tests>python testConnectivity.py
btchip firmware version:
=> e0c4000000
Traceback (most recent call last):
  File "testConnectivity.py", line 29, in <module>
    print(app.getFirmwareVersion())
  File "C:\Python27\lib\site-packages\btchip_python-0.1.14-py2.7.egg\btchip\btch
ip.py", line 363, in getFirmwareVersion
    response = self.dongle.exchange(bytearray(apdu))
  File "C:\Python27\lib\site-packages\btchip_python-0.1.14-py2.7.egg\btchip\btch
ipComm.py", line 79, in exchange
    self.device.write(0x02, tmp[offset:offset + 64], 0)
  File "C:\Python27\lib\site-packages\usb\core.py", line 898, in write
    self.__get_timeout(timeout)
  File "C:\Python27\lib\site-packages\usb\backend\libusb0.py", line 499, in intr
_write
    timeout)
  File "C:\Python27\lib\site-packages\usb\backend\libusb0.py", line 552, in __wr
ite
    timeout
  File "C:\Python27\lib\site-packages\usb\backend\libusb0.py", line 381, in _che
ck
    raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] libusb0-dll:err [_usb_reap_async] reaping reques
t failed, win error: Egy rendszerhez csatlakoztatott eszk÷z nem műk÷dik.

btchip-python-master\tests>python testConnectivity.py
btchip firmware version:
=> e0c4000000
[HANG UP]



Please help! How to go on?
3  Bitcoin / Electrum / Re: Electrum 2.0 release on: May 15, 2015, 05:26:08 PM
@Muhammed: thanks, I will try to get help in the official HW.1 thread
Anyway,  on the same PC under Linux everything is just fine.
Also, under win7 btchip-python is not very stable: I tried it five times: 4 times it worked OK, then it gave:
USBError: [Errno None] libusb0-dll:err [_usb_reap_async] reaping request failed
4  Bitcoin / Electrum / Re: Electrum 2.0 release on: May 15, 2015, 03:54:22 PM
I tried to run pyusb again:
Code:
cd pyusb-master\tests
python testall.py
PyUSB ValueError: No backend available

I Googled to this error, and found: http://stackoverflow.com/questions/5152133/pyusb-backend-not-accessible
It said that "You need to install libusb-1.0, libusb-0.1, or openusb as a backend to pyusb."

I downloaded libusb-win32-bin-1.2.6.0 earlier. I tried now:
Code:
cd libusb-win32-bin-1.2.6.0\bin
inf-wizard.exe

create a driver kit for
Vendor ID        Product ID      Description
0x2581            0x2B7C          Plug-up

Then installed the created driver.

Now pyusb tests run witjout errors.
Also, btchip-python is operational, gets back the firmware version.


When I start Electrum, and enter the PIN of HW.1, then the following window is displayed:
Computing master public key

and I also get the following error in another window:
[Errno None]  libusb0-dll: err [_usb_reap_async] timeout error

Please help! How to go on?








5  Bitcoin / Electrum / Re: Electrum 2.0 release on: May 05, 2015, 05:28:44 PM
@Muhammed Zakir:

1. I downloaded https://github.com/signal11/hidapi/archive/hidapi-master.zip
2. cd hidapi-master/windows
3. opened hidapi.sln with Visual Studio 2010 and clicked "Build Solution"
4. cd hidapi-master/windows/Debug, run hidtest.exe
   I got this:

Device Found
  type: 1050 0010
  path: \\?\hid#vid_1050&pid_0010#7&36c90f4b&0&0000#{4d1e55b2-f16f-11cf-88cb-001
111000030}
  serial_number: 0001855185
  Manufacturer: Yubico
  Product:      Yubico Yubikey II
  Release:      233
  Interface:    -1

Device Found
  type: 2581 2b7c
  path: \\?\hid#vid_2581&pid_2b7c#7&3eb2a02&0&0000#{4d1e55b2-f16f-11cf-88cb-0011
11000030}
  serial_number: Plug-up
  Manufacturer: Plug-up
  Product:      Plug-up
  Release:      1
  Interface:    -1

unable to open device

5. copied hidapi.dll and hidapi.lib to c:\Windows\System32

6. Intalled python-2.7.9.amd64.msi
7. Added to PATH C:\Python27\;C:\Python27\Scripts\

8. Installed Microsoft Visual C++ VCForPython27.msi
9. pip install cython
10. downloaded https://github.com/trezor/cython-hidapi/archive/cython-hidapi-master.zip
11. cd cython-hidapi-master
12. python setup.py install

>python setup.py install
running install
running build
running build_ext
cythoning hid.pyx to hid.c
building 'hid' extension
error: Unable to find vcvarsall.bat

13. pip install hidapi
\build\cython-hidapi-master>pip install hidapi --upgrade
Requirement already up-to-date: hidapi in c:\python27\lib\site-packages\hidapi-0
.7.99_5-py2.7-win-amd64.egg
Cleaning up...

14. download https://github.com/walac/pyusb/archive/pyusb-master.zip
15. cd pyusb-master
16. python setup.py install

17. https://github.com/LedgerHQ/btchip-python/archive/btchip-python-master.zip
18. cd btchip-python-master
19. python setup.py install

20. cd samples
21. python getFirmwareVersion.py

\build\btchip-python-master\samples>python getFirmwareVersion.py
Traceback (most recent call last):
  File "getFirmwareVersion.py", line 23, in <module>
    dongle = getDongle(True)
  File "C:\Python27\lib\site-packages\btchip_python-0.1.14-py2.7.egg\btchip\btch
ipComm.py", line 279, in getDongle
    dev = usb.core.find(idVendor=0x2581, idProduct=0x1b7c) # core application, W
inUSB
  File "C:\Python27\lib\site-packages\usb\core.py", line 1221, in find
    raise ValueError('No backend available')
ValueError: No backend available

22. c:\Windows\System32
    delete hidapi.dll, lidapi.lib

23. python getFirmwareVersion.py
    same result

-----

OK, doing it again:

pip uninstall cython
pip install cython

pip uninstall hidapi
pip install hidpai

cd pyusb-master
python setup.py install
cd tests
python testall.py

.E.....
======================================================================
ERROR: runTest (test_util.FindDescriptorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "e:\Users\Lipi\build\pyusb-master\tests\test_util.py", line 68, in runTes
t
    d = usb.core.find(idVendor=ID_VENDOR)
  File "e:\Users\Lipi\build\pyusb-master\usb\core.py", line 1221, in find
    raise ValueError('No backend available')
ValueError: No backend available

----------------------------------------------------------------------
Ran 7 tests in 0.017s

FAILED (errors=1)

cd btchip-python-master
python setup.py install
cd samples
python getFirmwareVersion.py


e:\build\btchip-python-master\samples>python getFirmwareVersion.py
Traceback (most recent call last):
  File "getFirmwareVersion.py", line 23, in <module>
    dongle = getDongle(True)
  File "C:\Python27\lib\site-packages\btchip_python-0.1.14-py2.7.egg\btchip\btch
ipComm.py", line 279, in getDongle
    dev = usb.core.find(idVendor=0x2581, idProduct=0x1b7c) # core application, W
inUSB
  File "C:\Python27\lib\site-packages\usb\core.py", line 1221, in find
    raise ValueError('No backend available')
ValueError: No backend available

If the dongle is inserted:

e:\Users\Lipi\build\btchip-python-master\samples>python getFirmwareVersion.py
=> e0c4000000

(Hang up)

----------------------------------

Please help!!!

6  Bitcoin / Electrum / Re: Electrum 2.0 release on: May 04, 2015, 10:13:18 PM
@Muhammed: "IIRC" - I asked you to post a build, not to "If I Remember Correctly"...
How do you set up btchip-python, cython, etc under Windows?
It is still a question. Please help!


7  Bitcoin / Electrum / Re: Electrum 2.0 release on: May 03, 2015, 09:04:17 AM
@Muhammed: When you will be near your PC, please post me the necessary steps. THANKS!
I do not know how to install e.g. btchip-c-api or btchip-pythopn under windows. Under linux I can use
sudo apt-get install libusb, etc... what should I do under windows? Where are the necessary libraries?
What should I use to compile the sources? What is the compilation environment? mingw?

8  Bitcoin / Electrum / Re: Electrum 2.0 release on: May 03, 2015, 07:27:19 AM
@Muhammed: How did you compile it under Windows? Can you help me?
I have installed electrum-2.0-setup.exe under win7 professional.
When I start the program, and  the "Select your hardware wallet" screen is displayed, only Trezor wallet can be selected.
9  Bitcoin / Electrum / Re: Electrum 2.0 release on: May 03, 2015, 06:52:52 AM
@Muhammed: Fine. Did you install anything beside Electrum? Is it a Win7 system?

10  Bitcoin / Electrum / Re: Electrum 2.0 release on: May 02, 2015, 09:22:28 PM
Platform: Win 7
I am trying Electrum 2.1.1 with HW.1
After some minutes I get: "Exception: Timeout"
What should I check or do to make it work??!!!
Please help.

----
Side note:
In the same Win 7 environment,
Electrum  2.1.1 an HW.1 works perfectly under Ubuntu 14.04 LTS in a VirtualBox environment.
I have btchip-c-api, btchip-python and electrum.
I can post the make script to anybody, who is interested.
11  Bitcoin / Armory / Re: Armory - Discussion Thread on: February 25, 2015, 05:15:01 PM
...

Ugh, I just realized I bet we broke the 12.04 offline bundle with this release.  I bet no one tested that... we really need to widen the testing net better.  In the future, we might offer quadruple bounties for the first bug found in each of a bunch of categories.  That would include testing the offline bundles, and lots of corner case features...

I might need to update the offline bundles and re-release 0.93...

Armory-0.93 Win7 64 bit version (Version 0.93-beta-84a5897ec2) also has a problem:
Today it crashed and rebuilt Armory database 3 times.
12  Bitcoin / Development & Technical Discussion / Re: [Bounty 50BTC] Looking for a GPU implementation of this algorithm on: July 04, 2014, 07:16:56 AM
Hi, btchris!

I have made an interesting discovery: if you know the encoded seed of an Electrum wallet, then you can recover the unencrypted seed without the password stretching and fancy Elliptic Curve stuff. Simply try to decode the password, and if you get a valid hexadecimal number of 32 characters, then the password candidate is good, otherwise it is bad.
...
Its speed can be optimized to 10**7 (maybe 10**8 ) trials/sec/CPU_core.

Yup, that's exactly what I'm doing in btcrecover here. I'm only managing around 10^5 tries/s per CPU core (it's written in Python but uses libraries for SHA and AES written in C) but I'd guess it could be improved if written entirely in C, or even better in OpenCL....

It turns out that you can play similar tricks with many wallet encryption schemes (but not with Armory as far as I could find - Armory really got wallet encryption right).

Very nice program!
I tried it yesterday, with an Electrum wallet.
I modified it to use only the first 44 characters of the encoded seed:

Code:
$ diff btcrecover.py btcrecover_mod.py
572c572
<     if len(wallet) != 64:                raise ValueError("Electrum encrypted seed plus iv is not 64 bytes long")
---
>     ###if len(wallet) != 64:                raise ValueError("Electrum encrypted seed plus iv is not 64 bytes long")
580c580
<     encrypted_seed, iv   = wallet[16:], wallet[:16]
---
>     encrypted_seed, iv   = wallet[16:32], wallet[:16]
584,585c584,587
<         # If the 48 byte encrypted seed decrypts to exactly 32 bytes long (padded with 16 16s), we've found it
<         if seed.endswith(b"\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10"):
---
>         ### # If the 48 byte encrypted seed decrypts to exactly 32 bytes long (padded with 16 16s), we've found it       
>         ### if seed.endswith(b"\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10"):
>         # if all the digits are hexadecimal
>         if all(c in string.hexdigits for c in seed):

Maybe you can use it to extend your extract-scripts with Electrum as well.
13  Bitcoin / Development & Technical Discussion / Re: [Bounty 50BTC] Looking for a GPU implementation of this algorithm on: July 02, 2014, 09:40:45 AM
I have made an interesting discovery: if you know the encoded seed of an Electrum wallet, then you can recover the unencrypted seed without the password stretching and fancy Elliptic Curve stuff. Simply try to decode the password, and if you get a valid hexadecimal number of 32 characters, then the password candidate is good, otherwise it is bad.

Sample Python code:


# -*- coding: utf-8 -*-

import aes
import hashlib
import base64

DecodeAES = lambda secret, e: aes.decryptData(secret, base64.b64decode(e))

def sha256(x):
    return hashlib.sha256(x).digest()

def Hash(x):
    if type(x) is unicode: x=x.encode('utf-8')
    return sha256(sha256(x))

def pw_decode(s, password):
    if password is not None:
        secret = Hash(password)
        try:
            d = DecodeAES(secret, s)
        except Exception, e:
            raise Exception('Invalid password')
        return d
    else:
        return s

def try_pw(encoded_seed, pw_cand):
  seed = ''
  try:
    seed = pw_decode(encoded_seed, pw_cand)
  except Exception:
    seed = ''
  finally:
    pass
  return seed

def chk_seed(seed):
  if len(seed) == 0:
    return False
  cnt=0;
  for c in seed:
    cnt+=1
    if cnt>32:
      return True
    i = ord(c)
    if i<48:
      return False
    if i>57:
      if i<97:
        return False
      if i>102:
        return False
  return True

def test():
  encoded_seed = 'Ww9jsiumblVPSM5owcLS6wODqxh0YDLIg/g+mNv+nuNP+f7yyhqOomTlK9tDv8xV0kYt/nUDeTZNtUOr3Zfp2w=='
  # pw_cand = 'test'
 
  cnt = 0
  cnt_good = 0
  for c1 in 't': #'abcdefghijklmnopqrstuvwxyz':
    for c2 in 'abcdefghijklmnopqrstuvwxyz':
      for c3 in 'abcdefghijklmnopqrstuvwxyz':
        for c4 in 'abcdefghijklmnopqrstuvwxyz':
          pw_cand1 = c1 + c2 + c3 + c4
          cnt += 1
          seed = try_pw(encoded_seed, pw_cand1)
          # print seed
          if chk_seed(seed):
            print 'pw is good: %s' % pw_cand1
            cnt_good +=1
  print 'cnt: %d' % cnt
  print 'cnt_good: %d' % cnt_good

test()


If you run it, it correctly finds the password:


$ python m2.py
pw is good: test
cnt: 676
cnt_good: 1


This "proof of a concept" code uses only  two SHA256 and one AES256 to try a password.
Its speed can be optimized to 10**7 (maybe 10**8 ) trials/sec/CPU_core.

So, with 128 cores, 10**15 (maybe 10**16) passwords can be checked in a day (at least in theory).

It is up to cedivad, what to do with that discovery...


14  Economy / Service Announcements / Re: [ANN] bitaddress.org Safe JavaScript Bitcoin address/private key on: March 07, 2014, 02:04:52 PM
Hi Pointbiz,

I made a Hungarian translation.
When will it be pulled to the program approximately?

Best regards,
   Wotan777
15  Bitcoin / Hardware / Re: [ANN] Technobit HEX8A1 - 6/8 chip Coincraft A1 board on: February 14, 2014, 08:40:19 AM
Marto please answer to my friend ^^

@Marto74

(1) I would like to ask for a refund for my order that is more than 2 months old now.
Order reference: UICAWGFJD

OR I would like to get a HEX8A1 card as a form of consolation Smiley

(2) Why don't you react to messages sent to technobit.eu?

Best regards,
  W

Marto, please answer.
Order ref is UICAWGFJD
16  Bitcoin / Hardware / Re: [ANN] Technobit HEX8A1 - 6/8 chip Coincraft A1 board on: February 07, 2014, 07:41:25 AM
@Marto74

(1) I would like to ask for a refund for my order that is more than 2 months old now.
Order reference: UICAWGFJD

OR I would like to get a HEX8A1 card as a form of consolation Smiley

(2) Why don't you react to messages sent to technobit.eu?

Best regards,
  W
17  Other / Beginners & Help / Re: Profile picture? on: June 06, 2013, 02:04:16 PM
Msg 4
18  Other / Beginners & Help / Re: Profile picture? on: June 06, 2013, 02:03:36 PM
Msg 3
19  Other / Beginners & Help / Re: Profile picture? on: June 06, 2013, 01:58:29 PM
Msg 2
20  Other / Beginners & Help / Re: Profile picture? on: June 06, 2013, 01:58:06 PM
Msg 1
Pages: [1] 2 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!