ddd16c202f
Alternative to #177 The way this works is: Client: - Client creates a normal `net/http.Request{}` object using the `Request()` function in `utils.go`. The `http.Request{}` object is then signed using the Client's Ed25519 private key. - The HTTP Method and Path (_note this is important_) are hashed, as well as the request body (if any) using the FNV128a hashing algorithm. - This hash is then signed by the Client's's Ed25519 private key. - The resulting signature is then encoded to Base64 (_standard encoding_) and added to the HTTP headers as a `Signature:` header. - In addition the Client's Ed25519 public key is added to the HTTP headers as `Signer:` Server: - The server calculates the same FNV128a hash of the HTTP Request Method and Path and the body (if any) - The server decodes the HTTP header `Signature:` - The server then uses the Client's Ed25519 public key in the HTTP header `Signer:` to verify the signature of the `Signature:` HTTP header which gives us back the original FNV128a hash the Client calculated for the request. - The server then compares the Client's hash with the expected hash to see if they compare equally. Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com> Co-authored-by: Jon Lundy <jon@xuu.cc> Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/178 Reviewed-by: xuu <xuu@noreply@mills.io> |
||
---|---|---|
.chglog | ||
.dockerfiles | ||
bin | ||
certs | ||
cmd | ||
data | ||
docs | ||
hooks | ||
internal | ||
tools | ||
.drone.yml | ||
.gitattributes | ||
.gitignore | ||
.goreleaser.yml | ||
Caddyfile | ||
CHANGELOG.md | ||
client_test.go | ||
client.go | ||
Corefile | ||
db.home.arpa | ||
doc.go | ||
Dockerfile | ||
example-config.yml | ||
format_test.go | ||
format.go | ||
go.mod | ||
go.sum | ||
identity_test.go | ||
identity.go | ||
LICENSE | ||
lookup_test.go | ||
lookup.go | ||
Makefile | ||
OLDREADME.md | ||
options.go | ||
preflight.sh | ||
README.md | ||
resolv.go | ||
Roadmap.md | ||
send.go | ||
service.go | ||
state.go | ||
types.go | ||
utils_test.go | ||
utils.go | ||
version.go |
Salty IM -- secure, easy, self-hosted messaging
Salty IM is a secure, decentrlaised and easy self-hosted instant messaging alternative. Salty IM is fully encrypted using the salty Go library utilising the Saltypack messaging format and parts of keys.pub implemtnation for its cryptography. Encryption, Decryption and Signing of messages is performed with public key cryptography using the Ed25519 algoritms.
For more information on how the protocol works, please refer to the Specification.
This repository also contains a reference client (written in Go), a reference
broker (server) as well as a Terminal TUI (TUI) client called salty-chat
and
command-line tools:
saltyd
-- Reference broker (server)salty-chat
-- Command-line tools and Terminal UI (TUI)- saltyim -- Reference client (Go library)
Quick Start CLI
$ go install go.mills.io/saltyim/cmd/salty-chat@latest
$ salty-chat make-user user@domain
# Follow the insturctions
$ salty-chat chat prologic@mills.io
Alternatively follow the full documentation below to setup your own Salty broker and your domain name.
Quick Start (DEV)
Documentation
See also the Old Readme for how this implementation started out as a simple shell script which you can still find at salty-chat.sh.
Roadmap
Please refer to the Roadmap document.
License
saltyd
and salty-chat
are licensed under the terms of the MIT
license.