From owner-svn-src-all@freebsd.org Fri Jul 3 00:37:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E1449937C4; Fri, 3 Jul 2015 00:37:17 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DF52706; Fri, 3 Jul 2015 00:37:17 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t630bHnM000831; Fri, 3 Jul 2015 00:37:17 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t630bHZn000830; Fri, 3 Jul 2015 00:37:17 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507030037.t630bHZn000830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Fri, 3 Jul 2015 00:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285065 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2015 00:37:17 -0000 Author: jmg Date: Fri Jul 3 00:37:16 2015 New Revision: 285065 URL: https://svnweb.freebsd.org/changeset/base/285065 Log: update the documentation of the _IV_ flags... _IV_PRESENT doesn't mean what you think it should... This will be fixed in the future with a flag rename, but document what the flag really does and make the _IV_ flags clear what their presents (or lack there of) means... Reviewed by: gnn, eri (both earlier version) Modified: head/share/man/man9/crypto.9 Modified: head/share/man/man9/crypto.9 ============================================================================== --- head/share/man/man9/crypto.9 Thu Jul 2 22:23:52 2015 (r285064) +++ head/share/man/man9/crypto.9 Fri Jul 3 00:37:16 2015 (r285065) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2014 +.Dd July 2, 2015 .Dt CRYPTO 9 .Os .Sh NAME @@ -333,13 +333,13 @@ on the input buffer. The various fields are: .Bl -tag -width ".Va crd_inject" .It Va crd_iv -The field where IV should be provided when the +When the flag .Dv CRD_F_IV_EXPLICIT -flag is given. +is set, this field contains the IV. .It Va crd_key When the .Dv CRD_F_KEY_EXPLICIT -flag is given, the +flag is set, the .Va crd_key points to a buffer with encryption or authentication key. .It Va crd_alg @@ -370,15 +370,14 @@ The following flags are defined: For encryption algorithms, this bit is set when encryption is required (when not set, decryption is performed). .It Dv CRD_F_IV_PRESENT -For encryption, this bit is set when the IV already -precedes the data, so the -.Va crd_inject -value will be ignored and no IV will be written in the buffer. -Otherwise, the IV used to encrypt the packet will be written -at the location pointed to by +.\" This flag name has nothing to do w/ it's behavior, fix the name. +For encryption, if this bit is not set the IV used to encrypt the packet +will be written at the location pointed to by .Va crd_inject . The IV length is assumed to be equal to the blocksize of the encryption algorithm. +For encryption, if this bit is set, nothing is done. +For decryption, this flag has no meaning. Applications that do special .Dq "IV cooking" , such as the half-IV mode in @@ -388,7 +387,7 @@ This flag is typically used in conjuncti .Dv CRD_F_IV_EXPLICIT flag. .It Dv CRD_F_IV_EXPLICIT -For encryption algorithms, this bit is set when the IV is explicitly +This bit is set when the IV is explicitly provided by the consumer in the .Va crd_iv field.