Categorygithub.com/signal-golang/textsecure
modulepackage
1.20.0
Repository: https://github.com/signal-golang/textsecure.git
Documentation: pkg.go.dev

# README

TextSecure library and command line test client for Go

This is a Go package implementing the TextSecure push data (i.e. not encrypted SMS) protocol v3 including the Axolotl ratchet.

The included sample command line app can send and receive text messages and attachments and supports group chat.

The API presented by the package is in flux, mainly driven by the needs of https://github.com/nanu-c/axolotl

Automatically generated documentation can be found on GoDoc

Installation

This command will install both the library and the test client.

go get github.com/signal-golang/textsecure/cmd/textsecure

textsecure also depends on crayfish which is a Go library for interacting with the upstream libsignal-client library. It's currently used for registration and decryption of messages. libzkgroup is used for the groupv2 protocol and is add by [this go wrapper] (https://github.com/nanu-c/zkgroup). It has to be added to the LD_LIBRARY_PATH environment variable. Crayfish is built with cago build and has to be placed next to the textsecure binary.

Configuration

Copy cmd/textsecure/.config to a directory and modify it, then run the tool from that directory. It will create .storage to hold all the protocol state. Removing that dir and running the tool again will trigger a reregistration with the server.

Usage

Do not run multiple instances of the app from the same directory, it (and the server) can get confused

This will show the supported command line flags

textsecure -h

Running the command without arguments will put it in receiving mode, and once it receives a message it will be able to talk to that contact.

Discussions

User and developer discussions happen on the mailing list

# Packages

Package axolotl implements the Axolotl ratchet as used by TextSecure protocol version 3.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package curve25519sign implements a signature scheme based on Curve25519 keys.
No description provided by the author
Based on https://gist.github.com/nanu-c/f885b928b9e43a7167258dd70dc186d6 from nanu-cwhich is based on https://github.com/signalapp/libsignal-protocol-java/blob/master/java/src/main/java/org/whispersystems/libsignal/fingerprint/NumericFingerprintGenerator.java.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AddDevice links a new device.
AddNewLinkedDevice adds a new signal desktop client.
ContactIdentityKey returns the serialized public key of the given contact.
EndSession terminates the session with the given peer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetGroupById returns a group by it's id.
GetGroupV2MembersForGroup returns the members of a group.
GetMyUUID returns the uid from the current user.
No description provided by the author
No description provided by the author
No description provided by the author
GetRegisteredContacts returns the subset of the local contacts that are also registered with the server.
No description provided by the author
LeaveGroup sends a group quit message to the other members of the given group.
LinkedDevices returns the list of linked devices.
MIMETypeFromReader returns the mime type that is inside the reader.
MyIdentityKey returns our serialized public identity key.
NewDeviceVerificationCode returns the verification code for linking devices.
NewGroup creates a group and notifies its members.
ReadConfig reads a YAML config file.
No description provided by the author
No description provided by the author
RegisterWithUPS registers our Ubuntu push client token with the server.
RemoveGroupKey removes the group key.
RequestGroupInfo updates the info for the group like members or the avatat.
SendAttachment sends the contents of a reader, along with an optional message to a given contact.
SendGroupAttachment sends an attachment to a given group.
SendGroupMessage sends a text message to a given group.
SendGroupVoiceNote sends an voice note to a group.
SendMessage sends the given text message to the given contact.
SendVoiceNote sends a voice note.
SetAccountCapabilities lets the client decide when it's ready for new functions to support for example groupsv2.
Setup initializes the package.
SetUsername sets the profile name.
StartListening connects to the server and handles incoming websocket messages.
StopListening disables the receiving of messages.
SyncContacts syncs the contacts.
UnlinkDevice removes a linked device.
UpdateGroup updates the group name and/or membership.
WriteConfig saves a config to a file.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CREATE_ACCOUNT_SMS_PATH = "/v1/accounts/sms/code/%s?client=%s";.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EndSessionFlag signals that this message resets the session.
ErrBadPublicKey is raised when a given public key is not in the expected format.
ErrInvalidMACForAttachment signals that the downloaded attachment has an invalid MAC.
ErrInvalidMACForMessage signals an incoming message with invalid MAC.
ErrNotListening is returned when trying to stop listening when there's no valid listening connection set up.
ErrRemoteGone is returned when the peer reinstalled and lost its session state.
ErrStoreBadMAC occurs when MAC verification fails on the records stored using password based encryption.
GroupLeaveFlag signals that this message is a group leave message.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GroupUpdateFlag signals that this message updates the group membership or name.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProfileKeyUpdatedFlag signals that this message updates the profile key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

AccountAttributes describes what features are supported.
Attachment represents an attachment received from a peer.
Client contains application specific data and callbacks.
Conn is a wrapper for the websocket connection.
No description provided by the author
No description provided by the author
No description provided by the author
Group holds group metadata.
Message represents a message received from the peer.
MessageTypeNotImplementedError is raised in the unlikely event that an unhandled protocol message type is received.
No description provided by the author
No description provided by the author
UnknownContactError is returned when an unknown group id is encountered.
UnknownGroupIDError is returned when an unknown group id is encountered.
No description provided by the author

# Type aliases

{"clientPublic":"DtZ1bEvFbDPgueDL30P3gh34GLeDAWCSIIXRECU7TCk="}.