Categorygithub.com/aebruno/textsecure
modulepackage
0.0.0-20180401152730-b6c5e09f570b
Repository: https://github.com/aebruno/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/janimo/textsecure-qml

Automatically generated documentation can be found on [GoDoc] (https://godoc.org/github.com/janimo/textsecure)

Installation

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

go get github.com/janimo/textsecure/cmd/textsecure

For more details, including setting up Go, check the [wiki] (https://github.com/janimo/textsecure/wiki/Installation)

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] (https://groups.google.com/forum/#!forum/textsecure-go)

# Packages

Package axolotl implements the Axolotl ratchet as used by TextSecure protocol version 3.
No description provided by the author
Package curve25519sign implements a signature scheme based on Curve25519 keys.
Package signalservice is a generated protocol buffer package.

# Functions

AddDevice links a new device.
ContactIdentityKey returns the serialized public key of the given contact.
EndSession terminates the session with the given peer.
GetRegisteredContacts returns the subset of the local contacts that are also registered with the server.
LeaveGroup sends a group quit message to the other members of the given group.
LinkedDevices returns the list of linked devices.
No description provided by the author
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.
ReadContacts reads a YAML contacts file.
RegisterWithUPS registers our Ubuntu push client token with the server.
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.
SendMessage sends the given text message to the given contact.
Setup initializes the package.
StartListening connects to the server and handles incoming websocket messages.
StopListening disables the receiving of messages.
UnlinkDevice removes a linked device.
UpdateGroup updates the group name and/or membership.
WriteConfig saves a config to a file.
WriteContacts saves a list of contacts to a file.

# Variables

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.
GroupLeavelag signals that this message is a group leave message.
GroupUpdateFlag signals that this message updates the group membership or name.

# Structs

Attachment represents an attachment received from a peer.
Client contains application specific data and callbacks.
Config holds application configuration settings.
Conn is a wrapper for the websocket connection.
Contact contains information about a contact.
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.
RegistrationInfo holds the data required to be identified by and to communicate with the push server.
UnknownContactError is returned when an unknown group id is encountered.
UnknownGroupIDError is returned when an unknown group id is encountered.