Changeset View
Changeset View
Standalone View
Standalone View
share/man/man4/crypto.4
.\" $NetBSD: crypto.4,v 1.24 2014/01/27 21:23:59 pgoyette Exp $ | .\" $NetBSD: crypto.4,v 1.24 2014/01/27 21:23:59 pgoyette Exp $ | ||||
.\" | .\" | ||||
.\" Copyright (c) 2008 The NetBSD Foundation, Inc. | .\" Copyright (c) 2008 The NetBSD Foundation, Inc. | ||||
.\" Copyright (c) 2014 The FreeBSD Foundation | .\" Copyright (c) 2014-2021 The FreeBSD Foundation | ||||
.\" All rights reserved. | .\" All rights reserved. | ||||
.\" | .\" | ||||
.\" Portions of this documentation were written by John-Mark Gurney | .\" Portions of this documentation were written by John-Mark Gurney | ||||
.\" under sponsorship of the FreeBSD Foundation and | .\" under 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. | |||||
.\" | |||||
.\" This code is derived from software contributed to The NetBSD Foundation | .\" This code is derived from software contributed to The NetBSD Foundation | ||||
.\" by Coyote Point Systems, Inc. | .\" by Coyote Point Systems, Inc. | ||||
.\" | .\" | ||||
.\" 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. | ||||
▲ Show 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | struct session2_op { | ||||
uint32_t keylen; /* cipher key */ | uint32_t keylen; /* cipher key */ | ||||
const void *key; | const void *key; | ||||
int mackeylen; /* mac key */ | int mackeylen; /* mac key */ | ||||
const void *mackey; | const void *mackey; | ||||
uint32_t ses; /* returns: ses # */ | uint32_t ses; /* returns: ses # */ | ||||
int crid; /* driver id + flags (rw) */ | int crid; /* driver id + flags (rw) */ | ||||
int pad[4]; /* for future expansion */ | int ivlen; /* length of nonce/IV */ | ||||
int maclen; /* length of MAC/tag */ | |||||
int pad[2]; /* for future expansion */ | |||||
}; | }; | ||||
.Ed | .Ed | ||||
This request is similar to CIOGSESSION except that | This request is similar to CIOGSESSION but adds additional fields. | ||||
.Pp | |||||
.Fa sessp-\*[Gt]crid | .Fa sessp-\*[Gt]crid | ||||
requests either a specific crypto device or a class of devices (software vs | requests either a specific crypto device or a class of devices (software vs | ||||
hardware). | hardware). | ||||
.Pp | |||||
.Fa sessp-\*[Gt]ivlen | |||||
specifies the length of the IV or nonce supplied with each request. | |||||
If this field is set to zero, the default IV or nonce length is used. | |||||
.Pp | |||||
.Fa sessp-\*[Gt]maclen | |||||
specifies the length of the MAC or authentication tag supplied or computed by | |||||
each request. | |||||
If this field is set to zero, the full MAC is used. | |||||
.Pp | |||||
The | The | ||||
.Fa sessp-\*[Gt]pad | .Fa sessp-\*[Gt]pad | ||||
field must be initialized to zero. | field must be initialized to zero. | ||||
.It Dv CIOCCRYPT Fa struct crypt_op *cr_op | .It Dv CIOCCRYPT Fa struct crypt_op *cr_op | ||||
.Bd -literal | .Bd -literal | ||||
struct crypt_op { | struct crypt_op { | ||||
uint32_t ses; | uint32_t ses; | ||||
uint16_t op; /* e.g. COP_ENCRYPT */ | uint16_t op; /* e.g. COP_ENCRYPT */ | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |