Documentation
¶
Index ¶
- Constants
- type CheckSessionKeyMessage
- type EllipticCurve
- type HashFnType
- type JPake
- func (jp *JPake) CheckReceivedSessionKeyMsg(jsonMsgfromB []byte) bool
- func (jp *JPake) ComputeCheckSessionKeyMsg() ([]byte, error)
- func (jp *JPake) ComputeSharedKey(jsonMsgfromB []byte) ([]byte, error)
- func (jp *JPake) GetRound1Message() ([]byte, error)
- func (jp *JPake) GetRound2Message(jsonMsgfromB []byte) ([]byte, error)
- func (jp *JPake) SessionKey() ([]byte, error)
- func (jp *JPake) SetRandomState(x1 *big.Int, x2 *big.Int)
- type KDFType
- type Round1Message
- type Round2Message
- type ZKPMsg
Constants ¶
View Source
const ( JPAKESTATE_INITIALISED = iota JPAKESTATE_WAITFORROUND1MSG JPAKESTATE_WAITFORROUND2MSG JPAKESTATE_KEYCOMPUTED )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckSessionKeyMessage ¶
type CheckSessionKeyMessage struct {
SessionKey string `json:"SessionKey"`
}
type EllipticCurve ¶
type EllipticCurve interface { Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) ScalarBaseMult(k []byte) (*big.Int, *big.Int) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.Int) IsOnCurve(x, y *big.Int) bool Params() *elliptic.CurveParams }
EllipticCurve is a general curve which allows other elliptic curves to be used with PAKE.
type HashFnType ¶
type JPake ¶
type JPake struct {
// contains filtered or unexported fields
}
func InitWithCurve ¶
func InitWithCurve(pw string, curve EllipticCurve) (*JPake, error)
func InitWithCurveAndHashFns ¶
func InitWithCurveAndHashFns(pw string, curve EllipticCurve, hashFn HashFnType, kdf KDFType) (*JPake, error)
func (*JPake) CheckReceivedSessionKeyMsg ¶
func (*JPake) ComputeCheckSessionKeyMsg ¶
func (*JPake) ComputeSharedKey ¶
func (*JPake) GetRound1Message ¶
func (*JPake) GetRound2Message ¶
func (*JPake) SessionKey ¶
type Round1Message ¶
type Round2Message ¶
Click to show internal directories.
Click to hide internal directories.