Скачиваний:
31
Добавлен:
02.05.2014
Размер:
3.51 Mб
Скачать

Appendix A

 

Wireless USB CCM Test Vectors

Wireless Universal Serial Bus Specification, Revision 1.0

Appendix A

Wireless USB CCM Test Vectors

This chapter provides test vectors for testing CCM encryption and decryption logic. The individual vectors are designed to reflect genuine Wireless USB operations. Multi-byte numerical values are presented with the most significant byte on the left and the least significant byte on the right. Byte streams are presented in order of transmission with the first byte transmitted on the left and the last byte transmitted on the right. All values are presented in hexadecimal notation.

A.1 Key Derivation

Wireless USB defines a mechanism for deriving temporal keys from the pre-shared Connection Key (CK).

Inputs

 

 

 

 

 

 

 

 

 

 

Host Address

9876

 

 

 

 

 

 

 

 

Device Address

00BE

 

 

 

 

 

 

 

 

TKID

019876

 

 

 

 

 

 

 

 

Host Nonce

10

11 12 13 14

15 16 17 18 19

1A

1B

1C

1D

1F

 

Device Nonce

20

21 22 23 24

25 26 27 28 29

2A

2B

2C

2D

2E

2F

CK

F0

E1 D2 C3

B4

A5 96 87 78 69

5A

4B

3C

2D

1E

0F

Results

 

 

 

 

 

 

 

 

 

 

KCK

4B

79 A3 CF E5

53 23 9D D7 C1 6D

1C

2D

AB 6D 3F

PTK

C8

70 62 82 B6

7C E9 06 7B C5

25

69

F2

36

61

2D

A.2 Handshake MIC calculation

Wireless USB defines a mechanism for generating the MIC values used to protect Handshake2 and Handshake3 messages. This vector provides the input and outputs for the MIC calculation of a Handshake2 request.

Inputs

 

 

Message Number

2

 

Host Address

9876

Device Address

00BE

TKID

019876

Device Nonce

20

21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F

KCK

4B

79 A3 CF E5 53 23 9D D7 C1 6D 1C 2D AB 6D 3F

CDID

30

31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F

Results

 

 

Handshake2

02

00 76 98 01 00 30 31 32 33 34 35 36 37 38 39

Data

3A

3B 3C 3D 3E 3F 20 21 22 23 24 25 26 27 28 29

 

277

Appendix A

 

 

 

 

 

 

 

Wireless USB CCM Test Vectors

 

 

 

 

 

 

Wireless Universal Serial Bus Specification, Revision 1.0

 

2A

2B

2C

2D

2E

2F

 

MIC

75

6A

97

51

0C

8C

14 7B

A.3 Secure MMC (EO = payload length)

This vector presents a secured MMC containing a Host Information IE and a WdntsCTA.

Inputs

 

 

 

 

 

 

 

 

 

 

Host Address

9876

 

 

 

 

 

 

 

 

Device Address

FFFF

 

 

 

 

 

 

 

 

TKID

019876

 

 

 

 

 

 

 

 

KEY

C8

70 62

82

B6

7C

E9

06

7B

C5

25 69 F2 36 61 2D

SFC

001122334455

 

 

 

 

 

 

 

Packet

40

1C FF FF 76

98

00

00

23

81

(MAC Header)

 

00

01 00 23

00

05

04

0F

0E

0D

(MMC Header)

 

80

10 00 0C

 

 

 

 

 

 

(WdntsCTA)

 

00

00 01 FF

 

 

 

 

 

 

(end of list)

 

14

82 49 00

 

 

 

 

 

 

(Host Info IE)

 

A0

A1 A2 A3

A4

A5

A6

A7

A8

A9

AA AB AC AD AE AF

EO

26

 

 

 

 

 

 

 

 

( l(m)= 0, l(a) = 34 )

Results

 

 

 

 

 

 

 

 

 

 

MAC HDR

48

1C FF FF 76

98

00

00

