コンテンツにスキップ

IPsec

出典: フリー百科事典『ウィキペディア(Wikipedia)』

IPsecSecurity Architecture for Internet ProtocolInternet Protocol SecurityIPIP[1] IP 

IPsecIPv6[2]IPv4IP

バージョン

[編集]

IPsecの規格はIETFの ipsec wg にて策定し、RFCとして公開している。IETF ではIPsecにバージョン番号を与えていないが、非公式に下記のバージョンが与えられて[3]おり、2016年現在のバージョンはIPsec-v3である:

  • IPsec-v1:RFC182x 形式のもの
  • IPsec-v2:RFC240x 形式のもの
  • IPsec-v3:RFC430x 形式のもの

プロトコル概要

[編集]

構成

[編集]

IPsec2SA (Security Association)SA2SA

IPIP

IPsec1SA2SA

IPsecSPDsecurity policy databaseSADsecurity association database2

SPDIP(TCP/UDP/ICMP)TCPdiscardIPsec使bypass IPsecIPsec使apply IPsec

SADSA

プロトコルの流れ

[編集]

SRIPsec3

SRSA

SA使SR

R

SA 3

SAの確立

[編集]

SSPDRIPsec

IPsecSSASADSAD

SASADSAIKEInternet Key ExchangeR2016IKEIKEv2

IKESAR

SAIKEKerberized Internet Negotiation of Keys (KINK)IPSECKEY DNS records使[4][5][6][7]

暗号通信

[編集]

SASR2

AH (Authentication Header) IP(MAC)IP51

ESP (Encapsulated Security Payload) IPIP50

AHESPSA

ESPAH

2



IP

2使使

受信時の処理

[編集]

ピアRは、パケットを受け取り、SADの記載に従って、パケットを破棄するか否かを決める。そして、パケットがIPsecのものであれば、パケットを復号し(暗号化されている場合)、さらにメッセージ認証の検証を行った上で、上位レイヤーのプロトコルにパケットを渡す。パケットがIPsecではなく通常のIPのものである場合、復号などの処理を施さず、直接上位レイヤーのプロトコルにパケットを渡す。

利用する暗号方式

[編集]

RFC 7321 2.3-2.4SHOULD

AHMACAES-GMACSHOULD+AES-XCBC-MAC 96AES-XCBC-MAC-96SHOULDNULLMACMAY

ESPAES-GCMSHOULD+Encryption-then-Mac (EtM)NULL AES-CBCMUSTMACHMAC-SHA196(HMAC-SHA1-96)MUST128AES-GMACSHOULD+AES-XCBC-MAC 96AES-XCBC-MAC-96SHOULD

AHAES-GMACESPAES-GCM(RFC 7321 4.14.3)

各プロトコルの詳細

[編集]

AH

[編集]

AH (Authentication Header) は、認証および改竄防止機能を提供する。データそのものは暗号化されないので、盗聴防止には利用できない。RFC 1826 形式の AH には再送防止機能 (Anti Replay Counter) が無いが、RFC 2402 では 32 bit の、RFC 4302 では 64 bit のカウンタが付けられており、過去に送信されたパケットがコピー再送されても多重受信しない機能がオプションとして利用できる。

Authentication (AH)ヘッダー フォーマット (RFC2402/RFC4302形式)
Offsets Octet16 0 1 2 3
Octet16 Bit10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Next Header ペイロード 予約済み
4 32 Security Parameters Index (SPI)
8 64 順序番号
C 96 Integrity Check Value (ICV)

ESP

[編集]

ESP (Encapsulated Security Payload)  IPRFC 1827  ESP RFC 2406 / RFC 4303  ESP AH (IP)AH

RFC 1826 / RFC 1827  AH/ESP  RFC RFC 4302 / RFC 4303  64 bit  ESN (Extended Sequence Number)  32 bit  RFC 2402  (ICV)  64 bit 使RFC 2402 / RFC 2406  IPsec  RFC 4302 / RFC 4303  IPsec RFC 4302 / RFC 4303  IPsec  RFC 2402 / RFC 2406 32 bit 使
Encapsulating Security Payload(ESP) フォーマット (RFC2406/RFC4303形式)
Offsets Octet16 0 1 2 3
Octet16 Bit10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Security Parameters Index (SPI)
4 32 順序番号
8 64 ペイロード
   
  Padding (0-255 octets)  
  Pad Length Next Header
