Skip to content

Commit

Permalink
Merge branch 'w3f:master' into rv_kmir-milestone_4
Browse files Browse the repository at this point in the history
  • Loading branch information
dkcumming authored Nov 1, 2023
2 parents fc3cb96 + f1a687e commit 14da5ea
Show file tree
Hide file tree
Showing 51 changed files with 9,769 additions and 21 deletions.
34 changes: 34 additions & 0 deletions deliveries/Aisland-DocSig_Milestone2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Milestone Delivery :mailbox:

**The [invoice form :pencil:](https://docs.google.com/forms/d/e/1FAIpQLSfmNYaoCgrxyhzgoKQ0ynQvnNRoTmgApz9NrMp-hd8mhIiO0A/viewform) has been filled out correctly for this milestone and the delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/milestone-deliverables-guidelines.md).**

* **Application Document:** [Aisland-Docsig](https://github.com/w3f/Grants-Program/blob/master/applications/Aisland-DocSig.md)

* **Milestone Number:** 2

**Context** (optional)
Aisland docsig is a platform to exchange signed documents throught the blockchain.
In the second milestone we added some features to Docsig:
1. Pdf Output - The dapp is able to generate a contract with the visual signatures and a QR code to verify on chain the validity of the contract.
2. Link Sharing - The dapp allows the sharing of the signing link by: email, Matrix, Whatsapp, and Telegram.
3. Multiple Counter Parties - The document can be signed from multiple parties (more than 2).
4. Enhanced Templates - You can reuse your private template and use whenever necessary.

**Deliverables**
> Please provide a list of all deliverables of the milestone extracted from the initial application and a link to the deliverable itself. Ideally all links inside the below table should include a commit hash, which will be used for testing. If you don't provide a commit hash, we will work off the default branch of your repository. Thus, if you plan on continuing work after delivery, we suggest you create a separate branch for either the delivery or your continuing work.
>
> If there is anything particular about any of the deliverables we or a future reader should know, use the respective `Notes` column.
| Number | Deliverable | Link | Notes |
| ------------- | ------------- | ------------- |------------- |
| 0a. | License |[https://github.com/aisland-dao/docsig/blob/main/LICENSE](https://github.com/aisland-dao/docsig/blob/main/LICENSE)| Apache 2.0|
| 0b.| Documentation |[Dapp Documentation](https://github.com/aisland-dao/docsig/blob/main/README.md),[Dapp Repository](https://github.com/aisland-dao/docsig) | in-line documentation is present in every source code file|
| 0c. |Testing and Testing Guide|[Dapp unit tests](https://github.com/aisland-dao/docsig/blob/main/README.md#unit-tests)| |
| 0d. | Docker |[Docker Documentation](https://github.com/aisland-dao/docsig/blob/main/README.md#docker), [Docker file](https://github.com/aisland-dao/docsig/blob/main/docker-compose.yml)| |
| 0e. | Article | [Article for Update](https://news.aisland.io/aisland-docsig-new-features/), [Workshop Video](https://dropbox.aisland.io/index.php/s/3xCUS0r5dNNe4Np)||
| 1. | Dapp Feature: Pdf Export |The main change is in the [View Function](https://github.com/aisland-dao/docsig/blob/b23cc85356d16baa35b06734492b261a45d15880/docsig-server.js#L515) |
| 2. | Dapp Feature: Signing Link Sharing by multiple channels |The main point is this [function](https://github.com/aisland-dao/docsig/blob/b23cc85356d16baa35b06734492b261a45d15880/client-src/index.js#L413)|From the dapp, 'document actions" click on the "Link" icon|
| 3. | Dapp Feature: Multiple Counterparties |Many changes have been done to manage multiple counter parties, the main entry port for the UI, is in this [function](https://github.com/aisland-dao/docsig/blob/b23cc85356d16baa35b06734492b261a45d15880/client-src/index.js#L343C3-L343C3)||
| 4. | Dapp Feature: Enhanced Templates |The entry point is this [function](https://github.com/aisland-dao/docsig/blob/b23cc85356d16baa35b06734492b261a45d15880/client-src/index.js#L1665)| |

**Additional Information**
30 changes: 30 additions & 0 deletions deliveries/ISO20022-milestone1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Milestone Delivery :mailbox:

**The delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/milestone-deliverables-guidelines.md).**

* **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/ISO20022.md
* **Milestone Number:** 1

**Context** (optional)
The project is an [ISO20022](https://www.iso20022.org/) based cross-border payment proof of concepts in respond to [RFP 20022](https://github.com/w3f/Grants-Program/blob/master/docs/RFPs/Open/ISO_20022.md)

**Deliverables**

| Number | Deliverable | Original Notes | Links |
| ------------- | ------------- | ------------- |------------- |
| **0a.** | License | Apache 2.0 | |
| **0b.** | Documentation | Design documents with details on what it takes for Polkadot/Substrate to support ISO20022 messages, gaps and solution recommendations | [Document](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit?usp=sharing) |
| 1. | Design the use case | Design an ISO20022 cross border payment use case with persona, end-to-end flow | [Use case](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.jbusns55fqv8) |
| 2. | Identify ISO20022 message types and examples for X-border payment | Specify all ISO20022 message types with examples for cross border payment, including reference data fields | [Messages](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.3bizhqqfqokf) |
| 3. | Map ISO20022 <> XCM messages | Map ISO20022 cross-border payment message types to a set of XCM messages with processing logic, including identifying data type incompatibilities between IS20022 and XCM, replacement data types and necessary XML transformations | [XCM](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.edn1td52fpla) [Mappings](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.vcikuv2j31oe) |
| 4. | Map ISO20022 <> XCMP | Map ISO20022 cross-border payment messageing to XCMP for cross parachains transport| [Asset Transfer XCMs](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.y5pbl1ktt009) |
| 5. | Specify off chain data storage | Specify off chain data structure, storage and indexes for ISO20022 messages, payments, events, stats| [Storage](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.61lo4pidrxdc) |
| 6. | Specify off chain worker logic | Specify OCW logic for ISO20022 message processing, payment flow, error handling| [OCW](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.ju6ykbwdfekp) |
| 7. | Specify Substrate pallets | Specify custom pallet(s) to implement X-border payments and OCW integrations| [pallets](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.8b80onxdand3) |
| 8. | Recommend blockchain gas fees handling in ISO20022 framework | Recommend solution how to fulfill blockchain gas fees in ISO20022 framework | [Fees and charges](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.2b7eq0ofq9wv) |
| 8. | Recommend how to implement ISO20022 cross-border charges & fees | Recommend solution how to implement ISO20022 cross-border payment inter-bank / X-border payment charges and fees | [Fee recommendations](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.2b7eq0ofq9wv) |
| 9. | Specify query of ISO20022 messages and transactions | Specify query interface to retrieve selected ISO20022 messages and transactions| [Queries](https://docs.google.com/document/d/1pMY0D-vTBEVq65Ro4PW3LzXrT1ZVl9l4r7jIMHmfBqs/edit#heading=h.ykoxriwep1ug) |
| 10. | Publication to share with the broader community and get additional feedback | Medium article covering: 1) feasibility and comparative advantages of Substrate based ISO20022 compliant cross-border payments on Dotsama chain; 2) benefits of such a solution in contrast to traditional centralized cross-border payments; 3) recommendation of future works towards a scalable, performant and cost effective solution supporting ISO20022 on Polkadot/Kusama chains and beyond. | Draft and publish [Medium article](https://medium.com/@0xrwas/cross-border-payment-proof-of-concept-supporting-iso20022-messages-on-the-polkadot-blockchain-3846910fc8de) |


**Additional Information**
46 changes: 46 additions & 0 deletions deliveries/Intersetellar-network-WP2-M2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Milestone Delivery :mailbox:



**The [invoice form :pencil:](https://docs.google.com/forms/d/e/1FAIpQLSfmNYaoCgrxyhzgoKQ0ynQvnNRoTmgApz9NrMp-hd8mhIiO0A/viewform) has been filled out correctly for this milestone and the delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grant-Milestone-Delivery/blob/master/deliveries/milestone-delivery-template.md).**


> FIAT payment i.e. USD
* **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/Interstellar-network2.md

* **Milestone Number:** 2

**Context** (optional)

We have updated our current display circuit to enhance user experience by reducing the cognitive load required to read the screen. This means less time for the brain to decode or read the digits displayed. This has been achieved by introducing specific sub-circuits that handle a set of probabilities for displaying each segment for every frame. In this demonstration, we present the transaction validation screen with varied probabilities for segment display.

To simplify the evaluation, we utilize various apps in offline mode. Each app is assigned a specific probability that reflects a different cognitive load for the users. This approach will allows us to adjust the difficulty level dynamically for each user interaction.
> The mandatory English language requirement has been resolved and is no longer in effect.
Looking ahead, we plan to leverage the new capabilities of the display circuit to fine-tune the balance between cognitive load and security. More crucially, we aim to define a unique user's behavioral biometric profile. This profile will be based on the user's cognitive load experiences in conjunction with other behavioral biometrics, such as the timing of touch inputs for user's response.

Please refer to the [Interstellar Decentralized Authentication](https://medium.com/@jlleleu/interstellar-secure-ux-7d7f095403c9) article for more details on the security model.



**Deliverables**

### Milestone 2 — New Circuit Design


| Number | Deliverable | Link | Notes |
| -----: | ----------- | -----------|------------ |
| 0a. | Licence | APACHE 2.0, MIT | |
| 0b. | Documentation | [documentation](https://book.interstellar.gg/2M2.html) | |
| 0c. | Testing Guide | [testing guide](https://book.interstellar.gg/2M2.html#testing-guide) | |
| 0d. | Docker | | see additional information |
| 1. | New Circuit| [New Circuit design](https://github.com/Interstellar-Network/lib_circuits/tree/main/circuit-gen-rs/data/verilog#new-circuit-diagrams), [Demo tutorial](https://book.interstellar.gg/2M2_demo_tutorial.html) | Mobile offline demo apps, each with the new circuit and a pre-computed display circuit generated with a defined probability to display segments |
|2. | Light security screen| [Demo tutorial](https://book.interstellar.gg/2M2_demo_tutorial.html) | we use high probability to display segments i.e. 0.9 this non-screenshot proof version will be used later with our adaptive security framework|

**Additional information:**

As we prioritize the user experience and aim to showcase the readability improvement compared to the previous milestone, there is no need for a Docker here. Instead, we provide offline demo apps to simplify the evaluation.

However, if you'd like to test the full pipeline for this milestone, we can provide you with both a Docker and an online version of the app and the related demo tutorial.

47 changes: 47 additions & 0 deletions deliveries/Interstellar-Network-WP2-M1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Milestone Delivery :mailbox:



**The [invoice form :pencil:](https://docs.google.com/forms/d/e/1FAIpQLSfmNYaoCgrxyhzgoKQ0ynQvnNRoTmgApz9NrMp-hd8mhIiO0A/viewform) has been filled out correctly for this milestone and the delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grant-Milestone-Delivery/blob/master/deliveries/milestone-delivery-template.md).**



> As W3F does not anymore offer payments in ETH, we switched to payment in USD in the submitted invoice
* **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/Interstellar-network2.md

* **Milestone Number:** 1

**Context** (optional)
In order to improve the frames per second (fps) performance of our garbled circuit evaluation, we need to consider both the efficiency of the evaluation itself in terms of gates/ms and the total number of logical gates required for each frame, which is directly linked to the screen resolution. As a rough approximation, the number of pixels to display is proportional to the number of gates, and strictly reflects for now the number of garbled circuits outputs.

While it is not strictly necessary to hide the transaction message from a security standpoint, it is crucial to make it almost impossible for an attacker to identify and modify this message in memory. Please refer to the [Interstellar Secure UX/UI](https://medium.com/@jlleleu/interstellar-secure-ux-7d7f095403c9) article for more details.

To address this concern, in the M5 milestone, we incorporated the transaction message within the circuit itself to prevent unauthorized modifications. However, including the message in the circuit significantly increased the number of gates that need to be evaluated, resulting in a performance of only 1 fps with Fancy Garble scheme. Compared with M3, our circuit consisted of approximately 80,000 gates, while the updated circuit with the included message now contains 314,970 gates.

So, we have developed a new garbling scheme implementation, from scratch, based on the following whitepapers: [A New Framework for Garbled Circuits] (https://www.esat.kuleuven.be/cosic/publications/article-3351.pdf) and [A New Approach to Garbled Circuits](https://eprint.iacr.org/2021/739.pdf). This new scheme, proven secure against PPT adversary, achieves a major performance improvement compared to the previous method i.e., Fancy Garble, while still incorporating the transaction message within the circuit. Our optimizations, including parallelization, free gates, and especially tight memory management, contribute to this significant boost in performance.

We believe that by implementing additional optimizations and reducing the size of the circuit, we can still increase performance without sacrificing the desired high resolution and security. One approach to achieve this is to include only a portion (half or less) of the transaction message pixels in the circuit. This modification effectively prevents attackers from modifying the message, as modifying only a part of it would be futile. It is likely that we will incorporate this change in the next milestone related to our circuit design modification/optimization. This can be done on top of specific modifications to reduce cognitive load in order to achieve smoother user experience.


**Deliverables**

### Milestone 1 — New Garbling Scheme


| Number | Deliverable | Link | Notes |
| -----: | ----------- | -----------|------------ |
| 0a. | Licence | APACHE 2.0, MIT | |
| 0b. | Documentation | [documentation](https://book.interstellar.gg/2M1.html) | |
| 0c. | Testing Guide | [testing guide](https://book.interstellar.gg/2M1.html#testing-guide) | |
| 0d. | Docker | | see additional information |
| 1. | New Garbling Scheme| [New Garbling library](https://github.com/Interstellar-Network/lib-garble-rs/tree/w3f-phase2-milestone1), [Demo tutorial](https://book.interstellar.gg/2M1_demo_tutorial.html) | Mobile offline demo app with the new evaluator and a pre-computed circuit generated with the new scheme |


**Additional information:**

As we prioritize the user experience and aim to showcase the FPS improvement compared to the previous milestone, there is no need for a Docker here. Instead, we provide an offline demo app to simplify the evaluation.

However, if you'd like to test the full pipeline for this milestone, we can provide you with both a Docker and an online version of the app and the related demo tutorial.


Loading

0 comments on commit 14da5ea

Please sign in to comment.