Successful Factom Identity on Ledger Nano S Grant Updates (Grant Round 2, 2018)

Was Factom Identity on Ledger Nano S - Grant Round 2, 2018 Successful?

  • 0

    Votes: 0 0.0%
  • 1

    Votes: 0 0.0%
  • 2

    Votes: 0 0.0%
  • 3

    Votes: 0 0.0%
  • 4

    Votes: 0 0.0%
  • 5

    Votes: 0 0.0%
  • 6

    Votes: 0 0.0%
  • 10

    Votes: 0 0.0%

Have not voted

Guides Brian Deery Nic R Niels Klomp

Authority Nodes BI Foundation BI Foundation Consensus Networks Consensus Networks DBGrow DBGrow Factable Solutions Factable Solutions Factom Inc. Factom Inc. Federate This Federate This HashQuark Kompendium Kompendium Multicoin Capital Multicoin Capital The Factoid Authority The Factoid Authority

  • Total voters
    20
  • Poll closed .
Secured
#1
Grant Thread: https://factomize.com/forums/thread...entity-amended-to-fit-inside-grant-pool.1143/

Organizations Involved: The Factoid Authority, Bedrock Solutions

Sponsor: David Chapman

Total FCT Received: 4,490

Date Received: December 5th, 2018

Start Date: December 7th, 2018

Background

The Ledger Nano S has been identified as a secure, efficient means of signing identities for the Factom protocol. This means your private keys can be stored securely on the Ledger and used to prove your identity in a number of applications. The Factoid Authority will be developing the firmware and javascript upgrades led by Dennis Bunfield. Bedrock Solutions will handle the integration with MyFactomWallet led by David Kuiper.

We held a kickoff meeting on Friday, December 7th, 2018 and are using that as our start date.

Goals and Objectives

The objective for this project will be to bring identity signing onto the Ledger Nano S Factom app. In addition to the firmware upgrade, the client also must be updated to be able to interact with the ledger’s factom JavaScript drivers. The following features will be included in the ledger app upgrade:

● Ability to query your Factom Identity Public Key

● Sign a message using your identity

● Enable batch mode to enable signing multiple messages using the ledger that won’t require more than one user confirmation

● Allow identity signing using your Nano Ledger S from the MFW voting tool

Milestones

The following are the defined milestones:



Milestone 1 and 2 call for “Firmware Upgraded with ID support” and “ledger-factomjs updated”. The firmware is the code that runs on the actual Ledger hardware wallet and the ledger-factomjs is the software that will enable the Ledger to interact with the Factom Protocol. Dennis Bunfield will be developing these solutions concurrently.

Expected Delivery: January 11th, 2019. [COMPLETE - Delivered on schedule]

Milestone 3 calls for “Integration w/ MFW released to testnet”. In other words, at week eight, there will be a functional product ready for testing on MyFactomWallet with testnet.

Expected Delivery: January 25th, 2019.

Milestone 4 calls for “Release update to ledger for review”. At this point, a tested and refined (if necessary) product will be sent to Ledger to review the code.

Expected Delivery: February 1st, 2019.

Milestone 5 calls for "Integration w/ MFW released to mainnet”. This is when a working product is released and MyFactomWallet will be usable on mainnet.

Expected Delivery: February 22nd, 2019

Note that Ledger’s release schedule of for updates is on the 6th of every month. As such, March 6th is the date that is being targeted as the initial “go live” where anyone can utilize the new functionality.

In addition to the defined objectives in the grant, due to the recent price rise of FCT, the developers have decided to also add FCT and EC signing.

Biggest Unknown

The proposed development is reasonably straight forward. The biggest unknown is Ledger and their schedule. They are thorough in their code reviews and can be busy at times which may lead to delays beyond the control of the developers.

Sponsor Role

First and foremost, I am loyal to the Factom Protocol community, not the organizations involved in the development of this project. As sponsor I will:

A. Outline the milestones for the community is an easily digestible manner.
B. Follow the development progress and ask pertinent questions.
C. Report to the community on the progress at each milestone.
D. Sign off on the completed project
E. If they fail to complete the project, find a bus with a rusty undercarriage, throw the developers under it, and drive it back and forth.

Both Dennis and David are highly capable developers and I look forward to seeing this project come to fruition.

