Documentation
¶
Overview ¶
Package transport is the Secret Service's secret transports, the encryption both ends of a session agree on: plain, and the DH session over the 1024-bit MODP group with HKDF-SHA256 and AES-128-CBC.
Index ¶
Constants ¶
const ( AlgPlain = "plain" AlgDH = "dh-ietf1024-sha256-aes128-cbc-pkcs7" )
The algorithms OpenSession negotiates.
const MaxSecretLen = 1 << 27
MaxSecretLen is the longest secret a transport carries, the D-Bus specification's maximum message length: no longer secret fits in the message that carries it.
const PrimeLen = 128
PrimeLen is the prime's length in bytes, the shared secret's padded encoding.
Variables ¶
var Generator = big.NewInt(2)
Generator is the group's generator.
var Prime, _ = new(big.Int).SetString(
"FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"+
"29024E088A67CC74020BBEA63B139B22514A08798E3404DD"+
"EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"+
"E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"+
"EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381"+
"FFFFFFFFFFFFFFFF", 16)
Prime is the 1024-bit MODP group of RFC 2409 §6.2 (Oakley group 2), generator Generator, the group the spec names for its DH transport.
Functions ¶
This section is empty.
Types ¶
type AES ¶
type AES struct {
// contains filtered or unexported fields
}
AES is the DH session: AES-128-CBC with PKCS#7 padding under the HKDF-SHA256 of the shared secret, a fresh IV per secret as its parameters.
func NewAES ¶
NewAES derives the session from the shared secret padded to PrimeLen, with HKDF-SHA256, no salt and no info.