Git Product home page Git Product logo

cryptowallet's People

Contributors

rfjakob avatar xaionaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cryptowallet's Issues

Trezor T

Hello,

I see you started to implement Trezor T in this project

I will look tomorrow how are you integrating it and how can I help :)

(I am writing trezord-go now)

Build fails due to tesoro changes

$ git rev-parse HEAD
9da553bf44de131987eb89084b14d5c232423056

$ go build
# github.com/xaionaro-go/cryptoWallet/internal/wallets/satoshilabs/trezor
internal/wallets/satoshilabs/trezor/trezor.go:28:13: cannot use device (type "github.com/zserge/hid".Device) as type "github.com/conejoninja/tesoro/vendor/github.com/zserge/hid".Device in argument to t.SetDevice:
	"github.com/zserge/hid".Device does not implement "github.com/conejoninja/tesoro/vendor/github.com/zserge/hid".Device (wrong type for Info method)
		have Info() "github.com/zserge/hid".Info
		want Info() "github.com/conejoninja/tesoro/vendor/github.com/zserge/hid".Info

EncryptKey/DecryptKey return whole PB message, not just value

EncryptKey/DecryptKey return whole PB message, not just value

This code just returns bytes from the PB message

func (trezor *TrezorBase) CipherKeyValue(path string, isToEncrypt bool, keyName string, data, iv []byte, askOnEncode, askOnDecode bool) ([]byte, messages.MessageType) {
result, msgType := trezor.call(trezor.Client.CipherKeyValue(isToEncrypt, keyName, data, tesoro.StringToBIP32Path(path), iv, askOnEncode, askOnDecode))
return []byte(result), messages.MessageType(msgType)
}

and that's used directly as a key here

decryptedKey, msgType := trezor.CipherKeyValue(path, false, trezorKeyname, []byte(encryptedKeyhexValue), nonce, false, true)
switch msgType {
case messages.MessageType_MessageType_Success, messages.MessageType_MessageType_CipheredKeyValue:
case messages.MessageType_MessageType_Failure:
return nil, fmt.Errorf(`Got an error from a trezor device: %v (the trezor device is busy?)`, string(decryptedKey)) // if an error occurs then the error description is returned into "decryptedKey" as a string
default:
return nil, fmt.Errorf("Got an unexpected behaviour from a trezor device: %v: %v", msgType, string(encryptedKey))
}
return decryptedKey, nil

but it's never de-marshaled from protobuf.

https://github.com/trezor/trezor-common/blob/04bac52951764d5516206f5359cfc5f5c24eb38f/protob/messages-crypto.proto#L28-L30

`dep ensure` fails

Looks like github.com/trezor/usbhid has been deleted. The Travis job for gocryptfs runs dep ensure, which fails now: https://travis-ci.org/rfjakob/gocryptfs/jobs/401311246#L591

Running locally with verbose mode:

~/go/src/github.com/rfjakob/gocryptfs$ dep ensure -v
Root project is "github.com/rfjakob/gocryptfs"
 32 transitively valid internal packages
 13 external packages imported from 8 projects
