ike_handler

package
Version: v3.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PreSignalling = iota
	EAPSignalling
	PostSignalling
)

IKE_AUTH state

View Source
const (
	Group2PrimeString  string = "" /* 256-byte string literal not displayed */
	Group2Generator           = 2
	Group14PrimeString string = "" /* 512-byte string literal not displayed */
	Group14Generator          = 2
)

Diffie-Hellman Exchange The strength supplied by group 1 may not be sufficient for typical uses

Variables

This section is empty.

Functions

func ApplyXFRMRule

func ApplyXFRMRule(n3iwf_is_initiator bool, childSecurityAssociation *n3iwf_context.ChildSecurityAssociation) error

func CalculateChecksum

func CalculateChecksum(key []byte, message []byte, algorithmType uint16) ([]byte, error)

Integrity Algorithm

func CalculateDiffieHellmanMaterials

func CalculateDiffieHellmanMaterials(secret *big.Int, peerPublicValue []byte, diffieHellmanGroupNumber uint16) (localPublicValue []byte, sharedKey []byte)

func CompareRootCertificate

func CompareRootCertificate(certificateEncoding uint8, requestedCertificateAuthorityHash []byte) bool

Certificate

func DecryptMessage

func DecryptMessage(key []byte, cipherText []byte, algorithmType uint16) ([]byte, error)

func DecryptProcedure

func DecryptProcedure(ikeSecurityAssociation *n3iwf_context.IKESecurityAssociation, message *ike_message.IKEMessage, encryptedPayload *ike_message.Encrypted) ([]ike_message.IKEPayloadType, error)

Decrypt

func EncryptMessage

func EncryptMessage(key []byte, message []byte, algorithmType uint16) ([]byte, error)

Encryption Algorithm

func EncryptProcedure

func EncryptProcedure(ikeSecurityAssociation *n3iwf_context.IKESecurityAssociation, ikePayload []ike_message.IKEPayloadType, responseIKEMessage *ike_message.IKEMessage) error

Encrypt

func GenerateKeyForChildSA

func GenerateKeyForChildSA(ikeSecurityAssociation *n3iwf_context.IKESecurityAssociation, childSecurityAssociation *n3iwf_context.ChildSecurityAssociation) error

Key Gen for child SA

func GenerateKeyForIKESA

func GenerateKeyForIKESA(ikeSecurityAssociation *n3iwf_context.IKESecurityAssociation) error

Key Gen for IKE SA

func GenerateRandomIPinRange

func GenerateRandomIPinRange(subnet *net.IPNet) net.IP

func GenerateRandomNumber

func GenerateRandomNumber() *big.Int

func GenerateRandomUint8

func GenerateRandomUint8() (uint8, error)

func HandleCREATECHILDSA

func HandleCREATECHILDSA(ueSendInfo *n3iwf_message.UDPSendInfoGroup, message *ike_message.IKEMessage)

func HandleIKEAUTH

func HandleIKEAUTH(ueSendInfo *n3iwf_message.UDPSendInfoGroup, message *ike_message.IKEMessage)

func HandleIKESAINIT

func HandleIKESAINIT(ueSendInfo *n3iwf_message.UDPSendInfoGroup, message *ike_message.IKEMessage)

func NewPseudorandomFunction

func NewPseudorandomFunction(key []byte, algorithmType uint16) (hash.Hash, bool)

Pseudorandom Funciton

func PKCS7Padding

func PKCS7Padding(plainText []byte, blockSize int) []byte

func SendIKEMessageToUE

func SendIKEMessageToUE(ueSendInfo *n3iwf_message.UDPSendInfoGroup, message *ike_message.IKEMessage)

func VerifyIKEChecksum

func VerifyIKEChecksum(key []byte, message []byte, checksum []byte, algorithmType uint16) (bool, error)

Types

type ANParameters

type ANParameters struct {
	GUAMI              *ngapType.GUAMI
	SelectedPLMNID     *ngapType.PLMNIdentity
	RequestedNSSAI     *ngapType.AllowedNSSAI
	EstablishmentCause *ngapType.RRCEstablishmentCause
}

Access Network Parameters

func UnmarshalEAP5GData

func UnmarshalEAP5GData(codedData []byte) (eap5GMessageID uint8, anParameters *ANParameters, nasPDU []byte, err error)

type XFRMEncryptionAlgorithmType

type XFRMEncryptionAlgorithmType uint16

func (XFRMEncryptionAlgorithmType) String

func (xfrmEncryptionAlgorithmType XFRMEncryptionAlgorithmType) String() string

type XFRMIntegrityAlgorithmType

type XFRMIntegrityAlgorithmType uint16

func (XFRMIntegrityAlgorithmType) String

func (xfrmIntegrityAlgorithmType XFRMIntegrityAlgorithmType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL