Documentation ¶
Overview ¶
Package ciphersuite provides TLS Ciphers as registered with the IANA https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4
Index ¶
- type Aes128Ccm
- func (c *Aes128Ccm) AuthenticationType() AuthenticationType
- func (c *Aes128Ccm) CertificateType() clientcertificate.Type
- func (c *Aes128Ccm) Decrypt(raw []byte) ([]byte, error)
- func (c *Aes128Ccm) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
- func (c *Aes128Ccm) HashFunc() func() hash.Hash
- func (c *Aes128Ccm) ID() ID
- func (c *Aes128Ccm) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error
- func (c *Aes128Ccm) IsInitialized() bool
- func (c *Aes128Ccm) String() string
- type AuthenticationType
- type ID
- type TLSEcdheEcdsaWithAes128GcmSha256
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) AuthenticationType() AuthenticationType
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) CertificateType() clientcertificate.Type
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) Decrypt(raw []byte) ([]byte, error)
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) HashFunc() func() hash.Hash
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) ID() ID
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) IsInitialized() bool
- func (c *TLSEcdheEcdsaWithAes128GcmSha256) String() string
- type TLSEcdheEcdsaWithAes256CbcSha
- func (c *TLSEcdheEcdsaWithAes256CbcSha) AuthenticationType() AuthenticationType
- func (c *TLSEcdheEcdsaWithAes256CbcSha) CertificateType() clientcertificate.Type
- func (c *TLSEcdheEcdsaWithAes256CbcSha) Decrypt(raw []byte) ([]byte, error)
- func (c *TLSEcdheEcdsaWithAes256CbcSha) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
- func (c *TLSEcdheEcdsaWithAes256CbcSha) HashFunc() func() hash.Hash
- func (c *TLSEcdheEcdsaWithAes256CbcSha) ID() ID
- func (c *TLSEcdheEcdsaWithAes256CbcSha) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error
- func (c *TLSEcdheEcdsaWithAes256CbcSha) IsInitialized() bool
- func (c *TLSEcdheEcdsaWithAes256CbcSha) String() string
- type TLSEcdheRsaWithAes128GcmSha256
- type TLSEcdheRsaWithAes256CbcSha
- type TLSPskWithAes128CbcSha256
- func (c *TLSPskWithAes128CbcSha256) AuthenticationType() AuthenticationType
- func (c *TLSPskWithAes128CbcSha256) CertificateType() clientcertificate.Type
- func (c *TLSPskWithAes128CbcSha256) Decrypt(raw []byte) ([]byte, error)
- func (c *TLSPskWithAes128CbcSha256) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
- func (c *TLSPskWithAes128CbcSha256) HashFunc() func() hash.Hash
- func (c *TLSPskWithAes128CbcSha256) ID() ID
- func (c *TLSPskWithAes128CbcSha256) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error
- func (c *TLSPskWithAes128CbcSha256) IsInitialized() bool
- func (c *TLSPskWithAes128CbcSha256) String() string
- type TLSPskWithAes128GcmSha256
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aes128Ccm ¶
type Aes128Ccm struct {
// contains filtered or unexported fields
}
Aes128Ccm is a base class used by multiple AES-CCM Ciphers
func NewTLSEcdheEcdsaWithAes128Ccm ¶
func NewTLSEcdheEcdsaWithAes128Ccm() *Aes128Ccm
NewTLSEcdheEcdsaWithAes128Ccm constructs a TLS_ECDHE_ECDSA_WITH_AES_128_CCM Cipher
func NewTLSEcdheEcdsaWithAes128Ccm8 ¶
func NewTLSEcdheEcdsaWithAes128Ccm8() *Aes128Ccm
NewTLSEcdheEcdsaWithAes128Ccm8 creates a new TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 CipherSuite
func NewTLSPskWithAes128Ccm ¶
func NewTLSPskWithAes128Ccm() *Aes128Ccm
NewTLSPskWithAes128Ccm returns the TLS_PSK_WITH_AES_128_CCM CipherSuite
func NewTLSPskWithAes128Ccm8 ¶
func NewTLSPskWithAes128Ccm8() *Aes128Ccm
NewTLSPskWithAes128Ccm8 returns the TLS_PSK_WITH_AES_128_CCM_8 CipherSuite
func (*Aes128Ccm) AuthenticationType ¶
func (c *Aes128Ccm) AuthenticationType() AuthenticationType
AuthenticationType controls what authentication method is using during the handshake
func (*Aes128Ccm) CertificateType ¶
func (c *Aes128Ccm) CertificateType() clientcertificate.Type
CertificateType returns what type of certificate this CipherSuite exchanges
func (*Aes128Ccm) Encrypt ¶
func (c *Aes128Ccm) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
Encrypt encrypts a single TLS RecordLayer
func (*Aes128Ccm) IsInitialized ¶
IsInitialized returns if the CipherSuite has keying material and can encrypt/decrypt packets
type AuthenticationType ¶
type AuthenticationType int
AuthenticationType controls what authentication method is using during the handshake
const ( AuthenticationTypeCertificate AuthenticationType = iota + 1 AuthenticationTypeAnonymous )
AuthenticationType Enums
type ID ¶
type ID uint16
ID is an ID for our supported CipherSuites
const ( // AES-128-CCM TLS_ECDHE_ECDSA_WITH_AES_128_CCM ID = 0xc0ac //nolint:golint,stylecheck TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ID = 0xc0ae //nolint:golint,stylecheck // AES-128-GCM-SHA256 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ID = 0xc02b //nolint:golint,stylecheck TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ID = 0xc02f //nolint:golint,stylecheck // AES-256-CBC-SHA TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA ID = 0xc00a //nolint:golint,stylecheck TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA ID = 0xc014 //nolint:golint,stylecheck TLS_PSK_WITH_AES_128_CCM ID = 0xc0a4 //nolint:golint,stylecheck TLS_PSK_WITH_AES_128_CCM_8 ID = 0xc0a8 //nolint:golint,stylecheck TLS_PSK_WITH_AES_128_GCM_SHA256 ID = 0x00a8 //nolint:golint,stylecheck TLS_PSK_WITH_AES_128_CBC_SHA256 ID = 0x00ae //nolint:golint,stylecheck )
Supported Cipher Suites
type TLSEcdheEcdsaWithAes128GcmSha256 ¶
type TLSEcdheEcdsaWithAes128GcmSha256 struct {
// contains filtered or unexported fields
}
TLSEcdheEcdsaWithAes128GcmSha256 represents a TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 CipherSuite
func (*TLSEcdheEcdsaWithAes128GcmSha256) AuthenticationType ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) AuthenticationType() AuthenticationType
AuthenticationType controls what authentication method is using during the handshake
func (*TLSEcdheEcdsaWithAes128GcmSha256) CertificateType ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) CertificateType() clientcertificate.Type
CertificateType returns what type of certficate this CipherSuite exchanges
func (*TLSEcdheEcdsaWithAes128GcmSha256) Decrypt ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) Decrypt(raw []byte) ([]byte, error)
Decrypt decrypts a single TLS RecordLayer
func (*TLSEcdheEcdsaWithAes128GcmSha256) Encrypt ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
Encrypt encrypts a single TLS RecordLayer
func (*TLSEcdheEcdsaWithAes128GcmSha256) HashFunc ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) HashFunc() func() hash.Hash
HashFunc returns the hashing func for this CipherSuite
func (*TLSEcdheEcdsaWithAes128GcmSha256) ID ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) ID() ID
ID returns the ID of the CipherSuite
func (*TLSEcdheEcdsaWithAes128GcmSha256) Init ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error
Init initializes the internal Cipher with keying material
func (*TLSEcdheEcdsaWithAes128GcmSha256) IsInitialized ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) IsInitialized() bool
IsInitialized returns if the CipherSuite has keying material and can encrypt/decrypt packets
func (*TLSEcdheEcdsaWithAes128GcmSha256) String ¶
func (c *TLSEcdheEcdsaWithAes128GcmSha256) String() string
type TLSEcdheEcdsaWithAes256CbcSha ¶
type TLSEcdheEcdsaWithAes256CbcSha struct {
// contains filtered or unexported fields
}
TLSEcdheEcdsaWithAes256CbcSha represents a TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA CipherSuite
func (*TLSEcdheEcdsaWithAes256CbcSha) AuthenticationType ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) AuthenticationType() AuthenticationType
AuthenticationType controls what authentication method is using during the handshake
func (*TLSEcdheEcdsaWithAes256CbcSha) CertificateType ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) CertificateType() clientcertificate.Type
CertificateType returns what type of certficate this CipherSuite exchanges
func (*TLSEcdheEcdsaWithAes256CbcSha) Decrypt ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) Decrypt(raw []byte) ([]byte, error)
Decrypt decrypts a single TLS RecordLayer
func (*TLSEcdheEcdsaWithAes256CbcSha) Encrypt ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
Encrypt encrypts a single TLS RecordLayer
func (*TLSEcdheEcdsaWithAes256CbcSha) HashFunc ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) HashFunc() func() hash.Hash
HashFunc returns the hashing func for this CipherSuite
func (*TLSEcdheEcdsaWithAes256CbcSha) ID ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) ID() ID
ID returns the ID of the CipherSuite
func (*TLSEcdheEcdsaWithAes256CbcSha) Init ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error
Init initializes the internal Cipher with keying material
func (*TLSEcdheEcdsaWithAes256CbcSha) IsInitialized ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) IsInitialized() bool
IsInitialized returns if the CipherSuite has keying material and can encrypt/decrypt packets
func (*TLSEcdheEcdsaWithAes256CbcSha) String ¶
func (c *TLSEcdheEcdsaWithAes256CbcSha) String() string
type TLSEcdheRsaWithAes128GcmSha256 ¶
type TLSEcdheRsaWithAes128GcmSha256 struct {
TLSEcdheEcdsaWithAes128GcmSha256
}
TLSEcdheRsaWithAes128GcmSha256 implements the TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 CipherSuite
func (*TLSEcdheRsaWithAes128GcmSha256) CertificateType ¶
func (c *TLSEcdheRsaWithAes128GcmSha256) CertificateType() clientcertificate.Type
CertificateType returns what type of certificate this CipherSuite exchanges
func (*TLSEcdheRsaWithAes128GcmSha256) ID ¶
func (c *TLSEcdheRsaWithAes128GcmSha256) ID() ID
ID returns the ID of the CipherSuite
func (*TLSEcdheRsaWithAes128GcmSha256) String ¶
func (c *TLSEcdheRsaWithAes128GcmSha256) String() string
type TLSEcdheRsaWithAes256CbcSha ¶
type TLSEcdheRsaWithAes256CbcSha struct {
TLSEcdheEcdsaWithAes256CbcSha
}
TLSEcdheRsaWithAes256CbcSha implements the TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA CipherSuite
func (*TLSEcdheRsaWithAes256CbcSha) CertificateType ¶
func (c *TLSEcdheRsaWithAes256CbcSha) CertificateType() clientcertificate.Type
CertificateType returns what type of certificate this CipherSuite exchanges
func (*TLSEcdheRsaWithAes256CbcSha) ID ¶
func (c *TLSEcdheRsaWithAes256CbcSha) ID() ID
ID returns the ID of the CipherSuite
func (*TLSEcdheRsaWithAes256CbcSha) String ¶
func (c *TLSEcdheRsaWithAes256CbcSha) String() string
type TLSPskWithAes128CbcSha256 ¶
type TLSPskWithAes128CbcSha256 struct {
// contains filtered or unexported fields
}
TLSPskWithAes128CbcSha256 implements the TLS_PSK_WITH_AES_128_CBC_SHA256 CipherSuite
func (*TLSPskWithAes128CbcSha256) AuthenticationType ¶
func (c *TLSPskWithAes128CbcSha256) AuthenticationType() AuthenticationType
AuthenticationType controls what authentication method is using during the handshake
func (*TLSPskWithAes128CbcSha256) CertificateType ¶
func (c *TLSPskWithAes128CbcSha256) CertificateType() clientcertificate.Type
CertificateType returns what type of certificate this CipherSuite exchanges
func (*TLSPskWithAes128CbcSha256) Decrypt ¶
func (c *TLSPskWithAes128CbcSha256) Decrypt(raw []byte) ([]byte, error)
Decrypt decrypts a single TLS RecordLayer
func (*TLSPskWithAes128CbcSha256) Encrypt ¶
func (c *TLSPskWithAes128CbcSha256) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
Encrypt encrypts a single TLS RecordLayer
func (*TLSPskWithAes128CbcSha256) HashFunc ¶
func (c *TLSPskWithAes128CbcSha256) HashFunc() func() hash.Hash
HashFunc returns the hashing func for this CipherSuite
func (*TLSPskWithAes128CbcSha256) ID ¶
func (c *TLSPskWithAes128CbcSha256) ID() ID
ID returns the ID of the CipherSuite
func (*TLSPskWithAes128CbcSha256) Init ¶
func (c *TLSPskWithAes128CbcSha256) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error
Init initializes the internal Cipher with keying material
func (*TLSPskWithAes128CbcSha256) IsInitialized ¶
func (c *TLSPskWithAes128CbcSha256) IsInitialized() bool
IsInitialized returns if the CipherSuite has keying material and can encrypt/decrypt packets
func (*TLSPskWithAes128CbcSha256) String ¶
func (c *TLSPskWithAes128CbcSha256) String() string
type TLSPskWithAes128GcmSha256 ¶
type TLSPskWithAes128GcmSha256 struct {
TLSEcdheEcdsaWithAes128GcmSha256
}
TLSPskWithAes128GcmSha256 implements the TLS_PSK_WITH_AES_128_GCM_SHA256 CipherSuite
func (*TLSPskWithAes128GcmSha256) AuthenticationType ¶
func (c *TLSPskWithAes128GcmSha256) AuthenticationType() AuthenticationType
AuthenticationType controls what authentication method is using during the handshake
func (*TLSPskWithAes128GcmSha256) CertificateType ¶
func (c *TLSPskWithAes128GcmSha256) CertificateType() clientcertificate.Type
CertificateType returns what type of certificate this CipherSuite exchanges
func (*TLSPskWithAes128GcmSha256) ID ¶
func (c *TLSPskWithAes128GcmSha256) ID() ID
ID returns the ID of the CipherSuite
func (*TLSPskWithAes128GcmSha256) String ¶
func (c *TLSPskWithAes128GcmSha256) String() string
Source Files ¶
- aes_128_ccm.go
- ciphersuite.go
- tls_ecdhe_ecdsa_with_aes_128_ccm.go
- tls_ecdhe_ecdsa_with_aes_128_ccm8.go
- tls_ecdhe_ecdsa_with_aes_128_gcm_sha256.go
- tls_ecdhe_ecdsa_with_aes_256_cbc_sha.go
- tls_ecdhe_rsa_with_aes_128_gcm_sha256.go
- tls_ecdhe_rsa_with_aes_256_cbc_sha.go
- tls_psk_with_aes_128_cbc_sha256.go
- tls_psk_with_aes_128_ccm.go
- tls_psk_with_aes_128_ccm8.go
- tls_psk_with_aes_128_gcm_sha256.go