Confirmed users
133
edits
(→Encrypted control events: Add notation) |
Luke-chang (talk | contribs) |
||
| Line 37: | Line 37: | ||
# Client acquires RSA public key from secure.sjs. [[Firefox_OS/Remote_Control#RSA_public_key_exchange|Detail]] | # Client acquires RSA public key from secure.sjs. [[Firefox_OS/Remote_Control#RSA_public_key_exchange|Detail]] | ||
# Secure.sjs replies RSA-OEAP public key SPKI in base64. [https://github.com/MDTsai/gecko-dev/blob/Bug_1235013_new_httpserver/b2g/remotecontrol/secure.sjs#L80 source] | # Secure.sjs replies RSA-OEAP public key SPKI in base64. [https://github.com/MDTsai/gecko-dev/blob/Bug_1235013_new_httpserver/b2g/remotecontrol/secure.sjs#L80 source] | ||
# Client imports RSA public key | # Client imports RSA public key, generate symmetric key (AES-GCM) and wrap it by the public key (RSA-OEAP). [https://github.com/luke-chang/gaia/blob/1228262_tv_remote_control_secure/tv_apps/remote-control-client/js/secure.js#L180-L208 source] | ||
# Client sends the wrapped symmetric key to secure.sjs in base64. [[Firefox_OS/Remote_Control#Send_symmetric_key|Detail]] | |||
# Secure.sjs replies a ticket number. | # Secure.sjs replies a ticket number. | ||
# Secure.sjs unwraps symmetric key with RSA-OEAP private key. [https://github.com/MDTsai/gecko-dev/blob/Bug_1235013_new_httpserver/b2g/remotecontrol/secure.sjs#L30 source] | # Secure.sjs unwraps the symmetric key with RSA-OEAP private key. [https://github.com/MDTsai/gecko-dev/blob/Bug_1235013_new_httpserver/b2g/remotecontrol/secure.sjs#L30 source] | ||
# Secure.sjs saves symmetric key. | # Secure.sjs saves the symmetric key. | ||
# Remote Control Service generates a new UUID, encrypted with symmetric key and binds encrypted UUID with ticket number. [https://github.com/MDTsai/gecko-dev/blob/Bug_1235013_new_httpserver/b2g/remotecontrol/secure.sjs#L30 source] | # Remote Control Service generates a new UUID, encrypted it with the symmetric key and binds encrypted UUID with ticket number. [https://github.com/MDTsai/gecko-dev/blob/Bug_1235013_new_httpserver/b2g/remotecontrol/secure.sjs#L30 source] | ||
# Client polls encrypted UUID from secure.sjs by ticket number. [[Firefox_OS/Remote_Control#Poll_UUID|Detail]] | # Client polls encrypted UUID from secure.sjs by ticket number. [[Firefox_OS/Remote_Control#Poll_UUID|Detail]] | ||
# Client decrypts received UUID to double confirm server receives correct symmetric key. | # Client decrypts received UUID to double confirm server receives correct symmetric key. | ||
# Client reloads the URL with UUID. | # Client reloads the URL with the valid UUID. | ||
=== PIN code pairing === | === PIN code pairing === | ||