Documentation
¶
Overview ¶
Copyright © 2024 Keytos alan@keytos.io
Define MS-CHAPv2 cryptographic operations ¶
Copyright © 2024 Keytos alan@keytos.io
Define MS-CHAPv2 packet data for EAP ¶
Only hold "Data" section (anything after first `Type`)
Copyright © 2024 Keytos alan@keytos.io
Define MS-CHAPv2 packets
Index ¶
- func AuthenticatorResponse(pwhh, ntResponse, challengeHash []byte) []byte
- func ChallengeHash(peerc, authc []byte, uname string) []byte
- func NTPasswordHash(pw []byte) []byte
- func SessionKeys(pwhh, ntResponse []byte) (recvKey, sendKey []byte)
- func Utf16Bytes(s string) []byte
- func WriteNTResponse(dst, pwh, chall []byte)
- type Challenge
- type OpCode
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticatorResponse ¶
func ChallengeHash ¶
func NTPasswordHash ¶
func SessionKeys ¶
func Utf16Bytes ¶
func WriteNTResponse ¶
func WriteNTResponse(dst, pwh, chall []byte)
Types ¶
type Challenge ¶
type Challenge struct { OpCode OpCode Identifier uint8 Length uint16 ValueSize uint8 Challenge [16]byte Name []byte }
Challenge packet
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Code | Identifier | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | OpCode | MS-CHAPv2-ID | MS-Length... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MS-Length | Value-Size | Challenge... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Challenge... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Name... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
func CreateChallengeFromBuffer ¶ added in v0.2.0
type Request ¶
Success/Failure Request
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Code | Identifier | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | OpCode | MS-CHAPv2-ID | MS-Length... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MS-Length | Message... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
func ReadRequest ¶
type Response ¶
type Response struct { OpCode OpCode Identifier uint8 Length uint16 ValueSize uint8 PeerChallenge [16]byte Reserved [8]byte NTResponse [24]byte Flag uint8 Name []byte }
Response packet
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Code | Identifier | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | OpCode | MS-CHAPv2-ID | MS-Length... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MS-Length | Value-Size | Response... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Response... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Name... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
func CreateEmptyResponse ¶
Click to show internal directories.
Click to hide internal directories.