# General Grant Proposal
* **Project:** PLUME on Ledger App
:::info
This is a copy of the [original grant proposal](https://hackmd.io/chhDfXwZSO2Fq3DCNOpAFw?both) with Milestones 1 and 3 modified to adjust with the deliverables:
:::
## Project Overview :page_facing_up:
### Overview
This project encompases work to be done to create an application (or plugin) that works on Ledger hardware wallet platforms ex. nano s,x etc. through the Ledger Secure SDK.
The overall goal is to be able to use the Ledger hardware to take in a message and create a PLUME nullifier using the private key stored in the Ledger; to be used in future Dapps.
To varrying degrees the plan is make use of the optimizations and APIs available in the Ledger SDK, BOLOS etal.
We will attempt to create as much soverginty and as optimized a solution as is reasonable and possible:
This means striving to do the maximum of PLUME directly on Ledger hardware, ex. hash2curve.
As well as using native hardware calls and coding techniques to improve performance and codesizes.
Furthermore, the project will keep in mind that the endgoal is for general users. And strive to create a usable user interface and experience as well as comply with the guidelines for a Ledger app as posted by the Ledger team and inferred through their development support Discord. We will take care to communicate with the approps Ledger team members where possible to develop something up to the standards of being listed as an official Ledger applications (available in Ledger Live App store). Due to the nature of Ledger organization, PLUME's goals and politics this it should be noted that this is not guaranteed to be accepted.
### Project Details
The Ledger PlUME application will take a zk "message input" and do the underlying curve math and procedures defined in the PLUME specification https://github.com/plume-sig/zk-nullifier-sig to create a zero knowledge nullifier output that can be used in Dapps.
Generally speaking, the idea is to use the STM32 MCU processor to do much of the novel PLUME algorithm work. This includes implementing the SSWU hash2curve algorithm as well as the formatting (xmd) etc on the "message input" to crate the most trusted possible experience.
We will also take care when accessing the secure element ST31 where it will be securely signed with the user's private key stored in the Ledger's secure enclave rendering a PLUME zk nullifier output for use in a ZK Dapp.
The PLUME Ledger application will also need to include some navigation menus, prompts and icons. Icons will and graphics will be provided externally (RE: Andy). We will take care to do at least some user testing of the novel ZK interface on the device as we design.
## Team :busts_in_silhouette:
### Team members
* Marcus H
* marcus@semaphore.network
* @Marcush25
### Team Website
### Team's experience
Previous EF grant to do smartphone hardwallet on secure elements. Lots of embedded work with telcos etc.
### Team Code Repos
* https://github.com/base0010/plume-ledger-app
## Development Roadmap :nut_and_bolt:
### Overview
* **Total Estimated Duration:** 4 Months FTE
* **Total Costs:** $42,000
### Milestone 1 PLUME Specific Algorithms Implemented In Ledger Application
* **Estimated Duration:** 7 weeks
* **FTE:** 1
* **Costs:** $14,700
* **Estimated delivery date**: June 30st 2023
| Number | Deliverable | Specification |
| ------------- | ------------- | ------------- |
| 1. | Implement PLUME "Signing" Step: | Use Seproxyhal API to access the ledger's private key and multiply with hash2curve using lx & cx_math BOLOS APIs |
**Deliverable Output**
At this point the ledger application should be able to produce a PLUME nullifier, given some test vector input message **either blind signing or signing outside the app**.
RISKS:
Hardware can not handle SSWU in a reasonable time
### Milestone 2 PLUME Ledger Application UI, Nominal User Flows.
* **Estimated Duration:** 3 weeks
* **FTE:** 1
* **Costs:** $7,875
* **Estimated delivery date**: July 20th 2023
| Number | Deliverable | Specification |
| ------------- | ------------- | ------------- |
| 1. | Ledger App Generic Flow, Menus etc. | A usable application "flow" with generic menu navigation|
| 2. | Ledger App Glyphs graphic assets etc | Implement glyphs and other graphical and UX components (sourced externally)|
| 3. | Integrate with a toy PLUME application | Use the previous steps and a simple toy webapp etc. to verify integration |
| 4. | User testing| Some potential users or testers have used the app and UX is reasonably changed to accomidate user input.
**Deliverable Output**
At this point the ledger application should have menus and flows that make sense for using the PLUME Ledger application with a simple Dapp. The application should work nominaly.
### Milestone 3 PLUME Ledger Application Testing, Docs, Audit support .
* **Estimated Duration:** 6 weeks
* **FTE:** 1
* **Costs:** $11,812.50
* **Estimated delivery date**: August 15th 2023
| Number | Deliverable | Specification |
| ------------- | ------------- | ------------- |
| 1. | Ledger App Test General Requriements | Fixing errors compiler warnings etc; passes Ledger automated test|
| 2. | Unit tests | Implement unit test for functionality, possible ui tests for the hardware|
| 3. | More testing and audit support | Any advanced testing, questions, code reformatting, slight refactoring for secuirty or requirements from Ledger team.
| 4. | Documention | Documentation on how to use the ledger applications basic functions
**Deliverable Output**
At this point the ledger application should have menus and flows that make sense, it should be usable and code should be reasonably clean consice.