Upload
satoshi-hada
View
1.474
Download
3
Embed Size (px)
DESCRIPTION
大学での講義資料
Citation preview
Tokyo Research Laboratory
講義資料
XML セキュリティ概説
羽田知史 (Satoshi Hada)IBM 東京基礎研究所 (IBM Tokyo Research Lab)mailto: satoshih at jp ibm com
© 2003 IBM Corporation講義資料2
アジェンダ
1.SSL などセキュリティ技術の復習2.XML の概要説明3.XML セキュリティ標準
Tokyo Research Laboratory
講義資料
SSL の概要
Satoshi Hada (IBM Tokyo Research Lab)
© 2003 IBM Corporation講義資料4
SSL: データの秘匿性・完全性
© 2003 IBM Corporation講義資料5
SSL: サーバー認証
© 2003 IBM Corporation講義資料6
SSL: クライアント認証
© 2003 IBM Corporation講義資料7
SSL: クライアント認証
自分の秘密鍵で、自分の身元を証明する
© 2003 IBM Corporation講義資料8
暗号アルゴリズムの種類共通鍵暗号ベース(対称暗号)
公開鍵暗号ベース(非対称暗号)
秘匿性 共通鍵暗号DESAES
公開鍵暗号RSAElGamal
完全性 メッセージ認証コード(MAC)CMC-MACHMAC
ディジタル署名RSADSA
© 2003 IBM Corporation講義資料9
共通鍵暗号と公開鍵暗号
共通鍵暗号暗号化と復号に同じ鍵を使用鍵の配送が課題
公開鍵暗号暗号化と復号に異なる鍵を使用さらに、暗号化に使用する鍵は公開できる
© 2003 IBM Corporation講義資料10
公開鍵暗号では、鍵管理が楽になります
© 2003 IBM Corporation講義資料11
共通鍵暗号
暗号化と復号で同じ秘密鍵を使用する 例:
1976: Data Encryption Standard (DES)
2001: Advanced Encryption Standard (AES)
利点: 高速 : MB/sec ~ GB/sec
問題: 鍵管理:どうやって秘密鍵を共有するか?
© 2003 IBM Corporation講義資料12
メッセージ認証コード
秘密鍵を所持している人だけが、生成&検証できるデータ。 例:
CBC-MAC 共通鍵ブロック暗号を使用
HMAC (IETF RFC 2104) SHA-1 や MD5 などのハッシュ関数を使用
EK
M1
EK
M2
EK
M3
MAC
0
例えば、 DES
© 2003 IBM Corporation講義資料13
公開鍵暗号 暗号化と復号に異なる鍵を使用
さらに、暗号化に使用する鍵は公開できる 例
RSA :素因数分解の困難性 ElGamal :離散対数問題の困難性
利点: 鍵管理が比較的簡単
問題点: 低速 : KB/sec
© 2003 IBM Corporation講義資料14
ディジタル署名
秘密鍵で、自分だけが、生成できるデータ(否認不可)。 公開鍵を使用して、誰でも、検証できる。 例:
RSA :素因数分解の困難性 DSA :離散対数問題の困難性
© 2003 IBM Corporation講義資料15
this day of , 199 ,
by
AA WARDWARD CC ERTIFICATE
ERTIFICATE
PP
RESENTED TO:RESENTED TO:
We appreciate your contributions to our organization. In recognition of valuable
achievements and hard work, we gladly present this certificate of award.
Type name here
Type name herethis day of , 199 ,
by
AA WARDWARD CC ERTIFICATE
ERTIFICATE
PP
RESENTED TO:RESENTED TO:
We appreciate your contributions to our organization. In recognition of valuable
achievements and hard work, we gladly present this certificate of award.
Type name here
Type name here
サーバクライアント
公開鍵・秘密鍵ペア
認証局
公開鍵証明書の発行
公開鍵証明書の発行
SSL
Certificate Authority (CA)
PKI ( Public Key Infrastructure )概要
公開鍵・秘密鍵ペア
© 2003 IBM Corporation講義資料16
•公開鍵•持ち主の名前•この証明書を発行する認証局の名前•認証局によって生成された電子署名
MIIB8DCCAVkCBDnQPmGA1UEBhMCSlAxDDAKBoTA0lCTTEMMAoGA1UEFJMMRQwEgYDVQQDEwUkEgS2VudDAeFw0wMDANjEyNTJaFw0wMDEyMjUwTJaMD8xCzAJBgNVBAYTQwwCgYDVQQKEwNJQkBgNVBAsTA1RSTDEUMB
公開鍵証明書 (Certificate) の概要
© 2003 IBM Corporation講義資料17
SSL/TLS History
1994: Secure Sockets Layer (SSL) V2.0 1996: Secure Sockets Layer (SSL) V3.0 1999: Transport Layer Security (TLS) V1.0 2005/2006: TLS V1.1 (currently in the RFC
Editor’s Queue awaiting publication)
© 2003 IBM Corporation講義資料18
SSL プロトコルスタック
HTTP
SOAP
TCP/UDP
IP
Ethernet など
SSL が使用されないとき SSL が使用されるとき
HTTP
SOAP
TCP/UDP
IP
Ethernet など
SSL
© 2003 IBM Corporation講義資料19
this day of , 199 ,
by
AA WARDWARD CC ERTIFICATE
ERTIFICATE
PP
RESENTED TO:RESENTED TO:
We appreciate your contributions to our organization. In recognition of valuable
achievements and hard work, we gladly present this certificate of award.
Type name here
Type name herethis day of , 199 ,
by
AA WARDWARD CC ERTIFICATE
ERTIFICATE
PP
RESENTED TO:RESENTED TO:
We appreciate your contributions to our organization. In recognition of valuable
achievements and hard work, we gladly present this certificate of award.
Type name here
Type name here
サーバクライアント
秘密鍵 秘密鍵
公開鍵証明書
公開鍵証明書this day of , 199 ,
by
AA WARDWARD CC ERTIFICATE
ERTIFICATE
PP
RESENTED TO:RESENTED TO:
We appreciate your contributions to our organization. In recognition of valuable
achievements and hard work, we gladly present this certificate of award.
Type name here
Type name herethis day of , 199 ,
by
AA WARDWARD CC ERTIFICATE
ERTIFICATE
PP
RESENTED TO:RESENTED TO:
We appreciate your contributions to our organization. In recognition of valuable
achievements and hard work, we gladly present this certificate of award.
Type name here
Type name here
ハンドシェークプロトコル
秘密鍵(セッション鍵)の共有
レコードプロトコル
メッセージ MAC
暗号化
公開鍵証明書の交換
利用
SSL :プロトコル概要
© 2003 IBM Corporation講義資料20
サーバクライアント
秘密鍵
公開鍵証明書this day of , 199 ,
by
AA WARDWARD CC ERTIFICATE
ERTIFICATE
PP
RESENTED TO:RESENTED TO:
We appreciate your contributions to our organization. In recognition of valuable
achievements and hard work, we gladly present this certificate of award.
Type name here
Type name here
SSL: セッション鍵の共有
セッション鍵(乱数) K
を生成
Encyprt(ServerPK, K)
復号して K を取り出す
注意:実際には、認証とあわせて実行される
© 2003 IBM Corporation講義資料21
サーバクライアント
秘密鍵
公開鍵証明書this day of , 199 ,
by
AA WARDWARD CC ERTIFICATE
ERTIFICATE
PP
RESENTED TO:RESENTED TO:
We appreciate your contributions to our organization. In recognition of valuable
achievements and hard work, we gladly present this certificate of award.
Type name here
Type name here
SSL: サーバ認証
乱数 R
Sig (Server’s SK, R)
サーバの公開鍵で署名を検証
注意:実際には、セッション鍵の共有とあわせて実行される
Tokyo Research Laboratory
講義資料
XML (Extensible Markup Language) とは?
Satoshi Hada (IBM Tokyo Research Lab)
© 2003 IBM Corporation講義資料23
HTML (Hyper Text Markup Language)
© 2003 IBM Corporation講義資料24
HTML (Hyper Text Markup Language)
<?xml version="1.0" encoding="Shift_JIS"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <title>HTML のサンプル </title> </head> <body> <p>HTML のサンプルです。 </p> </body></html>
© 2003 IBM Corporation講義資料25
XML 文書
タグを含んだテキスト 開始タグと終了タグ
<p> 段落 </p> 空要素タグ
<br/> 開始タグ,空要素タグは属性を持つ
<p xml:lang=“ja”>
© 2003 IBM Corporation講義資料26
Web アプリケーションの観点から見た XML とは?
HTML( 表示 )
TCP/IP(通信)
XML(データ)
Java(プログラ
ミング言語)
© 2003 IBM Corporation講義資料27
XML はメタ言語です。
XML
HTML RSSJ2EE
DeploymentDescriptor
...XACML XBRL
© 2003 IBM Corporation講義資料28
OpenOffice 文書は XML で表現されます
© 2003 IBM Corporation講義資料29
Google Gadget は XML で表現されます
© 2003 IBM Corporation講義資料30
金融庁は、 XBRL の使用を義務付ける予定です
金融庁は 2008 年度から有価証券報告書(有報)などを提出する上場企業など約 8000 社に、財務諸表などのデータを容易に加工できる新しいコンピューター言語の使用を義務づける。投資家はサイト上の財務諸表を自分のパソコンに取り込むことで、企業の財務比較など加工・分析作業をしやすくなる。
財務報告用の新しいコンピューター言語は「XBRL」と呼ばれる。すでに米国など主要国は採用し、国際規格となりつつある。各国は任意採用にとどめているが、日本は一気に義務化する。
<group period="2000"> <item type="ci:incomeStatement.otherIncreaseDecreaseInUnappropriatedRetainedEarnings">371</item> <item type="ci:incomeStatement.unappropriatedRetainedEarningsEndOfYear">700</item> <item type="ci:notesToFinancialStatements.treasuryStockObtainedForDirectors">3</item> <item type="ci:notesToFinancialStatements.depreciationOfTangibleAssets">3496</item> <item type="ci:notesToFinancialStatements.netIncomePerShare">8.78</item> </group>
© 2003 IBM Corporation講義資料31
なぜ XML にするか ?
XML でいちおう表現できる 徹底的な国際化がされている 人間にとって読みやすく、理解しやす
い ツールが充実
特に、完成度の高い XML パーサがどこにでも無料で入手できる
© 2003 IBM Corporation講義資料32
XML の意義は、 XML のレベルで定義された様々な標準技術が、そのまま、アプリケーションのレベルで使用できることである
XML ( メタ言語 )
HTML XBRLJ2EE
DeploymentDescriptor
...
•アクセスAPI (DOM, SAX)•XPath•XSLT•XQuery•XML 署名・暗号
© 2003 IBM Corporation講義資料33
XML 文書を操作するための API
DOM (Document Object Model)パーサがメモリ上に XML 文書を展開するアプリケーションは、展開された XML 文書を操作する
SAX (Simple API for XML)パーサは、 XML 文書中の開始タグ,終了タグ,
文字内容を見つけるために、アプリケーションプログラムを呼び出す
アプリケーションは呼び出されるたびに何らかの処理をする
© 2003 IBM Corporation講義資料34
DOM API<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head> <title>HTML のサンプル </title> </head> <body> <p>HTML のサンプルです。 </p> </body></html>
html
head body
title p
import org.w3c.dom.*;
NodeList nl;Document doc=…;Element root=doc.getDocumentElement();String xmlns=root.getAttribute(“xmlns”);nl=root.getElementsByNameNS(xmlns, “head”);Element head=(Element)nl.itemi(0);nl=head.getElementByNameNS(xmlns, “title”);Element title=(Element)nl.itemi(0);nl=title.getChildNodes();
© 2003 IBM Corporation講義資料35
XPath
<bib><book>
<publisher> Addison-Wesley </publisher> <author> Serge Abiteboul </author> <author>
<first-name> Rick </first-name> <last-name> Hull </last-name>
</author> <author> Victor Vianu </author> <title> Foundations of Databases </title> <year> 1995 </year></book><book price=“55”>
<publisher> Freeman </publisher><author> Jeffrey D. Ullman </author><title> Principles of Database and
Knowledge Base Systems </title> <year> 1998 </year></book>
</bib>
<bib><book>
<publisher> Addison-Wesley </publisher> <author> Serge Abiteboul </author> <author>
<first-name> Rick </first-name> <last-name> Hull </last-name>
</author> <author> Victor Vianu </author> <title> Foundations of Databases </title> <year> 1995 </year></book><book price=“55”>
<publisher> Freeman </publisher><author> Jeffrey D. Ullman </author><title> Principles of Database and
Knowledge Base Systems </title> <year> 1998 </year></book>
</bib>
/ bib/book/yearResult:
<year> 1995 </year>
<year> 1998 </year>
/ bib/book/yearResult:
<year> 1995 </year>
<year> 1998 </year>
/bib/paper/yearResult:
Empty
/bib/paper/yearResult:
Empty
//titleResult: <title> Foundations of Database </title>
<title> Principles of Database and
Knowledge Base Systems
</title>
//titleResult: <title> Foundations of Database </title>
<title> Principles of Database and
Knowledge Base Systems
</title>
斉藤 太郎(東京大学)さんの資料からの抜粋
© 2003 IBM Corporation講義資料36
XSLT (XSL Transformations)
XSLT プロセッサー
HTML
<group period="2000"> <item>371</item> <item>700</item> <item>3</item> <item>3496</item> <item>8.78</item> </group>
HTMLXML
<xsl:template match="element1">
<element2>
<xsl:apply-templates />
</element2>
</xsl:template>
XML
XSL (Extensible Stylesheet Lnaugage)
© 2003 IBM Corporation講義資料37
XQuery
FOR $x IN document("bib.xml")/bib/book
WHERE $x/year > 1995
RETURN $x/title
FOR $x IN document("bib.xml")/bib/book
WHERE $x/year > 1995
RETURN $x/title
<title> Principles of Database and Knowledge Base Systems </title>
<title> Principles of Database and Knowledge Base Systems </title>
<bib><book>
<publisher> Addison-Wesley </publisher> <author> Serge Abiteboul </author> <author>
<first-name> Rick </first-name> <last-name> Hull </last-name>
</author> <author> Victor Vianu </author> <title> Foundations of Databases </title> <year> 1995 </year></book><book price=“55”>
<publisher> Freeman </publisher><author> Jeffrey D. Ullman </author><title> Principles of Database and Knowledge Base Systems </title> <year> 1998 </year></book>
</bib>
<bib><book>
<publisher> Addison-Wesley </publisher> <author> Serge Abiteboul </author> <author>
<first-name> Rick </first-name> <last-name> Hull </last-name>
</author> <author> Victor Vianu </author> <title> Foundations of Databases </title> <year> 1995 </year></book><book price=“55”>
<publisher> Freeman </publisher><author> Jeffrey D. Ullman </author><title> Principles of Database and Knowledge Base Systems </title> <year> 1998 </year></book>
</bib>
斉藤 太郎(東京大学)さんの資料からの抜粋
Tokyo Research Laboratory
講義資料
XML セキュリティ標準
ワシントン大学の講義資料に基づいて作成されていますhttp://www.cs.washington.edu/education/courses/csep590/06wi/lectures/
Satoshi Hada (IBM Tokyo Research Lab)
© 2003 IBM Corporation講義資料39
XML セキュリティの位置づけ
Session ベースのプロトコル Kerberos
SSL/TLS
IPSEC Message ベースのプロトコル
S/MIME( バイナリデータが対象 )
XML-DSIG & XML-ENC ( XML データが対象)
© 2003 IBM Corporation講義資料40
XML の暗号化や署名に、 S/MIME を使用することは可能ですが、いくつか問題があります。
1.暗号化・署名共通の問題XML の暗号化や署名の結果がバイナリデータになり、 XML でなくなってしまう。その結果、 XML の様々なツールが使えない。
2.署名特有の問題厳密には異なる XML データであっても、同じSemantics をもつ場合がある。そのような異なる XML データの署名データは同じ値になるべきであるが、 S/MIME を使用すると異なる署名データになる。
© 2003 IBM Corporation講義資料41
XML-DSIG と XML-ENC の標準化
1. XML-DSIG July 1999 に W3C&IETF の共同プロジェクトとしてスタート スペック
W3C Recommendation (12 February 2002 ) IETF RFC 3275 (March 2002)
標準API - JSR-105: XML Digital Signature APIs (Final release)
2. XML-ENC Summer 2000 に W3C でスタート スペック - W3C Recommendation (10 December 2002)
標準API - JSR 106: XML Digital Encryption APIs (in progress)
Tokyo Research Laboratory
講義資料
XML 署名XML-DSIG
© 2003 IBM Corporation講義資料43
署名の例<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-
20010315" /> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI="http://www.farcaster.com/index.htm"> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> <DigestValue>XoaHIm+jLKnPocR7FX0678DUOqs=</DigestValue> </Reference> </SignedInfo> <SignatureValue>
M5BhlrxPaOEYcCwSZ3WEDR6dfK5id/ef1JWK6OO5PEGHp9/JxrdA2xT5TYr5egArZGdVURpMVGUeViWoeHcGAyMNG9Cmc/I56sYd/TSV/MjLgb/mxq+6Fh/HWtVhjHIG+AdL4lA+ZxxEi147QVVzgCl4+dvIZaGo7oAFneDKv0I=
</SignatureValue></Signature>
© 2003 IBM Corporation講義資料44
XML-DSIG 標準の概要
ディジタル署名と MAC の両方に対応。 署名データは XML として表現される。 署名対象のデータは、 XML 文書でも任意
のバイナリデータでもよい。 WS-Securityへの応用
© 2003 IBM Corporation講義資料45
XML-DSIG の主な特徴
XML-DSIG は3種類の署名形態がある。 Wrapped, Detached and Embedded
XML-DSIG は、 XML 文書全体やその一部に対して、適用可能
XML-DSIG は、 Canonicalization(正規化 ) をサポート Some modifications to the text must be allowed
and not break the signature XML-DSIG は、複数の XML 文書への署名
が可能
© 2003 IBM Corporation講義資料46
Wrapped Signatures
署名対象のデータが署名データに含まれる。
CMS (S/MIME) と同様 署名対象のデータのサイ
ズが小さいときに利用される
XMLDSIG Signature
SignedInfo
Includes pointer to Signed content
Signed Content
© 2003 IBM Corporation講義資料47
Detached Signatures
署名対象のデータと署名データは、分離される。
non-XML データを署名するときに有用 E.g. audio/visual data
stream
XMLDSIG Signature
SignedInfo
Includes pointer to Signed content
Signed Content(separate XML resource)
© 2003 IBM Corporation講義資料48
Embedded Signatures
XML-DSIGユニークなメカニズム
署名対象のデータが、署名データを含む あらかじめ署名対象のデー
タのスキーマがそのように設計されているべき
XMLDSIG Signature
SignedInfo
Includes pointer to Signed content
Signed Content
© 2003 IBM Corporation講義資料49
Alice Bob
Alice completes her part andsends F to Bob so Bob cancomplete his part
On-line form
Alice’s part
Bob’s part
Form F
Bob’s part
Form F
On-line form
Alice’s part
Bob’s part
Form F
Alice starts with a blank form
Bob completes his part and fills out the remainder of the form
Workflow Scenario
Alice’s sig
On-line form
Alice’s part
Alice’s sig
Bob’s sig
© 2003 IBM Corporation講義資料50
XML-DSIG では、署名前に入力データを加工する仕組みがあります。
署名する前に、 Transformation を通じて、入力データを加工するメカニズム Canonicalization(正規化 )
BASE64 の Decoding
XPathフィルタリング XSLT
Tra
nsf
orm
1
Input Content
Tra
nsf
orm
2
Tra
nsf
orm
n
... To-be-signedContent
© 2003 IBM Corporation講義資料51
XML 文書の正規化 Canonicalization (C14N)
XML のテキスト表現を canonical form bytestream に変換する すべての semantically-equivalent な XML 文書は同じ canonical form
bytestream をもつ 属性は、アルファベット順にソートされる 文字のエンコーディング方式を「 UTF-8」に統一する 改行文字は「 #xA」に統一する 空要素は開始タグと終了タグを続け、「 <xxx></xxx>」と記述する 不要な空白は削除する タグの途中で改行しない
<Contract id=“abcdefeg” date=“2007/05/29”> I pay for …</Contract>
<Contract date=“2007/05/29” id=“abcdefeg”> I pay for …</Contract>
C14N
© 2003 IBM Corporation講義資料52
署名生成のフロー
署名データは、 C14N の結果をハッシュした後に、生成される。
Input Content
To-be-signedContent
C14N Bytestream
Hash function
Signature Algorithm
0-n Transforms
Signature Value
© 2003 IBM Corporation講義資料53
Signature
SignedInfo
Identifies the signature algorithm, canonicalization method and the list of signed contents.
KeyInfo (optional)
Information related to the signing key
SignatureValue
The actual signature value, computed over the contents of the SignedInfo element
Object (optional)
Optional sub-element usually used to embed signed content within the signature
XML-DSIG スキーマの概要 ルート要素
<Signature> <SignedInfo> と
<SignatureValue> はrequired
<Keyinfo> と <Object> は optional
© 2003 IBM Corporation講義資料54
SignedInfo
CanonicalizationMethod
Identifies the canonicalization algorithm.
Reference (one or more)
Identify specific content signed by the signature
SignatureMethod
Identifies the digital signature algorithm.
<SignedInfo> 要素の概要 The <SignedInfo>
element contains a list <Reference> elements
Each <Reference> element points to a piece of signed content <SignedInfo> is a
manifest listing all the contents signed by the signature
URI (pointer to content)
DigestMethod (hash algorithm for content)
DigestValue (content’s hash value)
Transforms (optional) – Used to select a portion of the URI’s content for signing
© 2003 IBM Corporation講義資料55
署名の例<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-
20010315" /> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI="http://www.farcaster.com/index.htm"> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> <DigestValue>XoaHIm+jLKnPocR7FX0678DUOqs=</DigestValue> </Reference> </SignedInfo> <SignatureValue>
M5BhlrxPaOEYcCwSZ3WEDR6dfK5id/ef1JWK6OO5PEGHp9/JxrdA2xT5TYr5egArZGdVURpMVGUeViWoeHcGAyMNG9Cmc/I56sYd/TSV/MjLgb/mxq+6Fh/HWtVhjHIG+AdL4lA+ZxxEi147QVVzgCl4+dvIZaGo7oAFneDKv0I=
</SignatureValue></Signature>
Tokyo Research Laboratory
講義資料
XML 暗号XML-ENC
© 2003 IBM Corporation講義資料57
XML-ENC 標準の概要
暗号化の対象となるデータは、 XML 要素、 XML 要素の内容、および、任意のデータ( XML 文書を含む)です。
暗号化の結果は、 XML 要素であり、暗号文そのもの、あるいは、暗号文への参照を含みます。
© 2003 IBM Corporation講義資料58
XML-ENC サンプル
<?xml version='1.0'?><PaymentInfo xmlns='http://example.org/paymentv2'>
<Name>John Smith</Name><CreditCard Limit='5,000' Currency='USD'>
<Number>4019 2445 0277 5567</Number><Issuer>Example Bank</Issuer><Expiration>04/07</Expiration>
</CreditCard></PaymentInfo> s
1. <CreditCard> 要素そのもの2. <CreditCard> 要素の内容(子要素など)3. <Number> 要素の内容(テキスト)
© 2003 IBM Corporation講義資料59
XML-ENC サンプル (1)
<?xml version='1.0'?><PaymentInfo xmlns='http://example.org/paymentv2'>
<Name>John Smith</Name><EncryptedData Type='http://www.w3.org/2001/04/xmlenc#Element’ xmlns='http://www.w3.org/2001/04/xmlenc#'>
<CipherData><CipherValue>A23B45C56</CipherValue>
</CipherData></EncryptedData>
</PaymentInfo>
<CreditCard> 要素が、暗号化された結果、 <EncryptedData> で置き換えられる。
© 2003 IBM Corporation講義資料60
XML-ENC サンプル (2)
<?xml version='1.0'?><PaymentInfo xmlns='http://example.org/paymentv2'> <Name>John Smith</Name> <CreditCard Limit='5,000' Currency='USD'> <EncryptedData xmlns='http://www.w3.org/2001/04/xmlenc#‘ Type='http://www.w3.org/2001/04/xmlenc#Content’> <CipherData> <CipherValue>A23B45C56</CipherValue> </CipherData> </EncryptedData> </CreditCard></PaymentInfo>
<CreditCard><CreditCard> 要素の内容(子要素など)が、暗号化された結要素の内容(子要素など)が、暗号化された結果、果、 <EncryptedData><EncryptedData> で置き換えられる。で置き換えられる。
© 2003 IBM Corporation講義資料61
XML-ENC サンプル (3)
<?xml version='1.0'?><PaymentInfo xmlns='http://example.org/paymentv2'> <Name>John Smith</Name> <CreditCard Limit='5,000' Currency='USD'> <Number> <EncryptedData xmlns='http://www.w3.org/2001/04/xmlenc#’ Type='http://www.w3.org/2001/04/xmlenc#Content'> <CipherData> <CipherValue>A23B45C56</CipherValue> </CipherData> </EncryptedData> </Number> <Issuer>Example Bank</Issuer> <Expiration>04/07</Expiration> </CreditCard></PaymentInfo>
<Number><Number> 要素の内容(テキスト)が、暗号化された結果、要素の内容(テキスト)が、暗号化された結果、 <EncryptedData><EncryptedData>で置き換えられる。で置き換えられる。
© 2003 IBM Corporation講義資料62
XML-ENC の主な特徴
Wrapped あるいは detached CipherData 暗号化されたデータはどのように暗号化されたかを
示すメタデータ内に保持されてもよいし、あるいは、別に送信されてもよい
EncryptedKey inside KeyInfo Bulk データの暗号化に使用する鍵(受け取り手の公
開鍵で暗号化された)はデータと共に送信可能 (S/MIME と同様に ) 。
Detached CipherData の参照は、 XML-DSIG と同じ Transform のメカニズムを使用している
© 2003 IBM Corporation講義資料63
EncryptedData or EncryptedKey
EncryptionMethod (optional)
Optional element that describes the encryption algorithm used to protect the CipherData.
CipherData
Envelopes or references encrypted data
KeyInfo
Information identifying the key used to encrypt the CipherData
EncryptionProperties (optional)
Optional sub-element
ルート要素は<EncryptedData> あるいは <EncryptedKey>
<EncryptedKey> は、 <EncryptedData> から派生しており、2つ追加の特長をもつ <CipherData> は常に秘
密鍵を暗号かしたもの <EncryptedKey> は、
<EncryptedData> の<KeyInfo> 内に保持される場合がある
XML-ENC スキーマの概要
© 2003 IBM Corporation講義資料64
その他のセキュリティ関係の XML 標準
OASISWS-Security
XACMLSecurity Assertion Markup Language (SAML)
XML syntax on security assertions
Authentication assertionsAttribute assertionsAuthorization decision assertions