The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/mips/cavium/cryptocteon/cryptocteonvar.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Octeon Crypto for OCF
    3  *
    4  * Written by David McCullough <david_mccullough@securecomputing.com>
    5  * Copyright (C) 2009 David McCullough
    6  *
    7  * LICENSE TERMS
    8  *
    9  * The free distribution and use of this software in both source and binary
   10  * form is allowed (with or without changes) provided that:
   11  *
   12  *   1. distributions of this source code include the above copyright
   13  *      notice, this list of conditions and the following disclaimer;
   14  *
   15  *   2. distributions in binary form include the above copyright
   16  *      notice, this list of conditions and the following disclaimer
   17  *      in the documentation and/or other associated materials;
   18  *
   19  *   3. the copyright holder's name is not used to endorse products
   20  *      built using this software without specific written permission.
   21  *
   22  * DISCLAIMER
   23  *
   24  * This software is provided 'as is' with no explicit or implied warranties
   25  * in respect of its properties, including, but not limited to, correctness
   26  * and/or fitness for purpose.
   27  * ---------------------------------------------------------------------------
   28  *
   29  * $FreeBSD: stable/10/sys/mips/cavium/cryptocteon/cryptocteonvar.h 210312 2010-07-20 19:32:25Z jmallett $
   30  */
   31 
   32 #ifndef _MIPS_CAVIUM_CRYPTOCTEON_CRYPTOCTEONVAR_H_
   33 #define _MIPS_CAVIUM_CRYPTOCTEON_CRYPTOCTEONVAR_H_
   34 
   35 struct octo_sess;
   36 
   37 typedef int octo_encrypt_t(struct octo_sess *od, struct iovec *iov, size_t iovcnt, size_t iovlen, int auth_off, int auth_len, int crypt_off, int crypt_len, int icv_off, uint8_t *ivp);
   38 typedef int octo_decrypt_t(struct octo_sess *od, struct iovec *iov, size_t iovcnt, size_t iovlen, int auth_off, int auth_len, int crypt_off, int crypt_len, int icv_off, uint8_t *ivp);
   39 
   40 struct octo_sess {
   41         int                                      octo_encalg;
   42         #define MAX_CIPHER_KEYLEN       64
   43         char                             octo_enckey[MAX_CIPHER_KEYLEN];
   44         int                                      octo_encklen;
   45 
   46         int                                      octo_macalg;
   47         #define MAX_HASH_KEYLEN 64
   48         char                             octo_mackey[MAX_HASH_KEYLEN];
   49         int                                      octo_macklen;
   50         int                                      octo_mackey_set;
   51 
   52         int                                      octo_mlen;
   53         int                                      octo_ivsize;
   54 
   55         octo_encrypt_t                          *octo_encrypt;
   56         octo_decrypt_t                          *octo_decrypt;
   57 
   58         uint64_t                         octo_hminner[3];
   59         uint64_t                         octo_hmouter[3];
   60 
   61         struct iovec                            octo_iov[UIO_MAXIOV];
   62 };
   63 
   64 #define dprintf(fmt, ...)                                               \
   65         do {                                                            \
   66                 if (cryptocteon_debug)                                  \
   67                         printf("%s: " fmt, __func__, ## __VA_ARGS__);   \
   68         } while (0)
   69 
   70 extern int cryptocteon_debug;
   71 
   72 void octo_calc_hash(uint8_t, unsigned char *, uint64_t *, uint64_t *);
   73 
   74 /* XXX Actually just hashing functions, not encryption.  */
   75 octo_encrypt_t octo_null_md5_encrypt;
   76 octo_encrypt_t octo_null_sha1_encrypt;
   77 
   78 octo_encrypt_t octo_des_cbc_encrypt;
   79 octo_encrypt_t octo_des_cbc_md5_encrypt;
   80 octo_encrypt_t octo_des_cbc_sha1_encrypt;
   81 
   82 octo_decrypt_t octo_des_cbc_decrypt;
   83 octo_decrypt_t octo_des_cbc_md5_decrypt;
   84 octo_decrypt_t octo_des_cbc_sha1_decrypt;
   85 
   86 octo_encrypt_t octo_aes_cbc_encrypt;
   87 octo_encrypt_t octo_aes_cbc_md5_encrypt;
   88 octo_encrypt_t octo_aes_cbc_sha1_encrypt;
   89 
   90 octo_decrypt_t octo_aes_cbc_decrypt;
   91 octo_decrypt_t octo_aes_cbc_md5_decrypt;
   92 octo_decrypt_t octo_aes_cbc_sha1_decrypt;
   93 
   94 #endif /* !_MIPS_CAVIUM_CRYPTOCTEON_CRYPTOCTEONVAR_H_ */

Cache object: 4546d790787da9f6bb026a843c0b1af2


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.