(0)   ✓ select (root)
(1)	? attempt github.com/hanwen/go-fuse with 3 pkgs; at least 1 versions to try
(1)	    try github.com/hanwen/go-fuse@master
(1)	✓ select github.com/hanwen/go-fuse@master w/5 pkgs
(2)	? attempt github.com/jacobsa/crypto with 1 pkgs; at least 1 versions to try
(2)	    try github.com/jacobsa/crypto@master
(2)	✓ select github.com/jacobsa/crypto@master w/3 pkgs
(3)	? attempt github.com/pkg/xattr with 1 pkgs; at least 1 versions to try
(3)	    try github.com/pkg/[email protected]
(3)	✓ select github.com/pkg/[email protected] w/1 pkgs
(4)	? attempt github.com/rfjakob/eme with 1 pkgs; at least 1 versions to try
(4)	    try github.com/rfjakob/eme@master
(4)	✓ select github.com/rfjakob/eme@master w/1 pkgs
(5)	? attempt github.com/xaionaro-go/cryptoWallet with 2 pkgs; 1 versions to try
(5)	    try github.com/xaionaro-go/cryptoWallet@master
(5)	✓ select github.com/xaionaro-go/cryptoWallet@master w/9 pkgs
(6)	? attempt golang.org/x/crypto with 3 pkgs; at least 1 versions to try
(6)	    try golang.org/x/crypto@master
(6)	✓ select golang.org/x/crypto@master w/4 pkgs
(7)	? attempt golang.org/x/sync with 1 pkgs; at least 1 versions to try
(7)	    try golang.org/x/sync@master
(7)	✓ select golang.org/x/sync@master w/1 pkgs
(8)	? attempt golang.org/x/sys with 1 pkgs; at least 1 versions to try
(8)	    try golang.org/x/sys@master
(8)	✓ select golang.org/x/sys@master w/1 pkgs
(9)	? attempt github.com/conejoninja/tesoro with 3 pkgs; 6 versions to try
(9)	    try github.com/conejoninja/tesoro@master
(9)	✓ select github.com/conejoninja/tesoro@master w/5 pkgs
(10)  ? attempt github.com/zserge/hid with 1 pkgs; 1 versions to try
(10)      try github.com/zserge/hid@master
(10)  ✓ select github.com/zserge/hid@master w/1 pkgs
(11)  ? revisit golang.org/x/sys to add 1 pkgs
(11)    ✓ include 1 more pkgs from golang.org/x/sys@master
(11)  ? attempt github.com/conejoninja/hid with 1 pkgs; 2 versions to try
(12)      try github.com/conejoninja/hid@master
(12)  ✓ select github.com/conejoninja/hid@master w/1 pkgs
(13)    ← no more versions of github.com/trezor/usbhid to try; begin backtrack
(12)  ← backtrack: no more versions of github.com/conejoninja/hid to try
(11)  ← backtrack: popped 1 pkgs from golang.org/x/sys
(10)  ← backtrack: no more versions of github.com/zserge/hid to try
(9)	← backtrack: no more versions of github.com/conejoninja/tesoro to try
(8)	← backtrack: no more versions of golang.org/x/sys to try
(7)	← backtrack: no more versions of golang.org/x/sync to try
(6)	← backtrack: no more versions of golang.org/x/crypto to try
(5)	← backtrack: no more versions of github.com/xaionaro-go/cryptoWallet to try
(4)	← backtrack: no more versions of github.com/rfjakob/eme to try
(3)	← backtrack: no more versions of github.com/pkg/xattr to try
(2)	← backtrack: no more versions of github.com/jacobsa/crypto to try
(1)	← backtrack: no more versions of github.com/hanwen/go-fuse to try
  ✗ solving failed

Solver wall times by segment:
     b-list-versions: 6.625424118s
     b-source-exists: 6.566984045s
              b-gmal: 1.201033732s
         b-list-pkgs: 700.927541ms
         select-root:   3.922211ms
         select-atom:   3.062032ms
             satisfy:   2.713405ms
            unselect:   1.990376ms
            new-atom:   1.078504ms
  b-deduce-proj-root:    145.942µs
           backtrack:    138.884µs
               other:     76.081µs
           b-matches:     31.222µs
            add-atom:     10.963µs
          b-pair-rev:      3.975µs
      b-pair-version:      1.897µs

  TOTAL: 15.107544928s

Solving failure: no valid source could be created: 
	failed to set up sources from the following URLs:
https://github.com/trezor/usbhid
: remote repository at https://github.com/trezor/usbhid does not exist, or is inaccessible: fatal: could not read Username for 'https://github.com': terminal prompts disabled
: exit status 128
	failed to set up sources from the following URLs:
ssh://[email protected]/trezor/usbhid
: remote repository at ssh://[email protected]/trezor/usbhid does not exist, or is inaccessible: ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: exit status 128
	failed to set up sources from the following URLs:
git://github.com/trezor/usbhid
: remote repository at git://github.com/trezor/usbhid does not exist, or is inaccessible: fatal: remote error: 
  Repository not found.
: exit status 128
	failed to set up sources from the following URLs:
http://github.com/trezor/usbhid
: remote repository at http://github.com/trezor/usbhid does not exist, or is inaccessible: fatal: could not read Username for 'https://github.com': terminal prompts disabled
: exit status 128

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.