23

81

 

Security Hdr

76

98 01 00

26

00

55

44

33

22

11 00

Payload

00

01 00 23

00

05

04

0F

0E

0D

80 10

 

00

0C 00 00

01

FF 14

82

49

00

A0 A1

 

A2

A3 A4 A5

A6

A7

A8

A9

AA AB AC AD AE AF

MIC

98

3B 8B A5

C1

A8

F8

39

 

 

 

278

Appendix A

 

Wireless USB CCM Test Vectors

Wireless Universal Serial Bus Specification, Revision 1.0

A.4 Data IN from device (EO = 2)

This vector is for a Data IN packet from a device. The Wireless USB header is authenticated but not encrypted. The data portion of the payload is fully encrypted.

Inputs

 

 

 

 

 

 

 

 

 

Host Address

9876

 

 

 

 

 

 

 

Device Address

0002

 

 

 

 

 

 

 

TKID

019876

 

 

 

 

 

 

 

KEY

C8

70 62 82

B6 7C

E9

06

7B

C5

25 69 F2 36 61 2D

SFC

001122334456

 

 

 

 

 

 

 

Packet

C0

12 76 98

02 00

00

00

23

C1

(MAC Header)

 

81

00

 

 

 

 

 

 

(WUSB Header)

 

30

31 32 33

34 35

36

37

 

 

(data)

 

38

39 3A 3B

3C

3D

3E

3F

 

 

 

 

40

41 42 43

44 45

46

47

 

 

 

 

48

49 4A 4B

4C 4D

4E

4F

 

 

 

EO

02

 

 

 

 

 

 

 

( l(m)= 20, l(a) = 10 )

Results

 

 

 

 

 

 

 

 

 

MAC HDR

C8

12 76 98

02 00

00

00

23

C1

 

Security Hdr

76

98 01 00

02 00

56

44

33

22

11 00

Payload

81

00 41 3A

31 85

C9

85

1B

F5

46 E7

 

C5

93 03 11

85 76

47

ED 9D

95

15 A6

 

99

CF 47 79

CE C8 6E

B0

AD

1D

 

MIC

AE 8C 60 D3

BA F2 AD 46

 

 

 

279

Appendix B

 

Wire Adapter Example Descriptor Sets

Wireless Universal Serial Bus Specification, Revision 1.0

Appendix B

Wire Adapter Example Descriptor Sets

B.1 Descriptors for DWA

The Wire Adapter class pre-defines certain fields in standard USB descriptors. Other fields are either implementation-dependent or not applicable to this class.

The sample descriptor set below is for a DWA with 4 ports (all exposed) with the ability to support a pair of isochronous streams to devices connected on the DWA’s downstream port. This DWA supports one encryption type (AES 128 CCM), has 16 RPipes and 256K of buffer space (block size of 2K and 128 blocks). This DWA does not support data packet size adjustment.

Note: For the descriptors and fields shown below, the bits in a field are organized in a little-endian fashion; that is, bit location 0 is the least significant bit and bit location 7 is the most significant bit of a byte value.

Device Descriptor:

 

bLength

12H

 

 

 

 

 

 

bDescriptorType

01H

(Device)

 

bcdUSB

0250H (Wireless USB Compliant)

 

 

 

 

bDeviceClass

EFH (Miscellaneous)

 

 

 

 

 

bDeviceSubClass

02H

(Common Class)

 

bDeviceProtocol

02H

(Wire Adapter Multifunction Peripheral)

 

 

 

 

 

bMaxPacketSize0

FFH

 

 

 

 

 

idVendor

Implementation-dependent

 

idProduct

Implementation-dependent

 

 

 

 

bcdDevice

Implementation-dependent

 

 

 

 

iManufacturer

Implementation-dependent

 

iProduct

Implementation-dependent

 

 

 

 

iSerialNumber

Implementation-dependent

 

 

 

 

 

bNumConfigurations

1

 

BOS Descriptor:

 

 

 

 

 

 

 

