Documentation ¶
Index ¶
- Constants
- type KX
- func (kx *KX) Bytes() (bytes []byte, err error)
- func (kx *KX) IsPrivateKey() (p bool)
- func (kx *KX) IsPublicKey() (p bool)
- func (kx *KX) KeyType() (kxt shared.KeyXType)
- func (kx *KX) Length() (length int)
- func (kx *KX) PublicKey() (kxPub shared.KeyExchange)
- func (kx *KX) PublicKeyInstance() (pubkey []byte)
- func (kx *KX) SharedSecret(kxPub shared.KeyExchange) (sharedsecret []byte, err error)
- func (kx *KX) String() (str string)
Constants ¶
View Source
const ( // TypeECDHPriv256 - identifier to be appended at the start of Bytes() to distinguish it as a ECDH-256 private key TypeECDHPriv256 uint8 = 211 // TypeECDHPub256 - identifier to be appended at the start of Bytes() to distinguish it as a ECDH-256 public key TypeECDHPub256 uint8 = 212 // TypeECDHPriv384 - identifier to be appended at the start of Bytes() to distinguish it as a ECDH-384 private key TypeECDHPriv384 uint8 = 213 // TypeECDHPub384 - identifier to be appended at the start of Bytes() to distinguish it as a ECDH-384 public key TypeECDHPub384 uint8 = 214 // TypeECDHPriv521 - identifier to be appended at the start of Bytes() to distinguish it as a ECDH-521 private key TypeECDHPriv521 uint8 = 215 // TypeECDHPub521 - identifier to be appended at the start of Bytes() to distinguish it as a ECDH-521 public key TypeECDHPub521 uint8 = 216 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KX ¶
type KX struct {
// contains filtered or unexported fields
}
func Generate ¶
Generate - generates a new EC Diffie Hellman public/private key from existing ECDSA keys
func (*KX) IsPrivateKey ¶
IsPrivateKey - returns if K is a private key instance
func (*KX) IsPublicKey ¶
IsPublicKey - returns if K is a public key instance
func (*KX) PublicKey ¶
func (kx *KX) PublicKey() (kxPub shared.KeyExchange)
PublicKey - returns instance of public key of type Key Exchange
func (*KX) PublicKeyInstance ¶
PublicKeyInstance - returns actual instance of public key of type
func (*KX) SharedSecret ¶
func (kx *KX) SharedSecret(kxPub shared.KeyExchange) (sharedsecret []byte, err error)
PublicKey - returns instance of public key of type Key Exchange
Click to show internal directories.
Click to hide internal directories.