Integrity Check Value (ICV)

IKE

[編集]

IKE (Internet Key Exchange protocol) は SAを構築するのに必要な情報の交換を安全に行うプロトコル。IKEv1 (RFC 2409) と IKEv2 (RFC 4306) が定義されており、2016年現在の最新版は後者である。

また IKEv1/v2 以外にも Photuris (RFC 2522), KINK (RFC 4430) などの鍵交換プロトコルが提案されている。

IKEv2

[編集]

IKEv1

[編集]

IKEv1 Internet Key Exchange protocol version 1 UDP500 ISAKMP/Oakley ISAKMP(Internet Security Association and Key Management Protocol) Oakley IKEv1  ISAKMP 

IKEv1 121 IKE ISAKMP SA2 IPsec IPsec SA  1 Main Mode,Aggressive Mode 2 ISAKMP  Identity Protection Exchange  ISAKMP  Aggressive Exchange  IKE  212 Quick Mode  ISAKMP  IKEv1 IKEv1  New Group Mode 使

Oakley  Diffie-Hellman (DH-MODP)  (EC2N) 2 DH-MODP 768,1024,1536,2048,3072,4096,6144,8192bitEC2N 155,188,163,283,409,571bit 

IKE  IKE IKE Oakley  IPsec SA 使 IPsec Security Policy RFC 4301  Peer Authorization Database (PAD) 

Aggressive Mode 1 Main Mode 36  1.53 Main Mode IDAgressive ModeID1 (PAD) 

IKEv1 1- (PSK:Pre Shared Key) (Digital Signatures) (Public Key Encryption) 

2 IPsec SA 1 IPsec SA 使 IPsec SA 1IKEv1  Perfect Forward Secrecy (PFS) PFS 2 Oakley  IPsec SA PFSPAD

11212 PFS  Master PFS PFS Session PFS 

 IKEv1  RFC  IKEv1  Microsoft Windows  IPsec )IETF IKEv1 IPsec 使

IETF  IKEv1 IKEv2 

IPsec の特徴

[編集]

暗号化する層

[編集]

IPsecはネットワーク層でセキュリティを実現するプロトコルであるため、アプリケーションなどの上位層が暗号化をサポートしていない場合でも通信全体としてのセキュリティを担保することが出来る。なおセキュリティをネットワーク層で実現しているため、アプリケーション層でセキュリティを実現しているTLSのように暗号化がどのプロトコルで行われているかをユーザーが容易に知ることはできない(TLSではwebブラウザに鍵マークが表示されるなど一見してそれが分かる表示がされる場合がある)。 PCやスマートフォンなどのコンシューマ端末でもIPsecを利用することは可能であるが、現状は専門の技術者が管理するGateway間でVPNとして利用されることが多い。IPsecをVPNで利用する場合はIPアドレスを二重に付加するトンネルモードが利用できるが、IP以外のパケットも伝達するためL2TPなどのプロトコルと併用される場合もある。

柔軟さと設定の複雑さ

[編集]

IPsecAHESP使AH/ESP IPsec IPsec使IPsecVPN IKEv1,IKEv2,KINK,PhoturisIKEv1IPsec使

IPsec が使えるシステム

[編集]

Windows - Windows 2000 / XP IPv4, IPv6 IPv6ESPWindows VistaIPv4IPv6

macOS - KAMEIPsecOSGUIL2TP / IPsec

BSD - FreeBSDNetBSDKAMEOpenBSD

Linux - IPv4IPv6IKEKAMEipsec-toolsracoonFreeS/WANOpenswanstrongSwan

歴史

[編集]

199312IPen:swIPe (protocol)AT&T

whitehouse.gov(1993611995120)19947IPIPBSDIIPSecSunOSHP-UXUNIXDESDESIntel 80386T1CryptoCryptoT1Gauntlet199412西

IP (ESP) [8]DARPA調199312IETFSIPPSIPP[9]ESPISONLSPSP3DSP3DNISTAHSimple Network Management Protocol(SNMP)2IETF

1995IETFIPsec(SDNS)SDNS3(SP3)NISTISO(NLSP)[10]SP3(KMP)IPsec

