Documentation ¶
Overview ¶
Package hkex - an experimental key exchange algorithm by Omar Alejandro Herrera Reyna.
(https://github.com/Caume/HerraduraKEx)
The core HerraduraKEx algorithm is dual-licensed by the author (Omar Alejandro Herrera Reyna) under GPL3 and MIT licenses. See LICENSE.gpl and LICENSE.mit in this distribution
Go implementation Copyright (c) 2017-2018 Russell Magee (rmagee_at_gmail_com) Licensed under the terms of the MIT license See LICENSE.mit in this distribution
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HerraduraKEx ¶
type HerraduraKEx struct {
// contains filtered or unexported fields
}
HerraduraKEx holds the session state for a key exchange.
func New ¶
func New(i int, p int) (h *HerraduraKEx)
New returns a HerraduraKEx struct.
i - internal (private) random nonce p - public (exchanged) random nonce (typically 1/4 bitsize of i) If i or p are passed as zero, they will default to 256 and 64, respectively.
func (*HerraduraKEx) ComputeFA ¶
func (h *HerraduraKEx) ComputeFA()
ComputeFA computes the FA value, which must be sent to peer for KEx.
func (HerraduraKEx) D ¶
func (h HerraduraKEx) D() *big.Int
D returns the D (FSCX Revolved) value, input to generate FA (the value for peer KEx)
func (*HerraduraKEx) SetPeerD ¶
func (h *HerraduraKEx) SetPeerD(pd *big.Int)
SetPeerD stores the received peer's D value (contents, not ptr)
func (*HerraduraKEx) String ¶
func (h *HerraduraKEx) String() string
Output HerraduraKEx type value as a string. Implements Stringer interface.