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

# Packages

No description provided by the author

# Functions

CalculateAgreement.
ComputeTruncatedMAC computes a HMAC-SHA256 MAC and returns its prefix of a given size.
Decrypt returns the AES-CBC decryption of a ciphertext under a given key.
DeriveSecrets derives the requested number of bytes using HKDF, given the inputKeyMaterial, salt and the info.
Encrypt returns the AES-CBC encryption of a plaintext under a given key.
GenerateIdentityKeyPair is called once at install time to generate the local identity keypair, which will be valid until a reinstallation.
GenerateLastResortPreKey creates the last resort PreKey.
GeneratePreKeys creates a list of PreKeys.
LoadPreKeyRecord creates a PreKeyRecord instance from a serialized bytestream.
LoadPreKeyWhisperMessage creates a PreKeyWhisperMessage from serialized bytes.
LoadSessionRecord creates a SessionRecord object from serialized byte, error) {.
LoadSignedPreKeyRecord creates a SignedPreKeyRecord instance from a serialized bytestream.
LoadWhisperMessage creates a WhisperMessage from serialized bytes.
MakeECKeyPair creates a key pair.
NewECKeyPair creates a key pair.
NewECPrivateKey initializes a private key with the given value.
NewECPublicKey initializes a public key with the given value.
NewIdentityKey initializes an identity key to a given value.
NewIdentityKeyPairFromKeys initializes an identity key pair.
NewPreKeyBundle creates a PreKeyBundle structure with the given fields.
NewPreKeyRecord creates a new PreKeyRecord instance.
NewSessionBuilder creates a new session builder object.
NewSessionCipher creates a new session cipher.
NewSessionRecord creates a new SessionRecord object.
NewSignedPreKeyRecord creates a new SignedPreKeyRecord instance.
ValidTruncMAC checks whether a message is correctly authenticated using HMAC-SHA256.

# Variables

ErrIncompletePreKeyWhisperMessage is returned when an incomplete PreKeyWhisperMessage is received.
ErrIncompleteWhisperMessage is returned when an incomplete WhisperMessage is received.
ErrInvalidMACForWhisperMessage signals a message with invalid MAC.
ErrUninitializedSession occurs when there is no session matching the incoming message.

# Structs

DuplicateMessageError indicates that we have received the same message more than once.
ECKeyPair represents a public and private key pair.
ECPrivateKey represents a 256 bit Curve25519 private key.
ECPublicKey represents a 256 bit Curve25519 public key.
IdentityKey represents a Curve25519 public key used as a public identity.
IdentityKeyPair is a pair of private and public identity keys.
InvalidMessageError represents various error states.
InvalidSignatureError represents the error situation where the verification of the sender identity fails.
MismatchedVersionError represents the error situation where the peer is using a different protocol version.
NotTrustedError represents the error situation where the peer is using a different identity key than expected.
PreKeyBundle contains the data required to initialize a sender session.
PreKeyNotFoundError represents the error situation when a local prekey cannot be loaded.
PreKeyRecord represents a prekey, and is simply wrapper around the corresponding protobuf struct.
PreKeyWhisperMessage represents a WhisperMessage and additional prekey metadata used for the initial handshake in a conversation.
SessionBuilder takes care of creating the sessions.
SessionCipher represents a peer and its persistent stored session.
SessionRecord represents a session in persistent store.
SignedPreKeyRecord represents a prekey, and is simply wrapper around the corresponding protobuf struct.
UnsupportedVersionError represents the error situation where the peer is using an unsupported protocol version.
WhisperMessage represents the encrypted message format used in TextSecure.

# Interfaces

IdentityStore provides an interface to identity information.
PreKeyStore provides an interface to accessing the local prekeys.
SessionStore provides an interface to accessing the local session records.
SignedPreKeyStore provides an interface to accessing the local signed prekeys.