TOC |
|
This document defines a lightweight mechanism for encrypting arbitrary data to be encrypted and enveloped in JSON [RFC4627] (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) together with necessary encryption parameters.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 (Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.) [RFC2119].
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress.”
This Internet-Draft will expire on December 4, 2010.
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
1.
JSON Encryption Envelope
1.1.
Envelope Parameters
1.2.
The JSON Serialization
2.
IANA Considerations
3.
Security Considerations
4.
Acknowledgements
5.
References
5.1.
Normative References
5.2.
Informative References
Appendix A.
An Appendix
§
Authors' Addresses
TOC |
JSON Encryption Envelope comprises a message bundled along with encryption parameters for that message, expressed as a series of parameters, and serialized as JSON in RFC 4627 (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.) [RFC4627]. The envelope specifies the data that was encrypted, the MIME type of the data, the transfer encoding, and the encryption parameters.
TOC |
Value: "http://jsonenc.info/json-encryption/"
Value: The MIME type OR the Type URL of the payload prior to encoding
Value: The JSON Form OpenID assertion that is encrypted and Base64url encoded as in [magic_signatures] (Panzer, J., “Magic Signatures,” February 2010.) .
Value: The symmetric encryption key that was used for the encryption of the payload encrypted with the algorithm specified in 'enc_type_asy' by the Public specified by the RP then Base64url encoded.
Value: (Optional) Base64 encoded initialization vector. It SHOULD be different for each encryption. The default IV is null, however, using null as the IV is strongly discouraged.
Value: (Optional) Asymmetric cypher type expressed in the Type URL from XML Encryption (Imamura, T., “XML Encryption Syntax and Processing,” December 2002.) [xml_enc]
One MAY use other Type URLs if so desired.
- (Default) RSA-v1.5 http://www.w3.org/2001/04/xmlenc#rsa-1_5 : RSA Encryption with PKCS1_PADDING.
- RSA-OAEP http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p : RSA Encryption with PKCS1_OAEP_PADDING.
Value: (Optional) String expressing the encryption type. Default is "AES-128-CBC". Possible values are:
One MAY define other Type URL if so desired.
- "PLAIN" No encryption base64 encoding only
- "AES-128-CBC" 128 bit AES encryption in CBC mode (default) . Short hand for "http://www.w3.org/2001/04/xmlenc#aes128-cbc".
- "AES-256-CBC" 256 bit AES encryption in CBC mode. Short hand for "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
Value: (Optional) URI of the PEM format X.509 Certificate that corresponds to the public key encryption of the symmetric key.
Value: (Optional) Base64url encoded PEM format X.509 Certificate that corresponds to the public key encryption of the symmetric key.
Value: (Optional) A SHA1 of the DER encoded certificate.
Note: One may calculate this value as in the follwoing non-normative example from a PEM encoded certificate:
openssl x509 -in cer.cert -text | perl -ne 'print if /BEGIN/../END/' | openssl base64 -d | openssl sha1 -hex
TOC |
JSON Encryption Envelope MUST be well formed JSON as defined in [RFC4627] (Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” July 2006.). The parameters are serialized into a JSON object as a sequence of name/value pairs for the parameter described in Section 1.1 (Envelope Parameters).
Additional name/value pairs MAY appear within the JSON object and processors MUST ignore elements they do not understand.
Example:
{ "object_type":"http://jsonenc.info/json-encryption/", "enc_data":"b5guwzFgvrIUd7XcXI0bAFrg-....O69VKhY", "enc_key":"mHM2ongmZlPVexe....2lsBNdw", "enc_iv":"_b4INfYIRwLPZdxB2L7wJg", "enc_type":"AES-128-CBC', "enc_ref":"https://rp.example.com/rpf_ax.json" }
TOC |
This document makes no request of IANA.
TOC |
The symmetric encryption key should be generated with a reliable pseudo-random number generator to achieve high entropy.
The initialization vector should be generated with a reliable pseudo-random number generator to achieve high entropy.
TOC |
TOC |
TOC |
[RFC2119] | Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” BCP 14, RFC 2119, March 1997 (TXT, HTML, XML). |
[RFC4627] | Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON),” RFC 4627, July 2006 (TXT). |
[magic_signatures] | Panzer, J., “Magic Signatures,” February 2010. |
[xml_enc] | Imamura, T., “XML Encryption Syntax and Processing,” December 2002. |
TOC |
TOC |
TOC |
John Bradeley | |
Wingaa | |
Email: | john.bradley@wingaa.com |
Nat Sakimura | |
Nomura Research Institute | |
1-6-5 Marunouchi, Marunouchi Kitaguchi Bldg. | |
Chiyoda-ku, Tokyo 100-0005 | |
Japan | |
Phone: | +81-3-5533-2111 |
Email: | n-sakimura@nri.co.jp |