We welcome questions within this thread.
 
Last edited:
Secured
#3
Hi Guys,

Instead of annoying privately Dennis I post my questions here. :)

1/ How will the choice of the Public Key to be used for signing with your identity be realised : on the ledger app directly or on MFW?
2/ I understand we will be able to sign any message (lower than 854 bits if I am remember well due to Ledger limitations... French have always been playing small arms...). The output will be a signed message with your Secret Key corresponding to your chosen PK. Could the destination of this signed message be chosen by the signee? i.e. Could we choose the Factom chains where to record this signature?
3/ I understand it will interact with MFW but guess it could interect with any web interface or application able to communicate with Ledger.

Thanks for your answers and really happy to support this grant!
 
Secured
#4
1) The key selection will take place on the client side (i.e. MFW). Part of the input for the requested key via the API is the HD derivation path which follows the bip44 spec. For example m/44'/143165576'/0'/0/0 for the base address, m/44'/143165576'/0'/0/1 for the second address, etc.

2) The payload (i.e. message) of what needs to be signed is determined by the user. The data that is returned from the ledger is the signature against that payload. You can publish that signature with the payload anywhere or any way you wish, including within Factom chains.

3) Yes that is the case if the client communicates via the same U2F protocol version Nano S uses (e.g. the Chrome browser). The MFW integration is simply one way to use it and you are free to look at the code as a reference on how to integrate it into a web page. Currently the ledger only works in the Chrome browser. The U2F is implemented in Edge and Firefox browsers, however, the API is currently incompatible with the Ledger. There are also some established tools to use the ledger on the command line via python or nodejs. As part of this effort we will be putting together developer documentation so that others can implement their own clients to interact with the ledger. MFW is just one example of how to interact with the ledger.
 
Last edited:
Secured
#5
A quick update:

Milestone 1 and 2 are currently on schedule. I'm pleased to share that a majority of the main tasks for the firmware upgrade are complete. These features include:
  1. Identity address generation
  2. Identity key signing of raw data
  3. Automatic hashing of streamed data to the device for sha256 or sha512 (user specified) with signing of the hash against the identity key.
The message hash signing feature supports signing against the EC and FCT addresses. Dennis Bunfield decided to not support EC and FCT signing of a raw message since it could open an attack vector for signing real FCT and EC commit and entry transactions.

To Do:

Dennis still needs to work on some javascript code and the usual general cleanup and should have those completed by this weekend. He will then push his npm package and make an updated docker sideloader for the firmware.

All in all, I am very pleased with the progress but have located a bus just in case.
 
Last edited:
Secured
#6
Milestone 1 and 2 are Complete

I am pleased to announce the successful delivery of milestone 1 and milestone 2. They were delivered on time. To rehash what the milestones called for:
Milestone 1 and 2 call for “Firmware Upgraded with ID support” and “ledger-factomjs updated”. The firmware is the code that runs on the actual Ledger hardware wallet and the ledger-factomjs is the software that will enable the Ledger to interact with the Factom Protocol. Dennis Bunfield will be developing these solutions concurrently.
Dennis Bunfield has released the first release candidate for the identity firmware. If you want to test it, it can be side-loaded on your ledger by executing:
Code:
sudo docker pull bunfield/factomize-ledger
Code:
sudo docker run --rm -it --privileged -v /dev/bus/usb:/dev/bus/usb bunfield/factomize-ledger
The new firmware supports hash and raw message signing with identity keys. FCT and EC hash message signing is available as well. For security reasons, please note that FCT and EC message signing prepends the typical signing magic "FCT Signed Message:" or "EC Signed Message:" similar to other coin ledger apps such as the BTC and ETH apps. This signing magic is to prevent man-in-the-middle attacks for any tokens derived that directly use FCT addresses.

Dennis tells me that support for Factom Asset Tokens will be added in a future Ledger app release that does proper transaction parsing for hash signing. Also note, Signing against the identity keys does not add any signing magic. Ledger is preparing for the release of firmware version 1.5.x. Dennis and David have been coordinating with Ledger to prepare the Factom app for this new firmware upgrade.

