From owner-svn-src-head@freebsd.org Thu Jun 4 22:16:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D964A334481; Thu, 4 Jun 2020 22:16:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dKql5XBvz45vY; Thu, 4 Jun 2020 22:16:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADBAE2635F; Thu, 4 Jun 2020 22:16:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 054MGJcH037753; Thu, 4 Jun 2020 22:16:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 054MGJ8Y037752; Thu, 4 Jun 2020 22:16:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006042216.054MGJ8Y037752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Jun 2020 22:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361809 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 361809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2020 22:16:19 -0000 Author: jhb Date: Thu Jun 4 22:16:19 2020 New Revision: 361809 URL: https://svnweb.freebsd.org/changeset/base/361809 Log: Update crypto(7) to list current ciphers. Add descriptions of AES-CCM, Camellia-CBC, and Chacha20. Reviewed by: cem (previous version) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24963 Modified: head/share/man/man7/crypto.7 Modified: head/share/man/man7/crypto.7 ============================================================================== --- head/share/man/man7/crypto.7 Thu Jun 4 21:02:24 2020 (r361808) +++ head/share/man/man7/crypto.7 Thu Jun 4 22:16:19 2020 (r361809) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 22, 2020 +.Dd June 04, 2020 .Dt CRYPTO 7 .Os .Sh NAME @@ -43,7 +43,7 @@ The following cryptographic algorithms that are part o framework have the following requirements. .Pp Cipher algorithms: -.Bl -tag -width ".Dv CRYPTO_AES_CBC" +.Bl -tag -width "CRYPTO_AES_NIST_GCM_16" .It Dv CRYPTO_AES_CBC .Bl -tag -width "Block size :" -compact -offset indent .It IV size : @@ -54,7 +54,33 @@ Cipher algorithms: 16, 24 or 32 .El .Pp -This algorithm implements Cipher-block chaining. +This algorithm implements Cipher Block Chaining. +.It Dv CRYPTO_AES_CCM_16 +.Bl -tag -width "Block size :" -compact -offset indent +.It IV size : +12 +.It Block size : +16 +.It Key size : +16, 24 or 32 +.It Digest size : +16 +.El +.Pp +This algorithm implements Counter with CBC-MAC Mode. +This cipher uses AEAD +.Pq Authenticated Encryption with Associated Data +mode. +.Pp +The authentication tag will be read from or written to the offset +.Va crp_digest_start +specified in the request. +.Pp +Note: The nonce for each request must be provided in +.Fa crp_iv +via the +.Dv CRYPTO_F_IV_SEPARATE +flag. .It Dv CRYPTO_AES_NIST_GCM_16 .Bl -tag -width "Block size :" -compact -offset indent .It IV size : @@ -72,11 +98,15 @@ This cipher uses AEAD .Pq Authenticated Encryption with Associated Data mode. .Pp -The authentication tag will be read/written from/to the offset +The authentication tag will be read from or written to the offset .Va crp_digest_start specified in the request. .Pp -Note: You must provide an IV on every call. +Note: The nonce for each request must be provided in +.Fa crp_iv +via the +.Dv CRYPTO_F_IV_SEPARATE +flag. .It Dv CRYPTO_AES_ICM .Bl -tag -width "Block size :" -compact -offset indent .It IV size : @@ -95,7 +125,11 @@ This does mean that if a counter is required that roll the transaction need to be split into two parts where the counter rolls over. The counter incremented as a 128-bit big endian number. .Pp -Note: You must provide an IV on every call. +Note: The counter for each request must be provided in +.Fa crp_iv +via the +.Dv CRYPTO_F_IV_SEPARATE +flag. .It Dv CRYPTO_AES_XTS .Bl -tag -width "Block size :" -compact -offset indent .It IV size : @@ -111,6 +145,26 @@ as defined in NIST SP 800-38E. .Pp NOTE: The ciphertext stealing part is not implemented which is why this cipher is listed as having a block size of 16 instead of 1. +.It Dv CRYPTO_CAMELLIA_CBC +.Bl -tag -width "Block size :" -compact -offset indent +.It IV size : +16 +.It Block size : +16 +.It Key size : +16, 24 or 32 +.El +.Pp +This algorithm implements Cipher Block Chaining. +.It Dv CRYPTO_CHACHA20 +.Bl -tag -width "Block size :" -compact -offset indent +.It IV size : +16 +.It Block size : +1 +.It Key size : +16 or 32 +.El .El .Sh HISTORY The