Recently, communication protocols have developed for allowing a computing device to control and communicate with media devices such as digital cameras. One such protocol, the ISO 157540 Picture Transfer Protocol (PTP), can be used in connection with transferring images from imaging devices, such as cameras, to personal computing devices. This protocol defines how the digital still camera can communicate with a personal computing device. PTP has been extended so that many different types of content such as digital music and video can be easily presented, exchanged, processed, and reproduced. The extension to the PTP protocol is sometimes referred to as the Media Transport Protocol (MTP). For purposes herein the terms PTP and MTP will be used interchangeably.
The PTP protocol is an asymmetric control protocol, somewhat like a master/slave protocol. However, in PTP parlance one refers to the devices engaged in a picture transfer as the Initiator and Responder, rather than the Master and Slave. The Initiator device establishes and subsequently manages a control connection while the Responder is defined as the device that responds to operation requests such as an “OpenSession” request.
In the PTP protocol devices can be Initiators, Responders or both. For instance, a PC can be configured only as an Initiator device while a USB camera can be only a Responder. Similarly, a Bluetooth camera, that opens a connection to a Bluetooth/PTP printer and pushes pictures for print, can be only an Initiator while the corresponding printer can be only a Responder. However, a digital camera that can connect to other digital cameras and is able to both initiate and receive a PTP session is desired that is capable of behaving both as Initiator and Responder.
PTP is a transport independent protocol. In its original embodiment it was designed and intended for use over the Universal Serial Bus (USB) transport. However alternative transports can be readily implemented over local area networks. Examples include PTP over Bluetooth and PTP over IP networks (PTP/IP). However, due in part to its ease of use and wide availability, USB is often used as the transport protocol. When USB is employed, a digital camera, for example, can share a photo file with a personal computer (PC) using a USB cable to establish the connection between the camera and the PC. The photo file can then be transferred to PC over the USB cable using the picture transfer protocol (PTP).
In accordance with one aspect of the invention, a method and apparatus is provided for receiving content from a first media device. The method includes establishing a secure communication path using a universal serial bus (USB) protocol between the first media device and a second media device that is to receive the content. The content is received from the first media device over the secure communication path using a file transfer protocol.
In accordance with another aspect of the invention, a media device is provided. The media device includes a memory for storing a file transfer application and a storage device for storing content. The device also includes at least one processor and an input-output (I/O) interface over which the file transfer application transfers content. The device also includes a protocol stack that is executable by the processor. The protocol stack includes a file transfer application layer, a transport protocol layer that does not include native support for security, and a security emulation layer located between the file transfer application layer and the transport protocol layer. The security emulation layer is executed in the transport protocol layer.
In accordance with yet another aspect of the invention, a method is provided for implementing a communication protocol stack that includes a file transfer application layer, a transport protocol layer that does not include native support for security, and a security layer between the application and the transport layers. The method includes exchanging transport layer messages to transfer cryptographic information used to execute the security layer by the transport protocol layer. Content is caused to be transmitted or received over a communication path supporting the communication protocol stack. The cryptographic information that is exchanged includes information used to encrypt and decrypt the transfer of the content.
The media devices in
Responder 20 includes a PTP responder application 22 and Initiator 30 includes a PTP initiator application 32. As shown, the PTP protocol employed by PTP applications 22 and 30 operates over the USB transport layer.
One deficiency with the USB protocol is its inability to establish a secure connection between devices. This can be a problem, for instance, when encrypted content is being transferred from one device to another. For example, if a user wishes to download encrypted content stored on a set-top box to a portable media player, the portable media player will need to receive both the encrypted content and the key or keys necessary to decrypt the content. In such a case it would be desirable to transfer the key or keys securely so that cannot be hacked or otherwise obtained by an unauthorized user. One way to overcome this problem is illustrated in the logical diagram of
As shown in
The SSL protocol uses a combination of public-key and symmetric key encryption. The SSL protocol includes an SSL handshake protocol to exchange a series of messages between an SSL-enabled server and an SSL-enabled client when they first establish an SSL connection. An SSL session begins with an exchange of messages called the SSL handshake. The SSL handshake allows the server to authenticate itself to the client using public-key techniques, then allows the client and the server to cooperate in the creation of symmetric keys used for encryption, decryption, and tamper detection during the ensuing SSL session. Optionally, the handshake also allows the client to authenticate itself to the server.
As previously mentioned, a PTP application operating over the USB protocol does not provide the ability to establish a secure connection between devices. One way to overcome this problem is by defining USB messages that emulate the SSL handshake. The USB protocol defines two types of messages, events and operation codes (“opcodes”). In USB one of the devices serves as the host. A host communicates data to a device using opcodes. A device communicates to a host using events. The USP protocol uses pre-defined events and opcodes to perform its functions. However, the USP specification also allows the use of vender-defined events and opcodes. In order to address the lack of security when USB is used as a transport protocol, such USB vender-defined events and opcodes may be used to emulate the SSL handshake. In other words, a security emulation layer can be executed in the transport protocol layer. The security emulation layer can offer privacy, authenticity, or both privacy and authenticity.
Once the SSL-emulated handshake has been completed a host and device will have established an encryption algorithm and exchanged cryptographic keys which can be used to encrypt and decrypt data during the data-exchange phase of a PTP transaction. The vocabulary of vendor-defined USB events and opcodes which are used to emulate the SSL handshake may be defined in any desired manner.
One illustrative example of the message exchange process between a host and device that may be used to conduct the SSL-emulated handshake is shown in
It should be noted that the details of this message exchange process will depend on the how the USB events and opcodes are defined. Accordingly, the message exchange process shown in
The SLL handshake emulation process 300 begins when the host sends a message 302 (e.g., an opcode) to the device to start the SSL session and a message 304 to initialize the SSL library, which may be a conventional SSL library. The host also sends a SSLClientHello message 306 to the device. The SSL ClientHello message 306 defines the capabilities of the host, which will be subsequently used by the device to agree upon a set of algorithms to use for privacy and security. In response to the SSLClientHello message 306, the device generates an SSLServerHello message 308 to the host, which defines the capabilities of the device. The host then pulls the SSLServerHello message 308 from the device.
Once the hello phase of the SSL-emulated handshake process is complete, a device authentication phase begins. In this example the authentication phase begins when the device generates an SSLCertificate message 310 containing the device's digital certificate. The host then pulls the SSLCertificate message 310 from the device.
In a key exchange phase, the device generates an SSLKeyExchange message 312 which is subsequently pulled by the host. The content of the SSLKeyExchange message 312 will depend on the public key algorithm selected as a result of the SSL ClientHello and SSLServerHello messages, but will generally include a pre-master key.
The device next generates a SSLServerHelloDone message 314, indicating that the hello-message phase of the handshake is complete. Once again, the SSLServerHelloDone message 314 is pulled by the host. The host then pushes SSLCertificate 316 message to the device to perform host authentication. The host also sends to the device a SSLKeyExchange 318 message with its pre-master key and a SSLCertificateVerify 320 message.
A SSLChangeCipherSpec message 322 is generated by the device in order to tell the host to establish the agreed-upon security settings (i.e., the cipher suite) and the message 322 is pulled by the host. Finally, the device generates an SSLFinished message 325 that is pulled by the host. At this point, the handshake is complete and the client and server may begin to exchange application layer data in a secure manner.
Memory 102 may include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state memory devices. Access to memory 102 by other components of the device 100, such as the CPU 120 and the peripherals interface 118, may be controlled by the memory controller 122. The peripherals interface 118 couples the input and output peripherals of the device to the processor 120 and memory 102. The one or more processors 120 run or execute various software programs and/or sets of instructions stored in memory 102 to perform various functions for the device 100 and to process data. In particular, the one or more processors 120 may implement the PTP protocol stack shown in
The I/O subsystem 106 couples input/output peripherals on the device 100, such as the display 112 and other input/control devices 116, to the peripherals interface 118. The I/O subsystem 106 may include a USB controller 158 for handling data received by a USB port 164. The I/O subsystem 106 may couple other I/O peripherals such as a display controller 156 and display 112 and one or more input controllers 160 for other input or control devices 116. The other input/control devices 116 may include a keyboard, physical buttons (e.g., push buttons, rocker buttons, etc.), dials, slider switches, joysticks, click wheels, a pointer device such as a mouse and so forth.
In some embodiments, the software components stored in memory 102 may include an operating system 126, a communication module (or set of instructions) 128, a graphics module (or set of instructions) 132, a text input module (or set of instructions) 134, a sound module 133 (or set of instructions) a PTP or other file transfer application 131 (or set of instructions) as well as other applications (or set of instructions) 136.
The operating system 126 (e.g., Darwin, RTXC, LINUX, UNIX, OS X, Microsoft WINDOWS, Android or an embedded operating system such as VxWorks) includes various software components and/or drivers for controlling and managing general system tasks (e.g., memory management, storage device control, power management, etc.) and facilitates communication between various hardware and software components. In some implementations the other applications 136 may include any combination of the following modules: a contacts module, a telephone module; a video conferencing module; an e-mail client module an instant messaging (IM) module; a blogging module; a camera module; an image management module; a video player module; a music player module; a browser module; a word processing module; a voice recognition module; a calendar module; widget modules, which may include a weather widget, stocks widget, calculator widget, alarm clock widget, dictionary widget, and other widgets obtained by the user, as well as user-created widgets.
Each of the above identified modules and applications correspond to a set of instructions for performing one or more functions described above. These modules (i.e., sets of instructions) need not be implemented as separate software programs, procedures or modules, and thus various subsets of these modules may be combined or otherwise re-arranged in various embodiments. In some embodiments, memory 102 may store a subset of the modules and data structures identified above. Furthermore, memory 102 may store additional modules and data structures not described above. In some implementations one or more the software components such as the PTP file transfer application 136 may be incorporated into the operating system 126.
It should be appreciated that the media device 400 is only one example of a media device and that the device 400 may have more or fewer components than shown, may combine two or more components, or a may have a different configuration or arrangement of components. For instance, if the media device 400 is a digital camera, or incorporates a digital camera, the device 400 will include an optical sensor such as a charge-coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS) phototransistor. Alternatively, if the media device 400 is or includes the functionality of a wireless phone, the device 400 will include RF (radio frequency) circuitry to communicate using any of a variety of communication standards including but not limited to Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), high-speed downlink packet access (HSDPA), wideband code division multiple access (W-CDMA), code division multiple access (CDMA), time division multiple access (TDMA), Bluetooth, Wireless Fidelity (Wi-Fi) (e.g., IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and/or IEEE 802.11n), voice over Internet Protocol (VoIP), Wi-MAX, a protocol for email, instant messaging, and/or Short Message Service (SMS)). The various components shown in
Although various embodiments are specifically illustrated and described herein, it will be appreciated that modifications and variations of the present invention are covered by the above teachings and are within the purview of the appended claims without departing from the spirit and intended scope of the invention. For example, while the invention has been described in the context of a PTP protocol operating on a USB transport protocol, the invention is also applicable to other file transfer protocols and applications and other transport protocols that do not include native support for security.