Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key interface { Bytes() (bytes []byte, err error) String() (str string) PublicKey() (kPub Key, err error) PrivateKeyInstance() (privKey interface{}) PublicKeyInstance() (pubKey interface{}) IsPrivateKey() (p bool) IsPublicKey() (p bool) KeyType() (kt KeyType) Sign(hashed []byte) (signed []byte, err error) Verify(signed []byte, hashed []byte) (ok bool) MarshalJSON() (bytes []byte, err error) }
Key - interface for different types of asymetric keys
type KeyExchange ¶
type KeyExchange interface { Bytes() (bytes []byte, err error) String() (str string) PublicKey() (kxPub KeyExchange) PublicKeyInstance() (pubKey []byte) IsPrivateKey() (p bool) IsPublicKey() (p bool) KeyType() (kxt KeyXType) Length() (length int) }
KeyExchange - interface for different types key exchange
type KeyType ¶
type KeyType uint8 // new type to define key types to be generated
const ( Unknown KeyType = iota // ED25519 - generates an ED25519 256 bit key ED25519 // ECDSA256 - generate an ECDSA 256 bit key ECDSA256 // ECDSA384 - generate an ECDSA 384 bit key ECDSA384 // ECDSA521 - generate an ECDSA 512 bit key ECDSA521 // RSA2048 - generate an RSA 2048 bit key RSA2048 // RSA4096 - generate an RSA 4096 bit key RSA4096 // RSA4096 - generate an RSA 4096 bit key RSA8192 )
type KeyXType ¶
type KeyXType uint8 // new type to define key exchanges to be generated
const ( // CURVE25519 - generates a Curve25519 key exchange CURVE25519 KeyXType = iota + 101 // ECDH256 - generates a EC Diffie-Hellman 256-bit key exchange ECDH256 // ECDH384 - generates a EC Diffie-Hellman 384-bit key exchange ECDH384 // ECDH521 - generates a EC Diffie-Hellman 521-bit key exchange ECDH521 )
Click to show internal directories.
Click to hide internal directories.