Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #47 from signal-golang/sealed_sender
Browse files Browse the repository at this point in the history
Use crayfish for register and decipher of sealed sender messages
  • Loading branch information
nanu-c authored Nov 7, 2021
2 parents 7c74cc0 + 43b6031 commit faed35c
Show file tree
Hide file tree
Showing 15 changed files with 774 additions and 116 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cmd/textsecure/crayfish"]
path = cmd/textsecure/crayfish
url = https://github.com/nanu-c/crayfish.git
11 changes: 7 additions & 4 deletions cmd/textsecure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ endif
ifeq ($(uname_s), Linux)
ifeq ($(shell uname --machine), x86_64)
@echo "get zkgroup $(PLATFORM)"
go get -d github.com/nanu-c/zkgroup
go get -d github.com/nanu-c/zkgroup \
&& cd $(GOPATH)/src/github.com/nanu-c/zkgroup \
&& git submodule update \
&& cd lib/zkgroup \
&& cargo build --release --verbose
mv libzkgroup.so libzkgroup_linux_x86_64.so
&& cargo build --release --verbose
mv $(GOPATH)/src/github.com/nanu-c/zkgroup/lib/zkgroup/target/debug/libzkgroup.so libzkgroup_linux_x86_64.so
cd crayfish&&cargo build
else ifeq ($(shell uname --machine), aarch64)
@echo "get zkgroup $(PLATFORM)"
go get -d github.com/nanu-c/zkgroup
&& git submodule update \
&& cd lib/zkgroup \
&& cargo build --release --verbose
mv libzkgroup.so libzkgroup_linux_aarch64.so
mv $(GOPATH)/src/github.com/nanu-c/zkgroup/lib/zkgroup/target/debug/libzkgroup.so libzkgroup_linux_aarch64.so
cd crayfish&&cargo build
else
@echo architecture not supported
exit 1
Expand Down
10 changes: 8 additions & 2 deletions cmd/textsecure/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Info
The textsecure-cmd depends on libzkgroup a rust lib.
The textsecure-cmd depends on libzkgroup and crayfsh both rust libs.

# Tooling
`go`, `cargo`, `rust`

# Installing
In order to run textsecure-cmd you can either copy the precompiled library with `make copy-lib` or compile it with `make`.
textsecure-cmd uses [crayfish](https://github.com/nanu-c/crayfish) as backend to decipher the signal messages. In order to checkout the code run `git submodule update`.
Then build `crayfish` with `cd crayfish && cago build`
In order to run textsecure-cmd you can either copy the precompiled zkgroup library with `make copy-lib` or compile it with `make`.


# Troubleshooting

Expand Down
1 change: 1 addition & 0 deletions cmd/textsecure/crayfish
Submodule crayfish added at 60993b
2 changes: 1 addition & 1 deletion cmd/textsecure/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func init() {
flag.StringVar(&leavegroup, "leavegroup", "", "Leave a group named by the argument")
flag.BoolVar(&endsession, "endsession", false, "Terminate session with peer")
flag.BoolVar(&showdevices, "showdevices", false, "Show linked devices")
flag.StringVar(&linkdevice, "linkdevice", "", "Link a new device, the argument is a url in the format 'tsdevice:/?uuid=xxx&pub_key=yyy'")
flag.StringVar(&linkdevice, "linkdevice", "", "Link a new device, the argument is a url in the format 'sgn:/?uuid=xxx&pub_key=yyy'")
flag.IntVar(&unlinkdevice, "unlinkdevice", 0, "Unlink a device, the argument is the id of the device to delete")
flag.IntVar(&stress, "stress", 0, "Automatically send many messages to the peer")
flag.StringVar(&configDir, "config", ".config", "Location of config dir")
Expand Down
Loading

0 comments on commit faed35c

Please sign in to comment.