Documentation ¶
Index ¶
- Constants
- Variables
- func CreateCipher(key []byte) cipher.Block
- func CreateStream(keys SharedKeys, conn connection.PlainConnection) connection.PacketStream
- func GenerateKeysFromPrivate(private *big.Int, nonce []byte) *rsaKeys
- func Powm(base, exp, modulus *big.Int) *big.Int
- func RandomVec(count int) []byte
- type BlockDecrypter
- type Keys
- type SharedKeys
Constants ¶
View Source
const FOLD int = 16
View Source
const KEYP int = 13
View Source
const N int = 16
Variables ¶
View Source
var AUDIO_AESIV = []byte{0x72, 0xe0, 0x67, 0xfb, 0xdd, 0xcb, 0xcf, 0x77, 0xeb, 0xe8, 0xbc, 0x64, 0x3f, 0x63, 0x0d, 0x93}
Functions ¶
func CreateCipher ¶
func CreateStream ¶
func CreateStream(keys SharedKeys, conn connection.PlainConnection) connection.PacketStream
CreateStream initializes a new Shannon-encrypted PacketStream connection from the specified keys and plain connection
func GenerateKeysFromPrivate ¶
Types ¶
type BlockDecrypter ¶
type BlockDecrypter struct {
// contains filtered or unexported fields
}
func (*BlockDecrypter) DecryptSegment ¶
type Keys ¶
type Keys interface { PubKey() []byte PrivateKey() *big.Int Prime() *big.Int ClientNonce() []byte AddRemoteKey(remote []byte, clientPacket []byte, serverPacket []byte) SharedKeys }
func GenerateKeys ¶
func GenerateKeys() Keys
type SharedKeys ¶
type SharedKeys struct {}
Click to show internal directories.
Click to hide internal directories.