Bitcoin Forum

Bitcoin => Armory => Topic started by: Coding Enthusiast on March 04, 2021, 06:47:47 AM



Title: Is there any Armory backup phrase test vectors?
Post by: Coding Enthusiast on March 04, 2021, 06:47:47 AM
I'm adding a new recovery option for Armory's paper backup to FinderOuter (https://github.com/Coding-Enthusiast/FinderOuter/commit/8d161006f2bf462730a890b9fe9a15657f4580e0) but I need some test vectors from the project itself which I couldn't find. It also doesn't help that the repository (https://github.com/goatpig/BitcoinArmory) is a fork and GitHub doesn't search within forks.

Could you help me find some, specially the process for deriving addresses from the "recovery phrase"?


Title: Re: Is there any Armory backup phrase test vectors?
Post by: HCP on March 04, 2021, 01:59:25 PM
Not sure about test vectors... but I know that the process has been implemented here: http://brainwalletx.github.io/#chains

The code for this is here: https://github.com/brainwalletX/brainwalletX.github.io/blob/master/js/armory.js but, again, it is a "fork"... so you can't search. There are some "command-line tests" at the bottom of that .js, where it appears to be doing something with Armory Root Keys... but there is no documentation to say what addresses should be generated from those root keys as far as I can see.

Still, at least it might give you some idea regarding the process.


Title: Re: Is there any Armory backup phrase test vectors?
Post by: Coding Enthusiast on March 04, 2021, 04:18:08 PM
Thanks, I have seen that tool and used it for some initial testing but I was hoping for the reference implementation for a more reliable source. Besides the brainwalletx code is very poorly written, it doesn't even validate checksums.


Title: Re: Is there any Armory backup phrase test vectors?
Post by: HCP on March 04, 2021, 09:03:13 PM
In that case, maybe send goatpig (https://bitcointalk.org/index.php?action=profile;u=7811) a PM and see if they can help out? ???


Title: Re: Is there any Armory backup phrase test vectors?
Post by: goatpig on March 07, 2021, 11:53:46 AM
https://github.com/goatpig/BitcoinArmory/tree/master/pytest

These are etotheipi's old python test vectors. Honeslty I'm not familiar with them and they seem to only remotely cover regular backups. There is an explicit test suite for fragmented backups however.

I've recently reimplemented the Armory backup format in C++, this test suite covers that: https://github.com/goatpig/BitcoinArmory/blob/dev/cppForSwig/gtest/WalletTests.cpp

More specifically, you can find the dedicated backup tests here: https://github.com/goatpig/BitcoinArmory/blob/dev/cppForSwig/gtest/WalletTests.cpp#L6775

Beware that I've added some meta data to the backup format. The changes are backwards compatible however. There is no fragmented backups support/tests either. The current python code is etotheipi's own implementation. I'm looking to use a constant time lib for SSS instead, which will probably break compatibility, so I'd have to reimplement his stuff in C++ first, hence I've put that on the side for now.