出力される結果 (CNG の例)

CNG (Cryptography Next Generation) のセキュリティで保護された通信の例は 3 つのアプリケーションで構成されます。各アプリケーションは、それぞれ、大量の結果をテキストで出力します。例には、出力内容の異なる 5 つのバージョンが含まれています。これらのアプリケーションとバージョンの詳細については、「CNG (Cryptography Next Generation) のセキュリティで保護された通信の例」および「ソース コードの概要」を参照してください。

このトピックは次のセクションで構成されています。各セクションで出力結果を部分的に紹介します。

  • Alice ([オプション] メニュー)

  • バージョン 1 ~ 5 (傍受なし、非詳細モード)

  • バージョン 3 (傍受あり、非詳細モード)

  • バージョン 4 ~ 5 (傍受あり、詳細モード)

出力セクションで、コロンの後ろに不等号記号 (:>) が付いている場合、プロンプトであることを示します。省略記号 (...) は、前の出力ブロックと内容が変わらない場合に、出力行が省略されていることを示します。

次の図は、セッションの開始時に表示される 3 つのコンソール ウィンドウを示します。

CNG からの出力

Alice ([オプション] メニュー)

次の出力は、セッションの開始時に Alice に表示される [オプション] メニューを示します。

Cryptography Next Generation Secure Communication Example
------------------------------------------------------------------
Please select a security model:
1 = Plaintext only.2 = Encrypt messages.3 = Encrypt messages, use public key to digitally sign messages.4 = Encrypt messages, use private key to digitally sign messages.5 = Encrypt messages, use private key to digitally sign messages
    and cryptographic keys.Causes Abort on security failures.x = Exit.:> 3
Include Mallory?y/n
:> y
Verbose output mode?y/n
:> y

バージョン 1 ~ 5 (傍受なし、非詳細モード)

このセクションには、Alice.exe (バージョン 1 ~ 5) で生成される出力部分を表示します。非詳細モードを選択し、Mallory による傍受を無効にしています。

Alice (バージョン 1)

次の出力は、暗号化、デジタル署名、または傍受を行わない場合に Alice と Bob が基本的なメッセージ交換を行うとどうなるかを示したものです。

Cryptography Next Generation Secure Communication Example
Security Version: 1  Mode: Regular   Mallory: no   Signatures: no
-----------------------------------------------------------------------
Hi, I'm Alice Green.My sales associate is Bob White.I need to send him a customer order right now!:> Hi Bob.I have a new customer contact.Hi Alice.That is good news.Please send it to me.:> Here it is: Coho Winery, 111 AnyStreet, Chicago
   Thanks, I'll arrange to meet him....

Alice (バージョン 2)

次の出力は、Alice と Bob が暗号化キーを使用してメッセージを暗号化するとどうなるかを示したものです。

Cryptography Next Generation Secure Communication Example
Security Version: 2   Mode: Regular   Mallory: no   Signatures: no
-----------------------------------------------------------------------
...-----------------------------------------------------------------------
Now Bob will publicly send me his public cryptographic key:
Listening...-----------------------------------------------------------------------
Now that our keys have been exchanged,
we can have an encrypted conversation:
-----------------------------------------------------------------------
:> Hi Bob.I have a new customer contact.Hi Alice.That is good news.Please send it to me.:> Here it is: Coho Winery, 111 AnyStreet, Chicago
   Thanks, I'll arrange to meet him.-----------------------------------------------------------------------
...

Alice (バージョン 3 ~ 5)

次の出力は、Alice と Bob がデジタル署名を使用してキーおよびメッセージに署名するとどうなるかを示したものです。fMallory フラグが false (傍受なし) であるため、出力内容は前のセクションとほとんど同じです。

Cryptography Next Generation Secure Communication Example
Security Version: 3   Mode: Regular   Mallory: no   Signatures: yes
-----------------------------------------------------------------------
Hi, I'm Alice Green.My sales associate is Bob White.I need to send him a customer order right now!First, I will send Bob a digital signature key over a public channel.-----------------------------------------------------------------------
Now we will exchange our public cryptographic
keys through a public channel.First, I'll send Bob my key.Sending...-----------------------------------------------------------------------
Now Bob will publicly send me his public cryptographic key:
Listening...-----------------------------------------------------------------------
Now that our keys have been exchanged,
we can have an encrypted conversation:
-----------------------------------------------------------------------
...

バージョン 3 (傍受あり、非詳細モード)

このバージョンは、fMallory フラグが true に設定されているとどうなるかを示します。Bob が Alice から受信するアドレスをよく確認し、前のセクションで Bob が受信したアドレスと比較してください。Mallory がアドレスを傍受し、若干の変更を加えていることがわかります。

