Documentation ¶
Index ¶
- Constants
- func Compress(data []byte) []byte
- func Contains(list []string, target string) bool
- func ContainsAny(list, targets []string) bool
- func ContainsInt(list []int, target int) bool
- func ContainsWildcard(patterns []string, target string) bool
- func ContextError(err error) error
- func Decompress(data []byte) ([]byte, error)
- func FlipCoin() bool
- func FlipWeightedCoin(weight float64) bool
- func FormatByteCount(bytes uint64) string
- func GenerateAuthenticatedDataPackageKeys() (string, string, error)
- func GenerateHostName() string
- func GetCurrentTimestamp() string
- func GetInterfaceIPAddresses(interfaceName string) (net.IP, net.IP, error)
- func GetParentContext() string
- func GetStringSlice(value interface{}) ([]string, bool)
- func IPAddressFromAddr(addr net.Addr) string
- func Jitter(n int64, factor float64) int64
- func JitterDuration(d time.Duration, factor float64) time.Duration
- func MakeSecureRandomBytes(length int) ([]byte, error)
- func MakeSecureRandomInt(max int) (int, error)
- func MakeSecureRandomInt64(max int64) (int64, error)
- func MakeSecureRandomPadding(minLength, maxLength int) ([]byte, error)
- func MakeSecureRandomPeriod(min, max time.Duration) (time.Duration, error)
- func MakeSecureRandomPerm(max int) ([]int, error)
- func MakeSecureRandomRange(min, max int) (int, error)
- func MakeSecureRandomStringBase64(byteLength int) (string, error)
- func MakeSecureRandomStringHex(byteLength int) (string, error)
- func NewAuthenticatedDataPackageReader(dataPackage io.ReadSeeker, signingPublicKey string) (io.Reader, error)
- func ReadAuthenticatedDataPackage(dataPackage []byte, isCompressed bool, signingPublicKey string) (string, error)
- func RegisterHostNameGenerator(generator func() string)
- func TerminateHTTPConnection(responseWriter http.ResponseWriter, request *http.Request)
- func TruncateTimestampToHour(timestamp string) string
- func WriteAuthenticatedDataPackage(data string, signingPublicKey, signingPrivateKey string) ([]byte, error)
- type APIParameterLogFieldFormatter
- type APIParameterValidator
- type APIParameters
- type ActivityMonitoredConn
- func (conn *ActivityMonitoredConn) GetActiveDuration() time.Duration
- func (conn *ActivityMonitoredConn) GetLastActivityMonotime() monotime.Time
- func (conn *ActivityMonitoredConn) GetStartTime() time.Time
- func (conn *ActivityMonitoredConn) IsClosed() bool
- func (conn *ActivityMonitoredConn) Read(buffer []byte) (int, error)
- func (conn *ActivityMonitoredConn) Write(buffer []byte) (int, error)
- type ActivityUpdater
- type AuthenticatedDataPackage
- type BuildInfo
- type Closer
- type Conns
- type GeoIPData
- type LRUConns
- type LRUConnsEntry
- type LogContext
- type LogFields
- type Logger
- type RateLimits
- type ReloadableFile
- type Reloader
- type SubnetLookup
- type ThrottledConn
Constants ¶
const RFC3339Milli = "2006-01-02T15:04:05.000Z07:00"
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
Contains is a helper function that returns true if the target string is in the list.
func ContainsAny ¶ added in v1.0.5
ContainsAny returns true if any string in targets is present in the list.
func ContainsInt ¶ added in v1.0.5
ContainsInt returns true if the target int is in the list.
func ContainsWildcard ¶ added in v1.0.6
ContainsWildcard returns true if target matches any of the patterns. Patterns may contain the '*' wildcard.
func ContextError ¶
ContextError prefixes an error message with the current function name and source file line number.
func Decompress ¶
Decompress returns zlib decompressed data
func FlipCoin ¶
func FlipCoin() bool
FlipCoin is a helper function that randomly returns true or false.
If the underlying random number generator fails, FlipCoin still returns false.
func FlipWeightedCoin ¶ added in v1.0.5
FlipWeightedCoin returns the result of a weighted random coin flip. If the weight is 0.5, the outcome is equally likely to be true or false. If the weight is 1.0, the outcome is always true, and if the weight is 0.0, the outcome is always false.
Input weights > 1.0 are treated as 1.0.
If the underlying random number generator fails, FlipWeightedCoin still returns a result.
func FormatByteCount ¶ added in v1.0.5
FormatByteCount returns a string representation of the specified byte count in conventional, human-readable format.
func GenerateAuthenticatedDataPackageKeys ¶
GenerateAuthenticatedDataPackageKeys generates a key pair be used to sign and verify AuthenticatedDataPackages.
func GenerateHostName ¶
func GenerateHostName() string
func GetCurrentTimestamp ¶
func GetCurrentTimestamp() string
GetCurrentTimestamp returns the current time in UTC as an RFC 3339 formatted string.
func GetInterfaceIPAddresses ¶ added in v1.0.5
GetInterfaceIPAddresses takes an interface name, such as "eth0", and returns the first IPv4 and IPv6 addresses associated with it. Either of the IPv4 or IPv6 address may be nil. If neither type of address is found, an error is returned.
func GetParentContext ¶
func GetParentContext() string
GetParentContext returns the parent function name and source file line number.
func GetStringSlice ¶ added in v1.0.5
GetStringSlice converts an interface{} which is of type []interace{}, and with the type of each element a string, to []string.
func IPAddressFromAddr ¶
IPAddressFromAddr is a helper which extracts an IP address from a net.Addr or returns "" if there is no IP address.
func Jitter ¶
Jitter returns n +/- the given factor. For example, for n = 100 and factor = 0.1, the return value will be in the range [90, 110].
func JitterDuration ¶
JitterDuration is a helper function that wraps Jitter.
func MakeSecureRandomBytes ¶
MakeSecureRandomBytes is a helper function that wraps crypto/rand.Read.
func MakeSecureRandomInt ¶
MakeSecureRandomInt is a helper function that wraps MakeSecureRandomInt64.
func MakeSecureRandomInt64 ¶
MakeSecureRandomInt64 is a helper function that wraps crypto/rand.Int, which returns a uniform random value in [0, max).
func MakeSecureRandomPadding ¶
MakeSecureRandomPadding selects a random padding length in the indicated range and returns a random byte array of the selected length. If maxLength <= minLength, the padding is minLength.
func MakeSecureRandomPeriod ¶ added in v1.0.5
MakeSecureRandomPeriod returns a random duration, within a given range. If max <= min, the duration is min.
func MakeSecureRandomPerm ¶ added in v1.0.5
MakeSecureRandomPerm returns a random permutation of [0,max).
func MakeSecureRandomRange ¶ added in v1.0.5
MakeSecureRandomRange selects a random int in [min, max]. If max < min, min is returned.
func MakeSecureRandomStringBase64 ¶ added in v1.0.5
MakeSecureRandomStringBase64 returns a base64 encoded random string. byteLength specifies the pre-encoded data length.
func MakeSecureRandomStringHex ¶ added in v1.0.5
MakeSecureRandomStringHex returns a hex encoded random string. byteLength specifies the pre-encoded data length.
func NewAuthenticatedDataPackageReader ¶ added in v1.0.5
func NewAuthenticatedDataPackageReader( dataPackage io.ReadSeeker, signingPublicKey string) (io.Reader, error)
NewAuthenticatedDataPackageReader extracts and verifies authenticated data from an AuthenticatedDataPackage stored in the specified file. The package must have been signed with the given key. NewAuthenticatedDataPackageReader does not load the entire package nor the entire data into memory. It streams the package while verifying, and returns an io.Reader that the caller may use to stream the authenticated data payload.
func ReadAuthenticatedDataPackage ¶
func ReadAuthenticatedDataPackage( dataPackage []byte, isCompressed bool, signingPublicKey string) (string, error)
ReadAuthenticatedDataPackage extracts and verifies authenticated data from an AuthenticatedDataPackage. The package must have been signed with the given key.
Set isCompressed to false to read packages that are not compressed.
func RegisterHostNameGenerator ¶
func RegisterHostNameGenerator(generator func() string)
func TerminateHTTPConnection ¶ added in v1.0.6
func TerminateHTTPConnection( responseWriter http.ResponseWriter, request *http.Request)
TerminateHTTPConnection sends a 404 response to a client and also closes the persistent connection.
func TruncateTimestampToHour ¶
TruncateTimestampToHour truncates an RFC 3339 formatted string to hour granularity. If the input is not a valid format, the result is "".
func WriteAuthenticatedDataPackage ¶
func WriteAuthenticatedDataPackage( data string, signingPublicKey, signingPrivateKey string) ([]byte, error)
WriteAuthenticatedDataPackage creates an AuthenticatedDataPackage containing the specified data and signed by the given key. The output conforms with the legacy format here: https://bitbucket.org/psiphon/psiphon-circumvention-system/src/c25d080f6827b141fe637050ce0d5bd0ae2e9db5/Automation/psi_ops_crypto_tools.py
Types ¶
type APIParameterLogFieldFormatter ¶ added in v1.0.5
type APIParameterLogFieldFormatter func(GeoIPData, APIParameters) LogFields
APIParameterLogFieldFormatter is a function that returns formatted LogFields containing the given GeoIPData and APIParameters.
type APIParameterValidator ¶ added in v1.0.5
type APIParameterValidator func(APIParameters) error
APIParameterValidator is a function that validates API parameters for a particular request or context.
type APIParameters ¶ added in v1.0.5
type APIParameters map[string]interface{}
APIParameters is a set of API parameter values, typically received from a Psiphon client and used/logged by the Psiphon server. The values are of varying types: strings, ints, arrays, structs, etc.
type ActivityMonitoredConn ¶
ActivityMonitoredConn wraps a net.Conn, adding logic to deal with events triggered by I/O activity.
When an inactivity timeout is specified, the network I/O will timeout after the specified period of read inactivity. Optionally, for the purpose of inactivity only, ActivityMonitoredConn will also consider the connection active when data is written to it.
When a LRUConnsEntry is specified, then the LRU entry is promoted on either a successful read or write.
When an ActivityUpdater is set, then its UpdateActivity method is called on each read and write with the number of bytes transferred. The durationNanoseconds, which is the time since the last read, is reported only on reads.
func NewActivityMonitoredConn ¶
func NewActivityMonitoredConn( conn net.Conn, inactivityTimeout time.Duration, activeOnWrite bool, activityUpdater ActivityUpdater, lruEntry *LRUConnsEntry) (*ActivityMonitoredConn, error)
NewActivityMonitoredConn creates a new ActivityMonitoredConn.
func (*ActivityMonitoredConn) GetActiveDuration ¶
func (conn *ActivityMonitoredConn) GetActiveDuration() time.Duration
GetActiveDuration returns the time elapsed between the initialization of the ActivityMonitoredConn and the last Read. Only reads are used for this calculation since writes may succeed locally due to buffering.
func (*ActivityMonitoredConn) GetLastActivityMonotime ¶
func (conn *ActivityMonitoredConn) GetLastActivityMonotime() monotime.Time
GetLastActivityMonotime returns the arbitrary monotonic time of the last Read.
func (*ActivityMonitoredConn) GetStartTime ¶
func (conn *ActivityMonitoredConn) GetStartTime() time.Time
GetStartTime gets the time when the ActivityMonitoredConn was initialized. Reported time is UTC.
func (*ActivityMonitoredConn) IsClosed ¶
func (conn *ActivityMonitoredConn) IsClosed() bool
IsClosed implements the Closer iterface. The return value indicates whether the underlying conn has been closed.
type ActivityUpdater ¶
type ActivityUpdater interface {
UpdateProgress(bytesRead, bytesWritten int64, durationNanoseconds int64)
}
ActivityUpdater defines an interface for receiving updates for ActivityMonitoredConn activity. Values passed to UpdateProgress are bytes transferred and conn duration since the previous UpdateProgress.
type AuthenticatedDataPackage ¶
type AuthenticatedDataPackage struct { Data string `json:"data"` SigningPublicKeyDigest []byte `json:"signingPublicKeyDigest"` Signature []byte `json:"signature"` }
AuthenticatedDataPackage is a JSON record containing some Psiphon data payload, such as list of Psiphon server entries. As it may be downloaded from various sources, it is digitally signed so that the data may be authenticated.
type BuildInfo ¶
type BuildInfo struct { BuildDate string `json:"buildDate"` BuildRepo string `json:"buildRepo"` BuildRev string `json:"buildRev"` GoVersion string `json:"goVersion"` GomobileVersion string `json:"gomobileVersion,omitempty"` Dependencies json.RawMessage `json:"dependencies"` }
BuildInfo captures relevant build information here for use in clients or servers
func GetBuildInfo ¶
func GetBuildInfo() *BuildInfo
GetBuildInfo returns an instance of the BuildInfo struct
type Closer ¶
type Closer interface {
IsClosed() bool
}
Closer defines the interface to a type, typically a net.Conn, that can be closed.
type Conns ¶
type Conns struct {
// contains filtered or unexported fields
}
Conns is a synchronized list of Conns that is used to coordinate interrupting a set of goroutines establishing connections, or close a set of open connections, etc. Once the list is closed, no more items may be added to the list (unless it is reset).
type LRUConns ¶
type LRUConns struct {
// contains filtered or unexported fields
}
LRUConns is a concurrency-safe list of net.Conns ordered by recent activity. Its purpose is to facilitate closing the oldest connection in a set of connections.
New connections added are referenced by a LRUConnsEntry, which is used to Touch() active connections, which promotes them to the front of the order and to Remove() connections that are no longer LRU candidates.
CloseOldest() will remove the oldest connection from the list and call net.Conn.Close() on the connection.
After an entry has been removed, LRUConnsEntry Touch() and Remove() will have no effect.
func (*LRUConns) Add ¶
func (conns *LRUConns) Add(conn net.Conn) *LRUConnsEntry
Add inserts a net.Conn as the freshest connection in a LRUConns and returns an LRUConnsEntry to be used to freshen the connection or remove the connection from the LRU list.
func (*LRUConns) CloseOldest ¶
func (conns *LRUConns) CloseOldest()
CloseOldest closes the oldest connection in a LRUConns. It calls net.Conn.Close() on the connection.
type LRUConnsEntry ¶
type LRUConnsEntry struct {
// contains filtered or unexported fields
}
LRUConnsEntry is an entry in a LRUConns list.
func (*LRUConnsEntry) Remove ¶
func (entry *LRUConnsEntry) Remove()
Remove deletes the connection referenced by the LRUConnsEntry from the associated LRUConns. Has no effect if the entry was not initialized or previously removed.
func (*LRUConnsEntry) Touch ¶
func (entry *LRUConnsEntry) Touch()
Touch promotes the connection referenced by the LRUConnsEntry to the front of the associated LRUConns. Has no effect if the entry was not initialized or previously removed.
type LogContext ¶ added in v1.0.5
type LogContext interface { Debug(args ...interface{}) Info(args ...interface{}) Warning(args ...interface{}) Error(args ...interface{}) }
LogContext is interface-compatible with the return values from psiphon/server.ContextLogger.WithContext/WithContextFields.
type LogFields ¶ added in v1.0.5
type LogFields map[string]interface{}
LogFields is type-compatible with psiphon/server.LogFields and logrus.LogFields.
type Logger ¶ added in v1.0.5
type Logger interface { WithContext() LogContext WithContextFields(fields LogFields) LogContext LogMetric(metric string, fields LogFields) }
Logger exposes a logging interface that's compatible with psiphon/server.ContextLogger. This interface allows packages to implement logging that will integrate with psiphon/server without importing that package. Other implementations of Logger may also be provided.
type RateLimits ¶
type RateLimits struct { // ReadUnthrottledBytes specifies the number of bytes to // read, approximately, before starting rate limiting. ReadUnthrottledBytes int64 // ReadBytesPerSecond specifies a rate limit for read // data transfer. The default, 0, is no limit. ReadBytesPerSecond int64 // WriteUnthrottledBytes specifies the number of bytes to // write, approximately, before starting rate limiting. WriteUnthrottledBytes int64 // WriteBytesPerSecond specifies a rate limit for write // data transfer. The default, 0, is no limit. WriteBytesPerSecond int64 // CloseAfterExhausted indicates that the underlying // net.Conn should be closed once either the read or // write unthrottled bytes have been exhausted. In this // case, throttling is never applied. CloseAfterExhausted bool }
RateLimits specify the rate limits for a ThrottledConn.
type ReloadableFile ¶
ReloadableFile is a file-backed Reloader. This type is intended to be embedded in other types that add the actual reloadable data structures.
ReloadableFile has a multi-reader mutex for synchronization. Its Reload() function will obtain a write lock before reloading the data structures. The actual reloading action is to be provided via the reloadAction callback, which receives the content of reloaded files and must process the new data (for example, unmarshall the contents into data structures). All read access to the data structures should be guarded by RLocks on the ReloadableFile mutex.
reloadAction must ensure that data structures revert to their previous state when a reload fails.
func NewReloadableFile ¶
func NewReloadableFile( fileName string, reloadAction func([]byte) error) ReloadableFile
NewReloadableFile initializes a new ReloadableFile
func (*ReloadableFile) LogDescription ¶
func (reloadable *ReloadableFile) LogDescription() string
func (*ReloadableFile) Reload ¶
func (reloadable *ReloadableFile) Reload() (bool, error)
Reload checks if the underlying file has changed and, when changed, invokes the reloadAction callback which should reload the in-memory data structures.
In some case (e.g., traffic rules and OSL), there are penalties associated with proceeding with reload, so care is taken to not invoke the reload action unless the contents have changed.
The file content is loaded and a checksum is taken to determine whether it has changed. Neither file size (may not change when content changes) nor modified date (may change when identical file is repaved) is a sufficient indicator.
All data structure readers should be blocked by the ReloadableFile mutex.
Reload must not be called from multiple concurrent goroutines.
func (*ReloadableFile) WillReload ¶
func (reloadable *ReloadableFile) WillReload() bool
WillReload indicates whether the ReloadableFile is capable of reloading.
type Reloader ¶
type Reloader interface { // Reload reloads the data object. Reload returns a flag indicating if the // reloadable target has changed and reloaded or remains unchanged. By // convention, when reloading fails the Reloader should revert to its previous // in-memory state. Reload() (bool, error) // WillReload indicates if the data object is capable of reloading. WillReload() bool // LogDescription returns a description to be used for logging // events related to the Reloader. LogDescription() string }
Reloader represents a read-only, in-memory reloadable data object. For example, a JSON data file that is loaded into memory and accessed for read-only lookups; and from time to time may be reloaded from the same file, updating the memory copy.
type SubnetLookup ¶
SubnetLookup provides an efficient lookup for individual IPv4 addresses within a list of subnets.
func NewSubnetLookup ¶
func NewSubnetLookup(CIDRs []string) (SubnetLookup, error)
NewSubnetLookup creates a SubnetLookup from a list of subnet CIDRs.
func NewSubnetLookupFromRoutes ¶
func NewSubnetLookupFromRoutes(routesData []byte) (SubnetLookup, error)
NewSubnetLookupFromRoutes creates a SubnetLookup from text routes data. The input format is expected to be text lines where each line is, e.g., "1.2.3.0\t255.255.255.0\n"
func (SubnetLookup) ContainsIPAddress ¶
func (lookup SubnetLookup) ContainsIPAddress(addr net.IP) bool
ContainsIPAddress performs a binary search on the sorted subnet list to find a network containing the candidate IP address.
func (SubnetLookup) Less ¶
func (lookup SubnetLookup) Less(i, j int) bool
Less implements Sort.Interface
type ThrottledConn ¶
ThrottledConn wraps a net.Conn with read and write rate limiters. Rates are specified as bytes per second. Optional unlimited byte counts allow for a number of bytes to read or write before applying rate limiting. Specify limit values of 0 to set no rate limit (unlimited counts are ignored in this case). The underlying rate limiter uses the token bucket algorithm to calculate delay times for read and write operations.
func NewThrottledConn ¶
func NewThrottledConn(conn net.Conn, limits RateLimits) *ThrottledConn
NewThrottledConn initializes a new ThrottledConn.
func (*ThrottledConn) SetLimits ¶
func (conn *ThrottledConn) SetLimits(limits RateLimits)
SetLimits modifies the rate limits of an existing ThrottledConn. It is safe to call SetLimits while other goroutines are calling Read/Write. This function will not block, and the new rate limits will be applied within Read/Write, but not necessarily until some further I/O at previous rates.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package accesscontrol implements an access control authorization scheme based on digital signatures.
|
Package accesscontrol implements an access control authorization scheme based on digital signatures. |
crypto
|
|
acme
Package acme provides an implementation of the Automatic Certificate Management Environment (ACME) spec.
|
Package acme provides an implementation of the Automatic Certificate Management Environment (ACME) spec. |
acme/autocert
Package autocert provides automatic access to certificates from Let's Encrypt and any other ACME-based CA.
|
Package autocert provides automatic access to certificates from Let's Encrypt and any other ACME-based CA. |
bcrypt
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm.
|
Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing algorithm. |
blake2b
Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xb.
|
Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xb. |
blake2s
Package blake2s implements the BLAKE2s hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xs.
|
Package blake2s implements the BLAKE2s hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xs. |
blowfish
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
|
Package blowfish implements Bruce Schneier's Blowfish encryption algorithm. |
bn256
Package bn256 implements a particular bilinear group at the 128-bit security level.
|
Package bn256 implements a particular bilinear group at the 128-bit security level. |
cast5
Package cast5 implements CAST5, as defined in RFC 2144.
|
Package cast5 implements CAST5, as defined in RFC 2144. |
chacha20poly1305
Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539.
|
Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539. |
chacha20poly1305/internal/chacha20
Package ChaCha20 implements the core ChaCha20 function as specified in https://tools.ietf.org/html/rfc7539#section-2.3.
|
Package ChaCha20 implements the core ChaCha20 function as specified in https://tools.ietf.org/html/rfc7539#section-2.3. |
cryptobyte
Package cryptobyte implements building and parsing of byte strings for DER-encoded ASN.1 and TLS messages.
|
Package cryptobyte implements building and parsing of byte strings for DER-encoded ASN.1 and TLS messages. |
curve25519
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519.
|
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519. |
ed25519
Package ed25519 implements the Ed25519 signature algorithm.
|
Package ed25519 implements the Ed25519 signature algorithm. |
hkdf
Package hkdf implements the HMAC-based Extract-and-Expand Key Derivation Function (HKDF) as defined in RFC 5869.
|
Package hkdf implements the HMAC-based Extract-and-Expand Key Derivation Function (HKDF) as defined in RFC 5869. |
md4
Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
|
Package md4 implements the MD4 hash algorithm as defined in RFC 1320. |
nacl/box
Package box authenticates and encrypts messages using public-key cryptography.
|
Package box authenticates and encrypts messages using public-key cryptography. |
nacl/secretbox
Package secretbox encrypts and authenticates small messages.
|
Package secretbox encrypts and authenticates small messages. |
ocsp
Package ocsp parses OCSP responses as specified in RFC 2560.
|
Package ocsp parses OCSP responses as specified in RFC 2560. |
openpgp
Package openpgp implements high level operations on OpenPGP messages.
|
Package openpgp implements high level operations on OpenPGP messages. |
openpgp/armor
Package armor implements OpenPGP ASCII Armor, see RFC 4880.
|
Package armor implements OpenPGP ASCII Armor, see RFC 4880. |
openpgp/clearsign
Package clearsign generates and processes OpenPGP, clear-signed data.
|
Package clearsign generates and processes OpenPGP, clear-signed data. |
openpgp/elgamal
Package elgamal implements ElGamal encryption, suitable for OpenPGP, as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms," IEEE Transactions on Information Theory, v.
|
Package elgamal implements ElGamal encryption, suitable for OpenPGP, as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms," IEEE Transactions on Information Theory, v. |
openpgp/errors
Package errors contains common error types for the OpenPGP packages.
|
Package errors contains common error types for the OpenPGP packages. |
openpgp/packet
Package packet implements parsing and serialization of OpenPGP packets, as specified in RFC 4880.
|
Package packet implements parsing and serialization of OpenPGP packets, as specified in RFC 4880. |
openpgp/s2k
Package s2k implements the various OpenPGP string-to-key transforms as specified in RFC 4800 section 3.7.1.
|
Package s2k implements the various OpenPGP string-to-key transforms as specified in RFC 4800 section 3.7.1. |
otr
Package otr implements the Off The Record protocol as specified in http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html
|
Package otr implements the Off The Record protocol as specified in http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html |
pbkdf2
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
|
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0. |
pkcs12
Package pkcs12 implements some of PKCS#12.
|
Package pkcs12 implements some of PKCS#12. |
pkcs12/internal/rc2
Package rc2 implements the RC2 cipher
|
Package rc2 implements the RC2 cipher |
poly1305
Package poly1305 implements Poly1305 one-time message authentication code as specified in https://cr.yp.to/mac/poly1305-20050329.pdf.
|
Package poly1305 implements Poly1305 one-time message authentication code as specified in https://cr.yp.to/mac/poly1305-20050329.pdf. |
ripemd160
Package ripemd160 implements the RIPEMD-160 hash algorithm.
|
Package ripemd160 implements the RIPEMD-160 hash algorithm. |
salsa20
Package salsa20 implements the Salsa20 stream cipher as specified in https://cr.yp.to/snuffle/spec.pdf.
|
Package salsa20 implements the Salsa20 stream cipher as specified in https://cr.yp.to/snuffle/spec.pdf. |
salsa20/salsa
Package salsa provides low-level access to functions in the Salsa family.
|
Package salsa provides low-level access to functions in the Salsa family. |
scrypt
Package scrypt implements the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf).
|
Package scrypt implements the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf). |
sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
|
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. |
ssh
Package ssh implements an SSH client and server.
|
Package ssh implements an SSH client and server. |
ssh/agent
Package agent implements the ssh-agent protocol, and provides both a client and a server.
|
Package agent implements the ssh-agent protocol, and provides both a client and a server. |
ssh/knownhosts
Package knownhosts implements a parser for the OpenSSH known_hosts host key database.
|
Package knownhosts implements a parser for the OpenSSH known_hosts host key database. |
ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
|
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems. |
ssh/test
This package contains integration tests for the github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/crypto/ssh package.
|
This package contains integration tests for the github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/crypto/ssh package. |
twofish
Package twofish implements Bruce Schneier's Twofish encryption algorithm.
|
Package twofish implements Bruce Schneier's Twofish encryption algorithm. |
xtea
Package xtea implements XTEA encryption, as defined in Needham and Wheeler's 1997 technical report, "Tea extensions."
|
Package xtea implements XTEA encryption, as defined in Needham and Wheeler's 1997 technical report, "Tea extensions." |
xts
Package xts implements the XTS cipher mode as specified in IEEE P1619/D16.
|
Package xts implements the XTS cipher mode as specified in IEEE P1619/D16. |
Package osl implements the Obfuscated Server List (OSL) mechanism.
|
Package osl implements the Obfuscated Server List (OSL) mechanism. |
Package parameters implements dynamic, concurrency-safe parameters that determine Psiphon client behavior.
|
Package parameters implements dynamic, concurrency-safe parameters that determine Psiphon client behavior. |
Package sss implements Shamir's Secret Sharing algorithm over GF(2^8).
|
Package sss implements Shamir's Secret Sharing algorithm over GF(2^8). |
Package tactics provides dynamic Psiphon client configuration based on GeoIP attributes, API parameters, and speed test data.
|
Package tactics provides dynamic Psiphon client configuration based on GeoIP attributes, API parameters, and speed test data. |
Package tun is an IP packet tunnel server and client.
|
Package tun is an IP packet tunnel server and client. |
Package wildcard implements a very simple wildcard matcher which supports only the term '*', which matches any sequence of characters.
|
Package wildcard implements a very simple wildcard matcher which supports only the term '*', which matches any sequence of characters. |