Documentation ¶
Index ¶
- Constants
- func NASEncrypt(AlgoID uint8, KnasEnc [16]byte, Count uint32, Bearer uint8, Direction uint8, ...) error
- func NASMacCalculate(AlgoID uint8, KnasInt [16]uint8, Count uint32, Bearer uint8, Direction uint8, ...) ([]byte, error)
- func NEA1(ck [16]byte, countC, bearer, direction uint32, ibs []byte, length uint32) (obs []byte, err error)
- func NEA2(key [16]byte, count uint32, bearer uint8, direction uint8, ibs []byte) (obs []byte, err error)
- func NEA3(ck [16]byte, count uint32, bearer uint8, direction uint8, ibs []byte, ...) (obs []byte, err error)
- func NIA1(ik [16]byte, countI uint32, bearer byte, direction uint32, msg []byte, ...) (mac []byte, err error)
- func NIA2(key [16]byte, count uint32, bearer uint8, direction uint8, msg []byte) (mac []byte, err error)
- func NIA3(ik [16]byte, count uint32, bearer uint8, direction uint8, msg []byte, ...) (mac []byte, err error)
- type Count
Constants ¶
View Source
const ( NNASEncAlg uint8 = 0x01 NNASIntAlg uint8 = 0x02 NRRCEncAlg uint8 = 0x03 NRRCIntAlg uint8 = 0x04 NUpEncAlg uint8 = 0x05 NUpIntAlg uint8 = 0x06 )
TS 33.501 Annex A.8 Algorithm distinguisher For Knas_int Knas_enc
View Source
const ( AlgIntegrity128NIA0 uint8 = 0x00 // NULL AlgIntegrity128NIA1 uint8 = 0x01 // 128-Snow3G AlgIntegrity128NIA2 uint8 = 0x02 // 128-AES AlgIntegrity128NIA3 uint8 = 0x03 // 128-ZUC )
TS 33.501 5.11.1.1 Algorithm identifier values For integrity algorithm
View Source
const ( AlgCiphering128NEA0 uint8 = 0x00 // NULL AlgCiphering128NEA1 uint8 = 0x01 // 128-Snow3G AlgCiphering128NEA2 uint8 = 0x02 // 128-AES AlgCiphering128NEA3 uint8 = 0x03 // 128-ZUC )
TS 33.501 5.11.1.1 Algorithm identifier values For ciphering algorithm
View Source
const ( DirectionUplink uint8 = 0x00 DirectionDownlink uint8 = 0x01 )
1bit
View Source
const ( OnlyOneBearer uint8 = 0x00 Bearer3GPP uint8 = 0x01 BearerNon3GPP uint8 = 0x02 )
5bits
View Source
const ( AccessType3GPP uint8 = 0x01 AccessTypeNon3GPP uint8 = 0x02 )
TS 33501 Annex A.0 Access type distinguisher For Kgnb Kn3iwf
Variables ¶
This section is empty.
Functions ¶
func NASEncrypt ¶
func NASMacCalculate ¶
func NEA2 ¶
func NEA2(key [16]byte, count uint32, bearer uint8, direction uint8, ibs []byte, ) (obs []byte, err error)
ibs: input bit stream, obs: output bit stream
func NEA3 ¶
func NEA3(ck [16]byte, count uint32, bearer uint8, direction uint8, ibs []byte, length uint32, ) (obs []byte, err error)
NEA3 ibs: input bit stream, obs: output bit stream ref: https://www.gsma.com/security/wp-content/uploads/2019/05/EEA3_EIA3_specification_v1_8.pdf
Types ¶
type Count ¶
type Count struct {
// contains filtered or unexported fields
}
TS 33.501 6.4.3.1
COUNT (32 bits) := 0x00 || NAS COUNT (24 bits) NAS COUNT (24 bits) := NAS OVERFLOW (16 bits) || NAS SQN (8 bits)
func (*Count) SetOverflow ¶
Click to show internal directories.
Click to hide internal directories.