Bitcoin Forum
May 06, 2024, 06:36:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: base64 encoded signature?  (Read 2420 times)
ipc (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
March 30, 2013, 08:11:08 PM
 #1


does anyone have a good way of converting Armory's hex-encoded signature to the equivalent base64-encoded representation?

-ipc
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715020581
Hero Member
*
Offline Offline

Posts: 1715020581

View Profile Personal Message (Offline)

Ignore
1715020581
Reply with quote  #2

1715020581
Report to moderator
1715020581
Hero Member
*
Offline Offline

Posts: 1715020581

View Profile Personal Message (Offline)

Ignore
1715020581
Reply with quote  #2

1715020581
Report to moderator
ipc (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
April 02, 2013, 02:17:26 AM
 #2


after digging around a bit more I believe the problem is more than simply encoding.  The consumer of my signature (bitcoin-otc's verifier) is expecting the signature output from Bitcoin-Qt which is base64-encoded.  I thought that the Armory signature was equivalent but I now think there's a missing byte.  Bitcoin-Qt's signature is 65 bytes while Armory signatures are 64 bytes.  It looks like Bitcoin-Qt includes a header byte that Armory does not. 

Can you make Armory's signatures compatible with Bitcoin-Qt?

key.cpp:

// create a compact signature (65 bytes), which allows reconstructing the used public key
// The format is one header byte, followed by two times 32 bytes for the serialized r and s values.
// The header byte: 0x1B = first key with even y, 0x1C = first key with odd y,
//                  0x1D = second key with even y, 0x1E = second key with odd y
bool CKey::SignCompact(uint256 hash, std::vector<unsigned char>& vchSig)
etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
April 02, 2013, 02:34:10 AM
 #3


after digging around a bit more I believe the problem is more than simply encoding.  The consumer of my signature (bitcoin-otc's verifier) is expecting the signature output from Bitcoin-Qt which is base64-encoded.  I thought that the Armory signature was equivalent but I now think there's a missing byte.  Bitcoin-Qt's signature is 65 bytes while Armory signatures are 64 bytes.  It looks like Bitcoin-Qt includes a header byte that Armory does not. 

Can you make Armory's signatures compatible with Bitcoin-Qt?

key.cpp:

// create a compact signature (65 bytes), which allows reconstructing the used public key
// The format is one header byte, followed by two times 32 bytes for the serialized r and s values.
// The header byte: 0x1B = first key with even y, 0x1C = first key with odd y,
//                  0x1D = second key with even y, 0x1E = second key with odd y
bool CKey::SignCompact(uint256 hash, std::vector<unsigned char>& vchSig)


Oh, that's some special format that allows them to do key reconstruction from the signature.  Except, I don't even know how to do it, so I couldn't implement it if I wanted.  At the moment, it's not even used for anything (that I'm aware of).  The core devs gave me some documents about it, but I never grokked them.

Armory signs the data the same way as the rest of the network does, or else it wouldn't get accepted into the blockchain.  The signature scheme you're looking at there is special.  Perhaps there's a different code interface that you can access that takes the default, DER-encoded signatures that go into the actual transaction serialization. 

Or you could implement the key reconstruction for me Smiley

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!