Re: [IPsec] New method to resist replay attack in ikev2

Tero Kivinen <kivinen@iki.fi> Tue, 20 September 2011 00:43 UTC

Return-Path: <kivinen@iki.fi>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E527321F8B5E for <ipsec@ietfa.amsl.com>; Mon, 19 Sep 2011 17:43:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.581
X-Spam-Level:
X-Spam-Status: No, score=-102.581 tagged_above=-999 required=5 tests=[AWL=0.018, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qERFj-xsl5HQ for <ipsec@ietfa.amsl.com>; Mon, 19 Sep 2011 17:43:18 -0700 (PDT)
Received: from mail.kivinen.iki.fi (fireball.acr.fi [83.145.195.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1443321F8B2F for <ipsec@ietf.org>; Mon, 19 Sep 2011 17:43:17 -0700 (PDT)
Received: from fireball.kivinen.iki.fi (localhost [127.0.0.1]) by mail.kivinen.iki.fi (8.14.3/8.14.3) with ESMTP id p8K0jYFE005828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Sep 2011 03:45:34 +0300 (EEST)
Received: (from kivinen@localhost) by fireball.kivinen.iki.fi (8.14.3/8.12.11) id p8K0jWCh023697; Tue, 20 Sep 2011 03:45:32 +0300 (EEST)
X-Authentication-Warning: fireball.kivinen.iki.fi: kivinen set sender to kivinen@iki.fi using -f
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <20087.57900.897702.835641@fireball.kivinen.iki.fi>
Date: Tue, 20 Sep 2011 03:45:32 +0300
From: Tero Kivinen <kivinen@iki.fi>
To: ramaswamy <ramaswamy.bm@globaledgesoft.com>
In-Reply-To: <00e301cc76d8$44b0e940$ce12bbc0$@bm@globaledgesoft.com>
References: <20013.29623.491247.654466@fireball.kivinen.iki.fi> <B97B134FACB2024DB45F524AB0A7B7F203ED2B05@XMB-BGL-419.cisco.com> <90AEF529-7273-4695-BA31-4F221A4ACF45@checkpoint.com> <4E2EA248.70708@gmail.com> <B97B134FACB2024DB45F524AB0A7B7F203ED2CEA@XMB-BGL-419.cisco.com> <A2354B6A9F807641B21EEABD666ECEEA0130A752@XMB-BGL-416.cisco.com> <EE0C2F9E065E634B84FC3BE36CF8A4B2079C046C@xmb-sjc-23e.amer.cisco.com> <A2354B6A9F807641B21EEABD666ECEEA0130A7D8@XMB-BGL-416.cisco.com> <008901cc63b8$e5c9c640$b15d52c0$@bm@globaledgesoft.com> <20060.43306.157789.942917@fireball.kivinen.iki.fi> <00e301cc76d8$44b0e940$ce12bbc0$@bm@globaledgesoft.com>
X-Mailer: VM 7.19 under Emacs 21.4.1
X-Edit-Time: 4 min
X-Total-Time: 3 min
Cc: ipsec@ietf.org, ipsec-tools-devel@lists.sourceforge.net, ipsec-tools-users@lists.sourceforge.net, ikev2-devel@lists.sourceforge.net
Subject: Re: [IPsec] New method to resist replay attack in ikev2
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ipsec>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Sep 2011 00:43:19 -0000

ramaswamy writes:
> Thanks for the response, I agree with your comments, I think we can use
> certificates to avoid man in the middle attacks and error message flooding
> in the INIT phase only, as certificates are signed by trusted certificate
> authorities authenticity is ensured.
> 
> If certificates are used in INIT message exchanges [mutual authentication],
> we can effectively avoid afore said attacks as it avoids huge computation of
> IKE-keys before the client OR server is authenticated.

RSA operations are already huge computation. There is no big
difference whether you do RSA or Diffie-Hellman.

> To avoid Replay attacks:
> By using RSA private key of certificate to encrypt the nonce (Ni) in
> INIT_REQUEST message we can avoid replay attacks, at the receiving end,
> first certificate is verified using root CA and nonce is decrypted using
> public key of the received certificate which ensures that sender holds the
> valid private key of the certificate and not an attacker.  By using nonce we
> can avoid Replay attacks[Packets can be rejected if the same nonce is
> received within a particular session].

So you plan to store that nonce forever, and always verify that the
nonce is not used before? That would be extremely expensive way to
solve the replay attack.
-- 
kivinen@iki.fi