They will be testing the updated Factom App with the identity signing. The javascript code has been updated to version 0.4.7. The package is @factoid.org/hw-app-fct and is available at https://www.npmjs.com/package/@factoid.org/hw-app-fct. Finally, batch singing mode for the identity key signing has been added. There is a new menu option in the ledger app to enable the batch mode. If you wish to use this option, it will need to be manually enabled every time you start the Ledger Factom app. It will only work with the identity keys.

I'm very pleased with the progress of the team. The next milestone is milestone 3:
Milestone 3 calls for “Integration w/ MFW released to testnet”. In other words, at week eight, there will be a functional product ready for testing on MyFactomWallet with testnet.

Expected Delivery: January 25th, 2019.
 
Last edited:
Secured
#8
Milestone 3 calls for “Integration w/ MFW released to testnet”. In other words, at week eight, there will be a functional product ready for testing on MyFactomWallet with testnet.

Expected Delivery: January 25th, 2019.
Milestone 3 has been delayed until 02-01-2019 as the team is investigating increasing the scope of work to include some identity management UI tools in MFW. It is not expected that this will affect Milestone 4 but if it does, it is unlikely to affect Milestone 5 as there is some padding there.
 
Last edited:
Secured
#12
I'm pleased to announce that milestone 3 which was pushed back to today is now complete.
Milestone 3 calls for “Integration w/ MFW released to testnet”. In other words, at week eight, there will be a functional product ready for testing on MyFactomWallet with testnet.
Milestone 3 has been deployed to https://enducker.github.io/MyFactomWallet/#/vote. For this milestone, the developers have enabled support for identity signing using a Ledger device in MyFactomWallet. This can be done in the voting app when creating a poll and when casting a vote. There is no easy way to register an identity to the Ledger device and the Factom blockchain, so the developers have decided to proceed with adding a UI in MFW as a part of this grant. They are aiming to release this to testnet within the next 2 weeks.

Milestone 4:
Milestone 4 calls for “Release update to ledger for review”. At this point, a tested and refined (if necessary) product will be sent to Ledger to review the code.
Has been pushed back to February 6th as they need to perform some additional testing and get the documentation together. This should not affect Milestone 5 as there was some padding there.
 
Secured
#13
Other than a little documentation that needs to be completed, I'm pleased to announce that Milestone 4 has been met.
Milestone 4 calls for “Release update to ledger for review”. At this point, a tested and refined (if necessary) product will be sent to Ledger to review the code.
Dennis Bunfield will be making a pull request this evening to get the code in Ledger's queue for review.

The next Milestone is Milestone 5:
Milestone 5 calls for "Integration w/ MFW released to mainnet”. This is when a working product is released and MyFactomWallet will be usable on mainnet.

Expected Delivery: February 22nd, 2019
So far so good. To set expectations, we're now at the mercy of Ledger and how busy they are.
 
Secured
#15
I'm pleased to announce that the Factom Identity Signing on the Ledger Nano S has passed code review and testing. The new firmware has been released! To obtain the updated version, it requires a Ledger firmware upgrade to version 1.5.5. Then update the Factom app to version 1.2.

A formal announcement will be made when the MFW voting system finishes acceptance testing.

In the mean time enjoy...
 
Last edited:
Secured
#20
To update on Milestone 5
Milestone 5 calls for "Integration w/ MFW released to mainnet”. This is when a working product is released and MyFactomWallet will be usable on mainnet.
The work is done but the official release is going to happen at the same time as the on-chain voting grant testing since the ledger identity integration is with the voting app. There isn't a firm date there but I'll keep everyone updated.
 
Secured
#21
Testing of the Ledger Identity creation tool is finished and has been deployed to myfactomwallet.com. This marks the end of the Ledger Identity Grant.

I will be posting a summary as a Sponsor in a few days in accordance with Doc 106 - Grant Success Determination and open a poll for final determination. I invite anyone else to provide a summary in the meantime.
 
Secured
#24
Per Document 106 - Grant Success Determination Process, as sponsor, I will summarize and score this grant then create a poll where success or failure can be determined.

Original Grant Proposal

Grant Summary

The Ledger Nano S was identified as a secure, efficient means of signing identities for the Factom protocol. This means your private keys can be stored securely on the Ledger and used to prove your identity in a number of applications. The Factoid Authority developed the firmware and javascript upgrades led by Dennis Bunfield. Bedrock Solutions handled the integration with MyFactomWallet led by David Kuiper. I acted as sponsor.

