diff --git a/.github/workflows/release.yml b/.github/workflows/release.yaml
similarity index 100%
rename from .github/workflows/release.yml
rename to .github/workflows/release.yaml
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yaml
similarity index 100%
rename from .github/workflows/test.yml
rename to .github/workflows/test.yaml
diff --git a/README.md b/README.md
index 56c7d10..7921c3f 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,21 @@
# Xipher
[![Go Reference](https://pkg.go.dev/badge/dev.shib.me/xipher.svg)](https://pkg.go.dev/dev.shib.me/xipher)
[![Go Report Card](https://goreportcard.com/badge/dev.shib.me/xipher)](https://goreportcard.com/report/dev.shib.me/xipher)
-[![Test Status](https://github.com/shibme/xipher/actions/workflows/test.yml/badge.svg)](https://github.com/shibme/xipher/actions/workflows/test.yml)
-[![Release Status](https://github.com/shibme/xipher/actions/workflows/release.yml/badge.svg)](https://github.com/shibme/xipher/actions/workflows/release.yml)
+[![Test Status](https://github.com/shibme/xipher/actions/workflows/test.yaml/badge.svg)](https://github.com/shibme/xipher/actions/workflows/test.yaml)
+[![Release Status](https://github.com/shibme/xipher/actions/workflows/release.yaml/badge.svg)](https://github.com/shibme/xipher/actions/workflows/release.yaml)
[![License](https://img.shields.io/github/license/shibme/xipher)](https://github.com/shibme/xipher/blob/main/LICENSE)
Xipher is a curated collection of cryptographic primitives put together to perform key/password based asymmetric encryption.
## What does it do?
- Allows sharing of data securely between two parties over an insecure channel using asymmetric encryption.
-- The sender encrypts the data using a public key (received from a receiver) derived from a password and shares the encrypted data with the receiver.
-- The receiver decrypts the data using the same password.
+- The sender encrypts the data using a public key (of the receiver - usually derived from a password) and shares the encrypted data with the receiver.
+- The receiver decrypts the data using the secret key (or password).
## Key Aspects
- Encrypts data with the public key generated based on a password.
-- Supports stream cipher along with stream compression, resulting in lower memory footprint.
-- Supports post-quantum cryptography using the Kyber algorithm.
+- Supports stream cipher along with stream compression, resulting in lower memory footprint and smaller ciphertext.
+- Supports post-quantum cryptography using the Kyber1024 algorithm.
## CLI
Download the latest binary from the [releases](https://github.com/shibme/xipher/releases/latest) page and add it to your path.
@@ -60,6 +60,41 @@ docker run --rm -v $PWD:/data -it shibme/xipher help
## Web Interface
A web interface interoperable with the CLI, implemented using [web assembly](#web-assembly) is available [here](https://dev.shib.me/xipher).
+### How does Xipher Web App work?
+- Receiver opens the Xipher web app on a browser.
+- Xipher generates a key pair and stores them in the browser local storage.
+- The Xiher web app returns the public key as a URL that can be shared.
+- Receiver shares the encryption URL (this contains the public key as a parameter) with the sender.
+- Sender opens the public encryption URL (opens Xipher encryption web page).
+- Sender inputs the data that needs to be encrypted.
+- Xipher encrypts the data using the public key from the URL.
+- Xipher returns ciphertext encrypted with the public key.
+- Sender sends the encrypted ciphertext to the receiver.
+- Receiver inputs the ciphertext in the decryption page.
+- Xipher decrypts the ciphertext using the secret key from local storage.
+- Xipher returns decrypted data.
+
+The following sequence diagram illustrates the workflow of the web app.
+```mermaid
+sequenceDiagram
+participant RX as Xipher
(on Browser)
+actor Receiver
+actor Sender
+participant SX as Xipher
(on Browser)
+ Receiver-->>+RX: Opens Xipher App on browser
+ RX-->>RX: Generates a key pair and stores them in the browser local storage
+ RX-->>-Receiver: Returns the Public Key
(as a URL that can be shared)
+ Receiver->>+Sender: Shares the encryption URL
(this contains the public key as parameter)
+ Sender-->>+SX: Opens the public encryption URL
(opens Xipher encryption web page)
+ Sender-->>SX: Inputs the data that needs to be encrypted
+ SX-->>SX: Encrypts the data using the public key from the URL
+ SX-->>-Sender: Returns ciphertext encrypted with the Public Key
+ Sender->>-Receiver: Sends the encrypted ciphertext to the Receiver
+ Receiver-->>+RX: Inputs the ciphertext
(in the decyrption page)
+ RX-->>RX: Decrypts the ciphertext
(using the secret key from local storage)
+ RX-->>-Receiver: Returns decrypted data
+```
+
## Using as a Go package
Install the package
```sh
diff --git a/web/public/install/install.ps1 b/web/public/install/install.ps1
index b0ccc04..af82b45 100644
--- a/web/public/install/install.ps1
+++ b/web/public/install/install.ps1
@@ -9,7 +9,7 @@ if ($Args.Length -eq 1) {
$Version = $Args.Get(0)
}
-$XipherInstall = $env:Xipher_INSTALL
+$XipherInstall = $env:XIPHER_INSTALL
$BinDir = if ($XipherInstall) {
"${XipherInstall}\bin"
} else {
diff --git a/web/public/install/install.sh b/web/public/install/install.sh
index f76baca..0a8fdd7 100644
--- a/web/public/install/install.sh
+++ b/web/public/install/install.sh
@@ -24,7 +24,7 @@ else
xipher_uri="https://github.com/shibme/xipher/releases/download/${1}/xipher_${target}.zip"
fi
-xipher_install="${Xipher_INSTALL:-$HOME/.xipher}"
+xipher_install="${XIPHER_INSTALL:-$HOME/.xipher}"
bin_dir="$xipher_install/bin"
exe="$bin_dir/xipher"
@@ -50,8 +50,8 @@ else
*) shell_profile=".bashrc" ;;
esac
echo "Manually add the directory to your \$HOME/$shell_profile (or similar)"
- echo " export Xipher_INSTALL=\"$xipher_install\""
- echo " export PATH=\"\$Xipher_INSTALL/bin:\$PATH\""
+ echo " export XIPHER_INSTALL=\"$xipher_install\""
+ echo " export PATH=\"\$XIPHER_INSTALL/bin:\$PATH\""
echo "Run '$exe --help' to get started"
fi
echo