---
# System prepended metadata

title: JOSE Contribution Proposal

---

# JOSE Contribution Proposal
Our current proposal is the following:
* **Python**: Implement required JOSE parts in Python based on https://github.com/lepture/authlib
    * The plan is to fork authlib and contribute to upstream. An issue with proposal is created: [link](https://github.com/lepture/authlib/issues/370).
    * If for some reasons they will not accept our contribution, we will just copy the required JOSE part into our DID Comm Python lib and will not support the fork.
* **Java**:  Implement required JOSE parts in Java based on https://bitbucket.org/connect2id/nimbus-jose-jwt
    * The plan is to fork nimbus and contribute to upstream. An issue with proposal is created: [link](https://bitbucket.org/connect2id/nimbus-jose-jwt/issues/439/interested-in-a-meaningful-contribution).
    * If for some reasons they will not accept our contribution, we will just copy the required JOSE part into our DID Comm Java lib and will not support the fork. Or, even better, there is a chance for Nimbus to implement our changes in DID Comm code on top of upstream Nimbus where Nimbus will be just a common dependency.
* **JS / iOS / Rust**: Implement DID Comm in Rust, and use wasm for JS (both node.js and browsers) and a wrapper for iOS

### JOSE Research Details
- Python: https://hackmd.io/qJhPmgM3RIOy1D_evwjQHg
- Java: https://hackmd.io/@FCN75Uk9TCqMmxSE6vEn5A/rkhCBUP0O
- JS: https://hackmd.io/@IyhpRay4QVC_ozugDsQAQg/S1QlYJN0d

### Why it's proposed that way
- Why native implementation for Java/Python
  - JOSE implementation for Python (authlib) and Java (Nimbus) seems mature and popular enough
  - We want to make the most popular and needed Python and Java implementations self-consistent, so that they can be maintained easily by community
- Why shared lib for JS/iOS
  - There is no support for 25519 curves for Web Browsers (JS)
  - Contribution to JS Jose library will be tricky, time-consuming anf risky as the maintainers don't want to accept Draft specs (such as ECDH-1PU) in the main code
  - iOS native implementation can be challenging for the current team w/o native iOS developers
  - A wrapper for iOS will be as user-friendly as a native implementation
  - We may consider some options to auto-generate WASM and iOS wrappers (they can save some time but not a lot, as our API is pretty compact).

### Other alternatives
- All native
- All based on shared Rust lib

### Rough estimates
The estimate for Python+Java+JS(node+browser)+Rust+iOS
- Current proposal (native Java and Python; shared Rust, JS, iOS): 1100 mh
- All native: 1500 mh
- All based on shared Rust: 800 mh

Details about the estimate: https://cloud.dsr-corporation.com/index.php/s/TSE2brQodLyDPYn