Alice と Bob が各メッセージと共にデジタル署名を送信しましたが、Mallory はメッセージを傍受できます。これは、Alice と Bob がセキュリティで保護されていない同じチャネルを経由して、デジタル署名のキーを暗号化キーとして送信したためです。Mallory は両方のキーを傍受できます。Mallory は傍受した暗号化キーを使用して自分のメッセージを暗号化し、デジタル署名のキーを使用してメッセージに署名します。Alice と Bob は同じキーを使用しているため、不審なユーザーはだれもいません。

Bob (バージョン 3)

次の出力は、Bob のコンソール ウィンドウから取得したものです。ここには、Bob が Mallory から受信したメッセージが表示されています。

Cryptography Next Generation Secure Communication Example
Security Version: 3   Mode: Regular   Mallory: yes   Signatures: yes
----------------------------------------------------------------------
Hi, I'm Bob White: My sales associate is Alice Green.I think she has a new customer contact for me!First, Alice will publicly send me a digital signature key.-----------------------------------------------------------------------
Now we will exchange our public cryptographic
keys through a public channel.First, Alice will send me her key.Listening...-----------------------------------------------------------------------
Next, I will send my public cryptographic key to Alice:
Sending...-----------------------------------------------------------------------
Now that our keys have been exchanged,
we can have an encrypted conversation:
-----------------------------------------------------------------------
   Hi Bob.I have a new customer contact.:> Hi Alice.That is good news.Please send it to me.Here it is: Coho Winery, 111 AnyStreet, Chicago
:> Thanks, I'll arrange to meet him.-----------------------------------------------------------------------...

Mallory (バージョン 3)

次の出力は、Mallory のコンソール ウィンドウから取得したものです。Mallory が Alice と Bob のメッセージを傍受して変更した方法が示されています。

Cryptography Next Generation Secure Communication Example
Security Version: 2   Mode: Regular   Mallory: yes   Signatures: no
-----------------------------------------------------------------------
Hi, I'm Mallory, the man in the middle.I wonder what Alice and Bob are talking about.I think I'll listen in.-----------------------------------------------------------------------
Alice and Bob are going to exchange their
public cryptographic keys through a public channel.First, Alice will send Bob her key.Good.I just intercepted Alice's public key:
Next, I will send my MalloryAlice public cryptographic key to Alice:

Sending...Next, I will send my MalloryBob public cryptographic key to Bob:

Sending...Now I will receive Bob's public key:
Good.I just intercepted Bob's public key:
-----------------------------------------------------------------------
Now that they have exchanged their keys,
they can have a secure conversation:
-----------------------------------------------------------------------
From Alice:
   Hi Bob.I have a new customer contact.To Bob:
:> Hi Bob.I have a new customer contact.From Bob:
   Hi Alice.That is good news.Please send it to me.To Alice:
:> Hi Alice.That is good news.Please send it to me.From Alice:
   Here it is: Coho Winery, 111 AnyStreet, Chicago
To Bob:
:> Coho Winery, OneEleven EveryStreet, Chicago
From Bob:
   Thanks, I'll arrange to meet him.To Alice:
:> I think the address is wrong, but I'll keep trying.-----------------------------------------------------------------------
I am so clever!Here is what I received: Coho Winery, 111 AnyStreet, Chicago
and here is what I sent: Coho Winery, OneEleven EveryStreet, Chicago

They will never catch me!-----------------------------------------------------------------------
...

バージョン 4 ~ 5 (傍受あり、詳細モード)

バージョン 4 と 5 では、Alice は Bob にプライベートなデジタル署名のキーを送信します。Alice と Bob はこのキーを使用して、自分たちのメッセージに署名します。Mallory は、Alice が Bob にキーを送信するときに使用するプライベート チャネルについて認識していません。そのため、Mallory は引き続き、パブリック チャネルで傍受したデジタル署名のキーを使用します。

Bob (バージョン 4)

このセクションには、完全かつ詳細な出力が表示されます。暗号化されたデジタル署名のキー、メッセージの暗号化キー、および暗号化されたメッセージを参照できます。このバージョンには、未確認のデジタル署名が検出されたときのセキュリティ警告も含まれます。

Cryptography Next Generation Secure Communication Example
Security Version: 4   Mode: Verbose   Mallory: yes   Signatures: yes
-----------------------------------------------------------------------
Hi, I'm Bob White: My sales associate is Alice Green.I think she has a new customer contact for me!First, Alice will publicly send me a digital signature key.Here it is:

☻???x???♥??♦ ?ie??t?VD?A?Y??▬☻§?Ed►??H?Hm2G¶?E??N?!`?☺¶^[←?↨?▬d?K9zdnJ
?☻?:↓?☺ ?L?K???C+♦??c?*7↓l?§??-??`L?h↓?GF?=???????????↔??&1|☺?????%?_????Now Alice privately sent me a digital signature key.I will use it instead.Here it is:

