Changeset View
Changeset View
Standalone View
Standalone View
share/man/man7/crypto.7
.\" Copyright (c) 2014 The FreeBSD Foundation | .\" Copyright (c) 2014-2021 The FreeBSD Foundation | ||||
.\" All rights reserved. | .\" All rights reserved. | ||||
.\" | .\" | ||||
.\" This documentation was written by John-Mark Gurney under | .\" Portions of this documentation were written by John-Mark Gurney | ||||
.\" the sponsorship of the FreeBSD Foundation and | .\" under the sponsorship of the FreeBSD Foundation and | ||||
.\" Rubicon Communications, LLC (Netgate). | .\" Rubicon Communications, LLC (Netgate). | ||||
.\" | |||||
.\" Portions of this documentation were written by Ararat River | |||||
.\" Consulting, LLC under sponsorship of the FreeBSD Foundation. | |||||
.\" | |||||
.\" Redistribution and use in source and binary forms, with or without | .\" Redistribution and use in source and binary forms, with or without | ||||
.\" modification, are permitted provided that the following conditions | .\" modification, are permitted provided that the following conditions | ||||
.\" are met: | .\" are met: | ||||
.\" 1. Redistributions of source code must retain the above copyright | .\" 1. Redistributions of source code must retain the above copyright | ||||
.\" notice, this list of conditions and the following disclaimer. | .\" notice, this list of conditions and the following disclaimer. | ||||
.\" 2. Redistributions in binary form must reproduce the above copyright | .\" 2. Redistributions in binary form must reproduce the above copyright | ||||
.\" notice, this list of conditions and the following disclaimer in the | .\" notice, this list of conditions and the following disclaimer in the | ||||
.\" documentation and/or other materials provided with the distribution. | .\" documentation and/or other materials provided with the distribution. | ||||
.\" | .\" | ||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd March 3, 2021 | .Dd October 6, 2021 | ||||
.Dt CRYPTO 7 | .Dt CRYPTO 7 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm crypto | .Nm crypto | ||||
.Nd OpenCrypto algorithms | .Nd OpenCrypto algorithms | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The in-kernel OpenCrypto framework supports several different encryption | The in-kernel OpenCrypto framework supports several different encryption | ||||
and authentication algorithms. | and authentication algorithms. | ||||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | |||||
AEAD algorithms in OCF accept a nonce that is combined with an | AEAD algorithms in OCF accept a nonce that is combined with an | ||||
algorithm-defined counter to construct the IV for the underlying | algorithm-defined counter to construct the IV for the underlying | ||||
stream cipher. | stream cipher. | ||||
This nonce must be provided in | This nonce must be provided in | ||||
.Fa crp_iv | .Fa crp_iv | ||||
via the | via the | ||||
.Dv CRYPTO_F_IV_SEPARATE | .Dv CRYPTO_F_IV_SEPARATE | ||||
flag. | flag. | ||||
Some AEAD algorithms support multiple nonce sizes. | |||||
The first size listed is the default nonce size. | |||||
.Pp | .Pp | ||||
The following AEAD algorithms are supported: | The following AEAD algorithms are supported: | ||||
.Bl -column "CRYPTO_AES_NIST_GCM_16" "Nonce" "16, 24, 32" "Tag" | .Bl -column "CRYPTO_AES_NIST_GCM_16" "12, 7-13" "16, 24, 32" "Tag" | ||||
.It Sy Name Ta Sy Nonce Ta Sy Key Sizes Ta Sy Tag Ta Sy Description | .It Sy Name Ta Sy Nonce Ta Sy Key Sizes Ta Sy Tag Ta Sy Description | ||||
.It Dv CRYPTO_AES_NIST_GCM_16 Ta 12 Ta 16, 24, 32 Ta 16 Ta | .It Dv CRYPTO_AES_NIST_GCM_16 Ta 12 Ta 16, 24, 32 Ta 16 Ta | ||||
AES Galois/Counter Mode | AES Galois/Counter Mode | ||||
.It Dv CRYPTO_AES_CCM_16 Ta 12 Ta 16, 24, 32 Ta 16 Ta | .It Dv CRYPTO_AES_CCM_16 Ta 12, 7-13 Ta 16, 24, 32 Ta 16 Ta | ||||
AES Counter with CBC-MAC | AES Counter with CBC-MAC | ||||
.It Dv CRYPTO_CHACHA20_POLY1305 Ta 12 Ta 32 Ta 16 Ta | .It Dv CRYPTO_CHACHA20_POLY1305 Ta 12 Ta 32 Ta 16 Ta | ||||
ChaCha20-Poly1305 | ChaCha20-Poly1305 | ||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr crypto 4 , | .Xr crypto 4 , | ||||
.Xr crypto 9 | .Xr crypto 9 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
manual page first appeared in | manual page first appeared in | ||||
.Fx 10.1 . | .Fx 10.1 . |