This is a proof of concept project that implements Signed Exchanges (SXG) built on Sig Network. This project is still work in progress
-
Run one of mock signer or sig signer:
- For mock signer:
node mock-signer.js - For sig signer:
node sig-signer.js
- For mock signer:
-
Generate CSR:
python generate-csr.pyThis generates a CSR without signature, sends it to the signer to sign and pack the signed CSR, then dumps it in PEM format.
-
Register a DigiCert account and upload the CSR to obtain a SXG-supported certificate.
-
Host the certificate and public key on a server:
- Ensure your server is configured to serve these files securely.
-
Generate SXG for each static file on your site:
python generate-sxg.py(TODO)
-
Host SXG files alongside your site:
- Configure your web server to serve both the original files and their SXG counterparts.
To set up the environment for this project, follow these steps:
-
Clone the repository and its submodules:
git clone --recursive https://github.com/your-repo/SIG-SXG.git cd SIG-SXG -
Install Conda If you don't have Conda installed, download and install it from the official Conda website.
-
Create a new Conda environment named 'nearsxg':
conda env create -f environment.yml conda activate nearsxg -
Install project dependencies:
npm install -
Build the cryptography module:
cd cryptography -
Install Rust: If you don't have Rust installed, you can install it using rustup. Visit https://rustup.rs/ for installation instructions or run:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -
Install build requirements:
pip install -r .github/requirements/build-requirements.txt -
Build the cryptography module using maturin:
maturin build # There will be an output python package, install it with pip install path/to/package -
Return to the project root directory:
cd .. -
Build the webpackage:
cd webpackage go build -o ../gen-signedexchange go/signedexchange/cmd/gen-signedexchange/main.go cd ..