Documentation
¶
Overview ¶
This file is part of secretstream.
secretstream is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
secretstream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with secretstream. If not, see <http://www.gnu.org/licenses/>.
This file is part of secretstream.
secretstream is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
secretstream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with secretstream. If not, see <http://www.gnu.org/licenses/>.
This file is part of secretstream.
secretstream is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
secretstream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with secretstream. If not, see <http://www.gnu.org/licenses/>.
Index ¶
Constants ¶
const ChallengeLength = 64
ChallengeLength is the length of a challenge message in bytes
const ClientAuthLength = 16 + 32 + 64
ClientAuthLength is the length of a clientAuth message in bytes
const MACLength = 16
MACLength is the length of a MAC in bytes
const ServerAuthLength = 16 + 64
ServerAuthLength is the length of a serverAuth message in bytes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CurveKeyPair ¶
CurveKeyPair is a keypair for use with github.com/agl/ed25519
type EdKeyPair ¶
type EdKeyPair struct { Public [ed25519.PublicKeySize]byte Secret [ed25519.PrivateKeySize]byte }
EdKeyPair is a keypair for use with github.com/agl/ed25519
func GenEdKeyPair ¶
GenEdKeyPair generates a ed25519 keyPair using the passed reader if r == nil it uses crypto/rand.Reader
func LoadSSBKeyPair ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
State is the state each peer holds during the handshake
func NewClientState ¶
func NewClientState(appKey []byte, local EdKeyPair, remotePublic [ed25519.PublicKeySize]byte) (*State, error)
NewClientState initializes the state for the client side
func NewServerState ¶
NewServerState initializes the state for the server side
func (*State) GetBoxstreamDecKeys ¶
GetBoxstreamDecKeys returns the decryption key and nonce suitable for boxstream
func (*State) GetBoxstreamEncKeys ¶
GetBoxstreamEncKeys returns the encryption key and nonce suitable for boxstream