Changeset View
Standalone View
share/man/man7/crypto.7
Show All 37 Lines | |||||
.Cd "device crypto" | .Cd "device crypto" | ||||
.Pp | .Pp | ||||
Or load the crypto.ko module. | Or load the crypto.ko module. | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The following cryptographic algorithms that are part of the OpenCrypto | The following cryptographic algorithms that are part of the OpenCrypto | ||||
framework have the following requirements. | framework have the following requirements. | ||||
.Pp | .Pp | ||||
Cipher algorithms: | Cipher algorithms: | ||||
.Bl -tag -width ".Dv CRYPTO_AES_CBC" | .Bl -tag -width "CRYPTO_AES_NIST_GCM_16" | ||||
.It Dv CRYPTO_AES_CBC | .It Dv CRYPTO_AES_CBC | ||||
cem: Doh, I misread this as changing the `.It Dv` rather than the width at first. | |||||
.Bl -tag -width "Block size :" -compact -offset indent | .Bl -tag -width "Block size :" -compact -offset indent | ||||
.It IV size : | .It IV size : | ||||
16 | 16 | ||||
.It Block size : | .It Block size : | ||||
16 | 16 | ||||
.It Key size : | .It Key size : | ||||
16, 24 or 32 | 16, 24 or 32 | ||||
.El | .El | ||||
.Pp | .Pp | ||||
This algorithm implements Cipher-block chaining. | This algorithm implements Cipher-block chaining. | ||||
cemUnsubmitted Not Done Inline ActionsIf we're documenting that counter-mode ciphers require IVs (nonces?), maybe document that CBC needs a random IV here. cem: If we're documenting that counter-mode ciphers require IVs (nonces?), maybe document that CBC… | |||||
.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 | |||||
cemUnsubmitted Not Done Inline ActionsI think "implements" fits better here than "uses." The former sentence is already kind of awkward, so it might make sense to rewrite it to avoid "implements - implements" awkwardness too. cem: I think "implements" fits better here than "uses."
The former sentence is already kind of… | |||||
jhbAuthorUnsubmitted Done Inline ActionsWhat I'd really like to do is restructure the page as a followup I think into lists of algorithms by types, so a list of AEAD algorithms, a list of cipher algorithms, and a list of digest algorithms (we don't have any of those currently though). I think this also lets us consolidate some of the duplicate wording a bit and have the per-cipher entries only focus on the cipher-specific notes like key sizes, etc. jhb: What I'd really like to do is restructure the page as a followup I think into lists of… | |||||
.Pq Authenticated Encryption with Associated Data | |||||
mode. | |||||
.Pp | |||||
The authentication tag will be read/written from/to the offset | |||||
cemUnsubmitted Done Inline Actions"read from or written to" is more English-ey. It reads more clearly to me in this instance. cem: "read from or written to" is more English-ey. It reads more clearly to me in this instance. | |||||
.Va crp_digest_start | |||||
specified in the request. | |||||
.Pp | |||||
Note: You must provide an IV on every call. | |||||
cemUnsubmitted Not Done Inline Actions"a unique nonce"? cem: "a unique nonce"? | |||||
jhbAuthorUnsubmitted Done Inline ActionsThis (and the other bits for CCM) are also broken in the GCM description where it was copied from. I think what jmg@ was trying to say is that you have to specify an explicit IV in crp_iv rather than having it be part of the payload for these ciphers. Maybe I would just reword this to say that. All of the algorithms which use IVs require an IV for each call. I think OCF originally would assume CBC and cache the last block of the previous operation to use as the IV of the next, but when OCF was first imported into FreeBSD for IPsec I think that was discarded and in FreeBSD all the ciphers always need an IV for every call. jhb: This (and the other bits for CCM) are also broken in the GCM description where it was copied… | |||||
.It Dv CRYPTO_AES_NIST_GCM_16 | .It Dv CRYPTO_AES_NIST_GCM_16 | ||||
.Bl -tag -width "Block size :" -compact -offset indent | .Bl -tag -width "Block size :" -compact -offset indent | ||||
.It IV size : | .It IV size : | ||||
12 | 12 | ||||
.It Block size : | .It Block size : | ||||
1 | 1 | ||||
.It Key size : | .It Key size : | ||||
16, 24 or 32 | 16, 24 or 32 | ||||
Show All 40 Lines | |||||
32 or 64 | 32 or 64 | ||||
.El | .El | ||||
.Pp | .Pp | ||||
This algorithm implements XEX Tweakable Block Cipher with Ciphertext Stealing | This algorithm implements XEX Tweakable Block Cipher with Ciphertext Stealing | ||||
as defined in NIST SP 800-38E. | as defined in NIST SP 800-38E. | ||||
.Pp | .Pp | ||||
NOTE: The ciphertext stealing part is not implemented which is why this cipher | 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. | 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 | .El | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
manpage first appeared in | manpage first appeared in | ||||
.Fx 10.1 . | .Fx 10.1 . | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr crypto 4 , | .Xr crypto 4 , | ||||
.Xr crypto 9 | .Xr crypto 9 | ||||
.Sh BUGS | .Sh BUGS | ||||
Not all the implemented algorithms are listed. | Not all the implemented algorithms are listed. |
Doh, I misread this as changing the .It Dv rather than the width at first.