Changeset View
Changeset View
Standalone View
Standalone View
sys/opencrypto/cryptodev.h
Show All 17 Lines | |||||
* | * | ||||
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR | * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR | ||||
* IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY | * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY | ||||
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE | * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE | ||||
* MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR | * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR | ||||
* PURPOSE. | * PURPOSE. | ||||
* | * | ||||
* Copyright (c) 2001 Theo de Raadt | * Copyright (c) 2001 Theo de Raadt | ||||
* Copyright (c) 2014 The FreeBSD Foundation | * Copyright (c) 2014-2021 The FreeBSD Foundation | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Portions of this software were developed by John-Mark Gurney | * Portions of this software were developed 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 software were developed 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 | ||||
▲ Show 20 Lines • Show All 195 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: session # */ | uint32_t ses; /* returns: session # */ | ||||
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 */ | |||||
}; | }; | ||||
struct crypt_op { | struct crypt_op { | ||||
uint32_t ses; | uint32_t ses; | ||||
uint16_t op; /* i.e. COP_ENCRYPT */ | uint16_t op; /* i.e. COP_ENCRYPT */ | ||||
#define COP_ENCRYPT 1 | #define COP_ENCRYPT 1 | ||||
#define COP_DECRYPT 2 | #define COP_DECRYPT 2 | ||||
uint16_t flags; | uint16_t flags; | ||||
▲ Show 20 Lines • Show All 433 Lines • Show Last 20 Lines |