bLength

05H

 

 

 

 

 

bDescriptorType

0FH (BOS)

 

wTotalLength

10H

 

 

 

 

 

 

bNumDeviceCaps

1

 

 

 

 

 

280

Appendix B

 

Wire Adapter Example Descriptor Sets

Wireless Universal Serial Bus Specification, Revision 1.0

Wireless USB Device Capabilities – UWB:

 

bLength

0BH

 

bDescriptorType

10H

(Device Capability)

 

bDevCapabilityType

01H

(Wireless USB)

 

 

 

 

bmAttributes

Implementation-dependent

 

wPHYRates

Implementation-dependent

 

bmTFITXPowerInfo

Implementation-dependent

 

 

 

 

bmFFITXPowerInfo

Implementation-dependent

 

bmBandGroup

Implementation-dependent

 

bReserved

0

 

 

 

 

Security Descriptor (One Encryption Type supported):

 

 

 

 

 

bLength

05H

 

 

bDescriptorType

0CH (Security)

 

 

 

 

wTotalLength

0AH

 

bNumEncryptionTypes

1

 

Encryption Type Descriptor (AES-128 in CCM mode):

 

bLength

05H

 

bDescriptorType

0EH (Encryption Type)

 

bEncryptionType

02H (AES-128 in CCM mode)

 

 

 

 

bEncryptionValue

Implementation-dependent

 

bAuthKeyIndex

Implementation-dependent

Configuration Descriptor

 

 

 

 

 

bLength

09H

 

bDescriptorType

02H (Configuration)

 

wTotalLength

N (Implementation-dependent)

 

 

 

 

bNumInterfaces

2

 

bConfigurationValue

Implementation-dependent

 

iConfiguration

Implementation-dependent

 

 

 

 

bmAttributes

Implementation-dependent

 

bMaxPower

0

281

Appendix B

 

Wire Adapter Example Descriptor Sets

Wireless Universal Serial Bus Specification, Revision 1.0

Interface Association Descriptor

 

bLength

08H

 

 

bDescriptorType

0BH (Interface Association)

 

bFirstInterface

0

 

 

 

 

 

 

bInterfaceCount

02H

 

 

bFunctionClass

E0H (Wireless Controller)

 

bFunctionSubClass

02H

(Wireless USB Adapter)

 

 

 

 

 

bFunctionProtocol

02H

(Device Wire Adapter Control/Data Streaming

 

 

Programming Interface)

 

iFunction

Implementation-dependent

Interface Descriptor (Data Transfer Interface):

 

 

 

 

 

bLength

09H

 

 

 

 

 

 

bDescriptorType

04H

(Interface)

 

bInterfaceNumber

0

 

 

bAlternateSetting

0

 

 

 

 

 

 

bNumEndpoints

3

 

 

bInterfaceClass

E0H (Wireless Controller)

 

bInterfaceSubClass

02H

(Wireless USB Adapter)

 

 

 

 

 

bInterfaceProtocol

02H

(Device Wire Adapter Control/Data Streaming

 

 

Programming Interface)

 

iInterface

Implementation-dependent

Wire Adapter Class Descriptor:

 

 

 

 

 

 

 

bLength

0EH

 

 

 

 

 

 

bDescriptorType

21H

(Wire Adapter Descriptor Type)

 

bcdWAVersion

100H (WA Class Specification Version)

 

bNumPorts

4

 

 

 

 

 

bmAttributes

Implementation-dependent

 

wNumRPipes

10H

 

 

wRPipeMaxBlock

80H

 

 

 

 

 

 

bRPipeBlockSize

0CH

 

 

bPwrOn2PwrGood

Implementation-dependent

 

bNumMMCIEs

0

 

 

 

 

 

 

DeviceRemovable

1EH

 

282

Appendix B

 

Wire Adapter Example Descriptor Sets

Wireless Universal Serial Bus Specification, Revision 1.0

