# PLUME on HW
* **Project:** PLUME on Hardware
## Project Overview :page_facing_up:
### Overview
Breif description
## Project Overview :page_facing_up:
### Overview
Breif description
### Project Details
Project details:
* An overview of the technology stack to be used
* Documentation of core components, protocols, architecture etc. to be deployed
* PoC/MVP or other relevant prior work or research on the topic
## Team :busts_in_silhouette:
### Team members
* Names of team members
* Email
* Telegram handle
### Team Website
* https://<your_domain>
### Team's experience
Please describe the team's relevant experience. Some links would be useful.
### Team Code Repos
* https://github.com/<your_repo_1>
## Development Roadmap :nut_and_bolt:
This section should break out the development roadmap into a number of milestones. Since the milestones will appear in the grant contract, it helps to describe the functionality we should expect, plus how we can check that such functionality exists.
Below we provide an **example roadmap**. We recommend that the scope of the work can fit within a 3 month period and that teams structure their roadmap as 2 weeks = 1 milestone.
For each milestone:
* Please be sure to include a specification of the software. The level of detail must be enough so that we are able to verify that the software meets the specification.
* Please include total amount of funding requested per milestone.
* Please note that we require documentation (e.g. tutorials, API specifications, architecture details) in each milestone. This ensures that the code can be widely used by the community.
* Please provide a test suite, comprising unit and integration tests, along with a guide on how to run these.
* Please indicate the milestone duration, as well as number of Full-Time Employees working on each milestone, and include the number of days along with their cost per day.
### Overview
### Milestone 1 Example Application V1
| Number | Deliverable | Specification |
| ------------- | ------------- | ------------- |
| 0b. | Documentation | We will provide both inline documentation of the code and a basic tutorial that explains how a user can (for example) spin up the application. Application is up, it will be possible to send test transactions that will show how the new functionality works. |
| 0c. | Testing Guide | The code will have proper unit-test coverage (e.g. 90%) to ensure functionality and robustness. In the guide we will describe how to run these tests |
| 1. | Functionality: X | We will write a piece of code that will... (Please list the functionality that will be coded for the first milestone) |
| 2. | Functionality: Y | We will write a piece of code that will... (Please list the functionality that will be coded for the first milestone) |
| 3. | Functionality: Z | We will write a piece of code that will... (Please list the functionality that will be coded for the first milestone) |
| 4. | Application | Components X, Y & Z will interact in such a way... (Please describe the deliverable here as detailed as possible) |
### Milestone 2 Example Application V2
...
## Additional Information :heavy_plus_sign:
**Goal**
A demo like the one from this website but using a ledger instead https://ethbogota-2022.netlify.app/
**Approach**
Partial toy implemention that takes hash2Curve value externally and multiplies this with a secp256k1 private key for generic JavaCard SE platform [plume-embedded](https://github.com/base0010/plume-embedded)
1. implement the Simplified SWU algorithm
* Result: the wallet will be able to natively compute the Hash2Curve value.
* Questions/Implementation Details:
* If only targeting Ledger this is going to be C++, there is a BOLOS EC multiply function.
* Javacard implementation for "the rest"
2. implement the XMD expand message algorithm
* Result: Formatiing and serialization needed to properly transcribe the PLUME proofs
**Proposed Research before working on the above**
* Confirm if we can use the private key as expected (arbitrarily multiply sans "k" value) on Ledger hardware wallets
* Scanning through the BOLOS repo I don't see any way to do this. Only EC multiply without the private key
* Possible Hack on BOLOS: BIP standard derrivation should be multiplying a seed by arb. value.
**Meeting Notes**
- General Hardware Wallets: Pretty sure this will work on generic java cards. Keycard, gripplus, etc (aren't ledger but should work out of the box)
- Ledger: ledger app SDK <> requirements, need to clarify
- Need to ask plume devs: it seems you need to take a hash to curve digest, and then multiply by your private key. **Concern: Ledger doesn't let you do arbitrary operations on private key.** Although libraries support it, ledger does not.
- Maybe Ledger did it due to security considerations.
- Maybe go with pk+k random value * point
- Maybe a workaround, bitstandard, take a path from pk
- Not included in any HW wallet yet:
- PLUME: hash to curve thing. Doesn´t exist in any library yet, we´ll have to rewrite this from scratch.
- Right now, we might want to calculate it outside of the card as a workaround.
- If want to do it all inside the wallet, we´d need to simplify SSW hash to point algorithm and implement it.
- If we calculate it outside of the wallet, we´re putting a bit more of trust outside of the wallet. There´s ways to do this with BOLOS methods.
- Action Item ideas:
- Private Key - Point Multiplication
- Maybe could reach out to someone from Ledger team (https://developers.ledger.com/contact/)
- If they don´t support it, maybe we can find some other mathy people that could give us ideas to workaround.
- Scope and Path
- Confirm with Aayush this overall direction is sound
- Discuss the scope of in-wallet vs outside-wallet calculation of hash to curve.