The total FCT awarded was 4,490.

Performance

1. All goals were met.

2. There were a couple delays but nothing that should cause the grant to not be successful.

3. The developers ADDED FCT and EC signing which were not part of the original grant.

4. The developers ADDED the ability to store the identity chain ID on-device as well as create the on-chain identity registration for the identity keys on-device. This was not part of the original grant.

Scoring

The following scoring rubrik will be used for this grant per Doc 106:

Exceptional (9.0 - 10.0) - Successful
Overachieved (7.0 - 8.9) - Successful
Achieved (5.0 - 6.9) - Successful
Underachieved (2.0 - 4.9) - Failure
Total Failure (0.0 - 1.9) - Failure
My Score

I believe this grant was successful and argue it Overachieved due to 3 and 4 above. The delays may cause some to score in the Achieved section of the rubrik.

Factomize will be scoring this grant 6 or more likely 7 which will fall between the Achieved and Overachieved portion of the rubrik.

The poll is live and will be open for 5 days.
 
Last edited:
Secured
#25
I find it personally quite hard to rate as of now and I think it is a bit too early. Pretty much all I have at my disposal is text here saying that "all goals were met". How do I assess that by myself? How do I get a feeling of the quality of what was produced? For the video grant for instance I had videos to watch. Here I am not sure, I don't feel I can grade that grant yet, I need something more substantial, e.g.: list of all source code repository, instructions to test and assess each component developed, a demo of the tool...
 
Secured
#26
I am impressed with the rigour applied in progressing this and keeping the community updated in a disciplined way.
Although, as Paul Bernier has indicated, I cannot test the results. I will therefore rely on the declared progress and sponsor's assessment to make my determination.
 
Secured
#27
@Paul Bernier @Mike Buckingham

Thank you for your comments. It's helpful to know where we can improve as grantees.

In this post I'll give instructions on how to use the Ledger Identity Creation tool, available here: https://myfactomwallet.com/#/ledgerId.

This tool makes it easy to create a digital Factom Identity secured with your Ledger Nano S. You can try out the tool in a few minutes if you have a Ledger and some Test/Entry Credits. The Factom Digital Identity specification is helpful to understand what you are creating.

screenshot2.png

You can select up to the first 10 Ledger keys to use as your initial identity key set. Submit the form and you will receive a Factom Identity Chain ID #, and a link to the entry in the Factom blockchain.

1555534254337.png

The second tab supports storing an Identity Chain ID # to the Ledger for easy lookup by client applications. This is separate from creating the identity because although the Ledger can be used to create multiple identities, it can only store a single Identity Chain ID # at this time.

1555538437645.png

Once these two steps are complete, your Ledger Identity will be setup to securely participate in MyFactomWallet on-chain voting.

We decided to create this tool midway through the grant as an improvement over the CLI scripts we had been using. I have many more features in mind, especially a "replace key" function, but I don't think it's a priority right now as there are other identity management solutions being built (FAT, DID) and we are still determining how to build Factom governance.

The absolute coolest part of this grant is the work Dennis did on the Ledger app to add identity support and ID/FCT/EC message signing. This enables any web application to use the Ledger as an secure key signing mechanism for a wide array of use cases. More information on those functions is on the way.

Let me know if you have any questions

Thanks!
David
 
Secured
#28
To review the firmware modified in support of this effort, please reference https://github.com/MyFactomWallet/ledger-app-factom/blob/master/src/main.c

Here is some additional information regarding the javascript source code I wrote that is used to drive the ledger as well as instructions to run the command line tests.

The javascript driver code is located at https://github.com/MyFactomWallet/ledger-factomjs/blob/master/packages/hw-app-fct/src/Fct.js

To run the ledger command line tests you can perform the following.
git pull git@github.com:MyFactomWallet/ledger-factomjs.git

cd ledger-factomjs

yarn install

yarn run build
There are several modes for testing different features. The default test to test the query address, fct signing, and EC chain and entry commit signing.

yarn run test-node
There is also a way to have up to 10 outputs on the ledger. Note: MFW only currently supports 1 FCT transaction output, but the ledger supports up to 10 tx outputs. The test added for that is

yarn run test-tx-mult
To test the identity query and signing of both the sha256, sha512, and raw signing test

yarn run test-id