IPsec(IETF)Request for Comments(RFC)IPsec[11]

関連するRFC

[編集]

標準化過程(Standards Track)

[編集]
  • RFC 1829: The ESP DES-CBC Transform
  • RFC 2403: The Use of HMAC-MD5-96 within ESP and AH
  • RFC 2404: The Use of HMAC-SHA-1-96 within ESP and AH
  • RFC 2405: The ESP DES-CBC Cipher Algorithm With Explicit IV
  • RFC 2410: The NULL Encryption Algorithm and Its Use With IPsec
  • RFC 2451: The ESP CBC-Mode Cipher Algorithms
  • RFC 2857: The Use of HMAC-RIPEMD-160-96 within ESP and AH
  • RFC 3526: More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)
  • RFC 3602: The AES-CBC Cipher Algorithm and Its Use with IPsec
  • RFC 3686: Using Advanced Encryption Standard (AES) Counter Mode With IPsec Encapsulating Security Payload (ESP)
  • RFC 3947: Negotiation of NAT-Traversal in the IKE
  • RFC 3948: UDP Encapsulation of IPsec ESP Packets
  • RFC 4106: The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)
  • RFC 4301: Security Architecture for the Internet Protocol
  • RFC 4302: IP Authentication Header
  • RFC 4303: IP Encapsulating Security Payload
  • RFC 4304: Extended Sequence Number (ESN) Addendum to IPsec Domain of Interpretation (DOI) for Internet Security Association and Key Management Protocol (ISAKMP)
  • RFC 4307: Cryptographic Algorithms for Use in the Internet Key Exchange Version 2 (IKEv2)
  • RFC 4308: Cryptographic Suites for IPsec
  • RFC 4309: Using Advanced Encryption Standard (AES) CCM Mode with IPsec Encapsulating Security Payload (ESP)
  • RFC 4543: The Use of Galois Message Authentication Code (GMAC) in IPsec ESP and AH
  • RFC 4555: IKEv2 Mobility and Multihoming Protocol (MOBIKE)
  • RFC 4806: Online Certificate Status Protocol (OCSP) Extensions to IKEv2
  • RFC 4868: Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with IPsec
  • RFC 4945: The Internet IP Security PKI Profile of IKEv1/ISAKMP, IKEv2, and PKIX
  • RFC 5282: Using Authenticated Encryption Algorithms with the Encrypted Payload of the Internet Key Exchange version 2 (IKEv2) Protocol
  • RFC 5386: Better-Than-Nothing Security: An Unauthenticated Mode of IPsec
  • RFC 5529: Modes of Operation for Camellia for Use with IPsec
  • RFC 5685: Redirect Mechanism for the Internet Key Exchange Protocol Version 2 (IKEv2)
  • RFC 5723: Internet Key Exchange Protocol Version 2 (IKEv2) Session Resumption
  • RFC 5857: IKEv2 Extensions to Support Robust Header Compression over IPsec
  • RFC 5858: IPsec Extensions to Support Robust Header Compression over IPsec
  • RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2)
  • RFC 7321: Cryptographic Algorithm Implementation Requirements and Usage Guidance for Encapsulating Security Payload (ESP) and Authentication Header (AH)
  • RFC 7383: Internet Key Exchange Protocol Version 2 (IKEv2) Message Fragmentation
  • RFC 7427: Signature Authentication in the Internet Key Exchange Version 2 (IKEv2)
  • RFC 7634: ChaCha20, Poly1305, and Their Use in the Internet Key Exchange Protocol (IKE) and IPsec

実験的(Experimental)

[編集]
  • RFC 4478: Repeated Authentication in Internet Key Exchange (IKEv2) Protocol

情報(Informational)

[編集]
  • RFC 2367: PF_KEY Interface
  • RFC 2412: The OAKLEY Key Determination Protocol
  • RFC 3706: A Traffic-Based Method of Detecting Dead Internet Key Exchange (IKE) Peers
  • RFC 3715: IPsec-Network Address Translation (NAT) Compatibility Requirements
  • RFC 4621: Design of the IKEv2 Mobility and Multihoming (MOBIKE) Protocol
  • RFC 4809: Requirements for an IPsec Certificate Management Profile
  • RFC 5387: Problem and Applicability Statement for Better-Than-Nothing Security (BTNS)
  • RFC 5856: Integration of Robust Header Compression over IPsec Security Associations
  • RFC 5930: Using Advanced Encryption Standard Counter Mode (AES-CTR) with the Internet Key Exchange version 02 (IKEv2) Protocol
  • RFC 6027: IPsec Cluster Problem Statement
  • RFC 6071: IPsec and IKE Document Roadmap
  • RFC 6467: Secure Password Framework for Internet Key Exchange Version 2 (IKEv2)