0??☻☺ 0►♠*?H?=☻☺♠♣+?♦ #♦??0??☻☺☺♦B☺??t
???♥??♦☺?V??)???s<m{sGM!?;~??d??Oc`♦?j??⌂§?d??b??????????,?♠  ??4?]???.??☺DN)3?=T↨??p>M???X?B????50??????E§?B?nr?z?/r??U????7,⌂?n?SL??,+
-----------------------------------------------------------------------
Now we will exchange our public cryptographic
keys through a public channel.First, Alice will send me her key.Listening...========  SECURITY ERROR!!===========
Cryptographic Key: Failure verifying digital signature.Here it is: an ECDH public KeyBlob
encoded within an XML string:

<ECDHKeyValue xmlns="http://www.w3.org/2001/04/xmldsig-more#">
  <DomainParameters>
    <NamedCurve URN="urn:oid:1.3.132.0.35" />
  </DomainParameters>
  <PublicKey>
    <X Value="5810718142462989354994453278603666484069278865008031317447
037792465942980799716553452148826647328907514445799324904361787703912513
195249832409677600954844765" />
    <Y Value="3280794663882281563639053942916365892460715799983953322007
508591453180081202861463948160922147015703385178443338980028430040655324
927942630539423460021361227" />
  </PublicKey>
</ECDHKeyValue>
-----------------------------------------------------------------------
Next, I will send my public cryptographic key to Alice:

Sending...Here it is: an ECDH public KeyBlob
encoded within an XML string:

<ECDHKeyValue xmlns="http://www.w3.org/2001/04/xmldsig-more#">
  <DomainParameters>
    <NamedCurve URN="urn:oid:1.3.132.0.35" />
  </DomainParameters>
  <PublicKey>
    <X Value="2455055322326895878650801953827546401118074905382497016837
137236585732889354895381530732942808710858667195863286496064074787137035
924365385948877294503335106" />
    <Y Value="1218921928274644208762495755994900948182290688858431853778
446672036473174952224569387259723200925573098776195363817761522302928910
53555717400648130000558239" />
  </PublicKey>
</ECDHKeyValue>
-----------------------------------------------------------------------
Now that our keys have been exchanged,
we can have an encrypted conversation:
-----------------------------------------------------------------------
   Incoming message:

??(??m?⌂4i?JOgion vector:  ?Ciphertext:
??∟↓[\▼?3♦Z GTGa>?&??,?x3f1Sh7L↓n?dc?I?A??\?P?l⌂X⌂@?V#??G??(O???6?♦☻)?PJ???@{N

   Signature:
?QF????¶☻       ~?YA?????oJ?7??{◄?oVg???L?→←3?⌂§?Y???Ca??S?Rl?v8(??????I0 ?♦?|???L9|??????????♦&)??gm??28?!??L?U?, ???N??@4??2§S

   Incoming decoded message:

   Hi Bob.I have a new customer contact.SECURITY WARNING!Received signature did not verify
-----------------------------------------------------------------------

:> Hi Alice.That is good news.Please send it to me.-----------------------------------------------------------------------
   Incoming message:

   Initialization vector:  ??4??♂??§??♫:(??Ciphertext:
?m?????y??x'~?<⌂yZ???G??Q????§????↕G??☼M?(?y[§▼→a?f%L??????←    ????y???&??z ?p?????[?p

   Signature:
 ???7[?ju???4??]???F?l?'-A??@?l??‼?¶F"k???g??♀{??S??????▲?t.?;???↕▬?u?♠♀
?!%}?????∟?☻?*?a?"◄o??▬??,?w??F▲k??Y∟?▲???j??T???↕♫2???Incoming decoded message:

   Coho Winery, OneEleven EveryStreet, Chicago
SECURITY WARNING!Received signature did not verify
-----------------------------------------------------------------------
:> Thanks, I'll arrange to meet him.-----------------------------------------------------------------------

Bob (バージョン 5)

前のバージョンと同様に、バージョン 5 はプライベートなデジタル署名のキーを使用して、メッセージ暗号化キーに署名します。また、このバージョンでは、セキュリティ エラーが検出されると直ちにセッションが終了されます。

Cryptography Next Generation Secure Communication Example
Security Version: 5   Mode: Verbose   Mallory: False   Sign keys: true
-----------------------------------------------------------------------
Hi, I'm Bob White: My sales associate is Alice Green.I think she has a new customer contact for me!First, Alice will publicly send me a digital signature key.Here it is:
...Now Alice will privately sent me a digital signature key.I will use it 
instead.Here it is:
...-----------------------------------------------------------------------
Now we will exchange our public cryptographic
keys through a public channel
First, Alice will send me her key.Listening...========  SECURITY ERROR!===========
Cryptographic Key: Failure verifying digital signature.Contact your security administrator.TERMINATING SESSION

参照

概念

CNG (Cryptography Next Generation) のセキュリティで保護された通信の例

暗号サービス