Endpoint Descriptor (for Notification Endpoint):

 

bLength

07H

 

bDescriptorType

05H (Endpoint)

 

bEndpointAddress

Implementation-dependent; Bit 7: Direction = In(1)

 

 

 

 

bmAttributes

Transfer Type = Interrupt (00000011B)

 

wMaxPacketSize

200H

 

bInterval

06H

 

 

 

Endpoint Companion Descriptor (for Notification Endpoint)

 

 

 

 

bLength

0AH

 

bDescriptorType

11H (Wireless Endpoint Companion)

 

 

 

 

bMaxBurst

1

 

bMaxSequence

Implementation-dependent

 

wMaxStreamDelay

0

 

 

 

 

wOverTheAirPacketSize

0

 

bOverTheAirInterval

0

 

bmCompAttributes

0

 

 

 

Endpoint Descriptor (for Data Transfer Write Endpoint):

 

 

 

 

bLength

07H

 

bDescriptorType

05H (Endpoint)

 

 

 

 

bEndpointAddress

Implementation-dependent; Bit 7: Direction = Out(0)

 

bmAttributes

Transfer Type = Bulk (00000010B)

 

wMaxPacketSize

Implementation-dependent

 

 

 

 

bInterval

0

Endpoint Companion Descriptor (for Data Transfer Write Endpoint)

 

 

 

 

bLength

0AH

 

 

 

 

bDescriptorType

11H (Wireless Endpoint Companion)

 

bMaxBurst

Implementation-dependent

 

bMaxSequence

Implementation-dependent

 

 

 

 

wMaxStreamDelay

0

 

wOverTheAirPacketSize

0

 

bOverTheAirInterval

0

 

 

 

 

bmCompAttributes

0

283

Appendix B

 

Wire Adapter Example Descriptor Sets

Wireless Universal Serial Bus Specification, Revision 1.0

Endpoint Descriptor (for Data Transfer Read Endpoint):

 

bLength

07H

 

 

bDescriptorType

05H

(Endpoint)

 

bEndpointAddress

Implementation-dependent; Bit 7: Direction = In(1)

 

 

 

 

bmAttributes

Transfer Type = Bulk (00000010B)

 

wMaxPacketSize

Implementation-dependent

 

bInterval

0

 

 

 

 

Endpoint Companion Descriptor (for Data Transfer Read Endpoint)

 

 

 

 

bLength

0AH

 

bDescriptorType

11H

(Wireless Endpoint Companion)

 

 

 

 

bMaxBurst

Implementation-dependent

 

bMaxSequence

Implementation-dependent

 

wMaxStreamDelay

0

 

 

 

 

 

 

wOverTheAirPacketSize

0

 

 

bOverTheAirInterval

0

 

 

bmCompAttributes

0

 

 

 

 

Interface Descriptor (Isochronous Streaming Interface):

 

 

 

 

 

bLength

09H

 

 

bDescriptorType

04H

(Interface)

 

 

 

 

 

bInterfaceNumber

1

 

 

bAlternateSetting

0

 

 

bNumEndpoints

2

 

 

 

 

 

bInterfaceClass

E0H (Wireless Controller)

 

bInterfaceSubClass

02H

(Wireless USB Wire Adapter)

 

bInterfaceProtocol

03H

(Device Wire Adapter Isochronous Streaming

 

 

Programming Interface)

 

iInterface

Implementation-dependent

 

 

 

Endpoint Descriptor (for Isochronous Streaming OUT Endpoint):

 

 

 

 

 

bLength

07H

 

 

bDescriptorType

05H

(Endpoint)

 

 

 

 

bEndpointAddress

Implementation-dependent; Bit 7: Direction = Out(0)

 

bmAttributes

Transfer Type = Isochronous (00000001B)

 

wMaxPacketSize

Implementation-dependent

 

 

 

 

bInterval

Implementation-dependent

284

Соседние файлы в папке Wireless USB Specification Revision 1.0 May 12, 2005