Best Current Practice RFCs

[編集]
  • RFC 5406: Guidelines for Specifying the Use of IPsec Version 2

廃止(Obsolete)/歴史的(Historic)

[編集]
  • RFC 1825: Security Architecture for the Internet Protocol (obsoleted by RFC 2401)
  • RFC 1826: IP Authentication Header (obsoleted by RFC 2402)
  • RFC 1827: IP Encapsulating Security Payload (ESP) (obsoleted by RFC 2406)
  • RFC 1828: IP Authentication using Keyed MD5 (historic)
  • RFC 2401: Security Architecture for the Internet Protocol (IPsec overview) (obsoleted by RFC 4301)
  • RFC 2406: IP Encapsulating Security Payload (ESP) (obsoleted by RFC 4303 and RFC 4305)
  • RFC 2407: The Internet IP Security Domain of Interpretation for ISAKMP (obsoleted by RFC 4306)
  • RFC 2409: The Internet Key Exchange (obsoleted by RFC 4306)
  • RFC 4305: Cryptographic Algorithm Implementation Requirements for Encapsulating Security Payload (ESP) and Authentication Header (AH) (obsoleted by RFC 4835)
  • RFC 4306: Internet Key Exchange (IKEv2) Protocol (obsoleted by RFC 5996)
  • RFC 4718: IKEv2 Clarifications and Implementation Guidelines (obsoleted by RFC 7296)
  • RFC 4835: Cryptographic Algorithm Implementation Requirements for Encapsulating Security Payload (ESP) and Authentication Header (AH) (obsoleted by RFC 7321)
  • RFC 5996: Internet Key Exchange Protocol Version 2 (IKEv2) (obsoleted by RFC 7296)
  • RFC 6379: Suite B Cryptographic Suites for IPsec
  • RFC 6380: Suite B Profile for Internet Protocol Security (IPsec)

関連項目

[編集]

外部リンク

[編集]

脚注

[編集]


(一)^ Stallings, William (2016). Foundations of modern networking : SDN, NFV, QoE, IoT, and Cloud. Florence Agboma, Sofiene Jelassi. Indianapolis, Indiana. ISBN 978-0-13-417547-8. OCLC 927715441. https://www.worldcat.org/oclc/927715441 

(二)^ RFC6434Previously, IPv6 mandated implementation of IPsec and recommended the key management approach of IKE. This document updates that recommendation by making support of the IPsec Architecture [RFC4301] a SHOULD for all IPv6 nodes.

(三)^ RFC6071使

(四)^ Harkins, D.; Carrel, D. (November 1998). The Internet Key Exchange (IKE) (). IETF. doi:10.17487/RFC2409. RFC 2409

(五)^ Kaufman, C. (ed.). IKE Version 2 (). IETF. doi:10.17487/RFC4306. RFC 4306

(六)^ Sakane, S.; Kamada, K.; Thomas, M.; Vilhuber, J. (November 1998). Kerberized Internet Negotiation of Keys (KINK) (). IETF. doi:10.17487/RFC4430. RFC 4430

(七)^ Richardson, M. (February 2005). A Method for Storing IPsec Keying Material in DNS (). IETF. doi:10.17487/RFC4025. RFC 4025

(八)^ SIPP Encapsulating Security Payload.  IETF SIPP Working Group (1993). 2017131

(九)^ Draft SIPP Specification.  IETF. p. 21 (1993). 2017131

(十)^ http://www.toad.com/gnu/netcrypt.html

(11)^  RFC4301: Security Architecture for the Internet Protocol.  Network Working Group of the IETF. p. 4 (200512). 20201027 The spelling "IPsec" is preferred and used throughout this and all related IPsec standards. All other capitalizations of IPsec [...] are deprecated.