handler

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IKE_AUTH state
	PreSignalling = iota
	EAPSignalling
	PostSignalling
	EndSignalling

	// CREATE_CHILDSA
	HandleCreateChildSA
)
View Source
const (
	Group2PrimeString string = "FFFFFFFFFFFFFFFFC90FDAA22168C234" +
		"C4C6628B80DC1CD129024E088A67CC74" +
		"020BBEA63B139B22514A08798E3404DD" +
		"EF9519B3CD3A431B302B0A6DF25F1437" +
		"4FE1356D6D51C245E485B576625E7EC6" +
		"F44C42E9A637ED6B0BFF5CB6F406B7ED" +
		"EE386BFB5A899FA5AE9F24117C4B1FE6" +
		"49286651ECE65381FFFFFFFFFFFFFFFF"
	Group2Generator           = 2
	Group14PrimeString string = "FFFFFFFFFFFFFFFFC90FDAA22168C234" +
		"C4C6628B80DC1CD129024E088A67CC74" +
		"020BBEA63B139B22514A08798E3404DD" +
		"EF9519B3CD3A431B302B0A6DF25F1437" +
		"4FE1356D6D51C245E485B576625E7EC6" +
		"F44C42E9A637ED6B0BFF5CB6F406B7ED" +
		"EE386BFB5A899FA5AE9F24117C4B1FE6" +
		"49286651ECE45B3DC2007CB8A163BF05" +
		"98DA48361C55D39A69163FA8FD24CF5F" +
		"83655D23DCA3AD961C62F356208552BB" +
		"9ED529077096966D670C354E4ABC9804" +
		"F1746C08CA18217C32905E462E36CE3B" +
		"E39E772C180E86039B2783A2EC07A28F" +
		"B5C55DF06F4C52C9DE2BCBF695581718" +
		"3995497CEA956AE515D2261898FA0510" +
		"15728E5A8AACAA68FFFFFFFFFFFFFFFF"
	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 CalculateChecksum

func CalculateChecksum(key []byte, originData []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 CreatePDUSessionChildSA

func CreatePDUSessionChildSA(ikeUe *context.N3IWFIkeUe,
	temporaryPDUSessionSetupData *context.PDUSessionSetupTemporaryData,
)

func DecryptMessage

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

func DecryptProcedure

func DecryptProcedure(ikeSecurityAssociation *context.IKESecurityAssociation, ikeMessage *message.IKEMessage,
	encryptedPayload *message.Encrypted,
) (message.IKEPayloadContainer, error)

Decrypt

func EncryptMessage

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

Encryption Algorithm

func EncryptProcedure

func EncryptProcedure(ikeSecurityAssociation *context.IKESecurityAssociation,
	ikePayload message.IKEPayloadContainer, responseIKEMessage *message.IKEMessage,
) error

Encrypt

func GenerateKeyForChildSA

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

Key Gen for child SA

func GenerateKeyForIKESA

func GenerateKeyForIKESA(ikeSecurityAssociation *context.IKESecurityAssociation) error

Key Gen for IKE SA

func GenerateRandomNumber

func GenerateRandomNumber() *big.Int

func GenerateRandomUint8

func GenerateRandomUint8() (uint8, error)

func HandleCREATECHILDSA

func HandleCREATECHILDSA(udpConn *net.UDPConn, n3iwfAddr, ueAddr *net.UDPAddr, message *ike_message.IKEMessage)

func HandleCreatePDUSession

func HandleCreatePDUSession(ikeEvt context.IkeEvt)

func HandleEvent

func HandleEvent(ikeEvt context.IkeEvt)

func HandleGetNGAPContextResponse

func HandleGetNGAPContextResponse(ikeEvt context.IkeEvt)

func HandleIKEAUTH

func HandleIKEAUTH(udpConn *net.UDPConn, n3iwfAddr, ueAddr *net.UDPAddr, message *ike_message.IKEMessage)

func HandleIKEContextUpdate

func HandleIKEContextUpdate(ikeEvt context.IkeEvt)

func HandleIKEDeleteRequest

func HandleIKEDeleteRequest(ikeEvt context.IkeEvt)

func HandleIKESAINIT

func HandleIKESAINIT(udpConn *net.UDPConn, n3iwfAddr, ueAddr *net.UDPAddr, message *ike_message.IKEMessage,
	realMessage1 []byte,
)

func HandleInformational

func HandleInformational(udpConn *net.UDPConn, n3iwfAddr, ueAddr *net.UDPAddr, message *ike_message.IKEMessage)

func HandleSendChildSADeleteRequest

func HandleSendChildSADeleteRequest(ikeEvt context.IkeEvt)

func HandleSendEAP5GFailureMsg

func HandleSendEAP5GFailureMsg(ikeEvt context.IkeEvt)

func HandleSendEAPNASMsg

func HandleSendEAPNASMsg(ikeEvt context.IkeEvt)

func HandleSendEAPSuccessMsg

func HandleSendEAPSuccessMsg(ikeEvt context.IkeEvt)

func HandleUnmarshalEAP5GDataResponse

func HandleUnmarshalEAP5GDataResponse(ikeEvt context.IkeEvt)

func NewPseudorandomFunction

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

Pseudorandom Function

func PKCS7Padding

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

func SendChildSADeleteRequest

func SendChildSADeleteRequest(ikeUe *context.N3IWFIkeUe, relaseList []int64)

func SendIKEDeleteRequest

func SendIKEDeleteRequest(localSPI uint64)

func SendIKEMessageToUE

func SendIKEMessageToUE(udpConn *net.UDPConn, srcAddr, dstAddr *net.UDPAddr, message *ike_message.IKEMessage)

func SendUEInformationExchange

func SendUEInformationExchange(
	ikeUe *context.N3IWFIkeUe, payload ike_message.IKEPayloadContainer,
)

func StartDPD

func StartDPD(ikeUe *context.N3IWFIkeUe)

func VerifyIKEChecksum

func VerifyIKEChecksum(key []byte, originData []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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL