Giter VIP home page Giter VIP logo

username1565 / brainwallet.github.io Goto Github PK

View Code? Open in Web Editor NEW

This project forked from area/brainwallet.github.io

1.0 1.0 2.0 1.29 MB

https://username1565.github.io/brainwallet.github.io/

License: MIT License

CSS 0.27% HTML 2.61% JavaScript 97.12%
altcoins assymetric bitcoin blockchain brainwallet cryptographically-strength cryptography elliptic-curve paperwallet portableapps private-keys-encryption signature-verification trng

brainwallet.github.io's People

Contributors

anfedorov avatar benhc123 avatar brainwallet avatar bulldozer2003 avatar dasource avatar drizzt avatar duncannz avatar gamers-coin avatar gkucmierz avatar hujinpu avatar ianthius avatar jhoenicke avatar markpfennig avatar np avatar ssadler avatar tadasvaranavicius avatar thebutterzone avatar username1565 avatar whitj00 avatar

Stargazers

 avatar

Watchers

 avatar

brainwallet.github.io's Issues

Need to fix sign and verify messages for altcoins. I don't know how to do this.

I don't understand C++ syntax of the source code
in altcoins modules for signing and verify messages,
so I cann't fix this script to be compatible with altcoins wallets.

For example, we can using signing and verify the signed messages for altcoins:

  1. Go here: https://username1565.github.io/brainwallet.github.io/
  2. Select in the menu the Vertcoin (VTC) or another altcoin.
  3. Go to "sign" tab.
  4. As you can see, there is using private key and address for altcoins.
  5. Sign message:
    Private key: 'KwSrQfTpAq6zodDmBvk8RzgqL9D35EFcDPg4NEprfzv77VyMr6Kc'
    Address: 'VejdSd7zrm3XSok4CC8t94rTfZVuBwUStu'
    Message: 'This is an example of a signed message.'
    Signature type: 'Inputs.IO'
  6. Click "Sign Message" button.
  7. Result:
    '-----BEGIN BITCOIN SIGNED MESSAGE-----
    This is an example of a signed message.
    -----BEGIN SIGNATURE-----
    VejdSd7zrm3XSok4CC8t94rTfZVuBwUStu
    H4zF7QP0kQZ3WnMYRXZNGvJy7j9pWHYD4MR2GBYFgL47ei2CIngAlN2eJzO8bw+DGDkkhvhAxUwurjjkhALaKnY=
    -----END BITCOIN SIGNED MESSAGE-----'
  8. This result can be verified only by script, using permalink or copy and paste the signed message.
    Permalink:
    https://username1565.github.io/brainwallet.github.io/#verify?vrAddr=VejdSd7zrm3XSok4CC8t94rTfZVuBwUStu&vrMsg=This%20is%20an%20example%20of%20a%20signed%20message.&vrSig=H4zF7QP0kQZ3WnMYRXZNGvJy7j9pWHYD4MR2GBYFgL47ei2CIngAlN2eJzO8bw%2BDGDkkhvhAxUwurjjkhALaKnY%3D
    result: Message verified to be from VejdSd7zrm3XSok4CC8t94rTfZVuBwUStu (permalink)

But in vertcoin-qt wallet "Message verification failed".
Also, the message, which signed in vertcoin-qt wallet -
cann't be successfully verified using brainwallet "Verify" tab:
https://username1565.github.io/brainwallet.github.io/#verify

Here is the source code of module for signing and verify messages, in vertcoin-qt.exe:
https://github.com/vertcoin-project/vertcoin-core/blob/0.13.0/src/qt/signverifymessagedialog.cpp
But I don't understand anything there.

Can anyone fix this for all another altcoins?

Also, I see here https://github.com/username1565/brainwallet.github.io/blob/master/js/bitcoinsig.js
there is the prefix for message digest:

function msg_digest(message) {
    var b = msg_bytes("Bitcoin Signed Message:\n").concat(msg_bytes(message));
    return Crypto.SHA256(Crypto.SHA256(b, {asBytes:true}), {asBytes:true});
}

and here: https://github.com/vertcoin-project/vertcoin-core/blob/0.13.0/src/qt/signverifymessagedialog.cpp is using strMessageMagic
and this is defined here: https://github.com/vertcoin-project/vertcoin-core/blob/0.13.0/src/validation.cpp
as

const std::string strMessageMagic = "Vertcoin Signed Message:\n";

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.