> > encrypt then authenticate). This flag is missing in session_op but > > some of the *BSD distributions added some notes about deprecation of > > session_op in current form. > > Do you have any idea what will replace it? In any case in the current > approach in linux-cryptodev you don't need a new session op, the old > one will just do. []
For example, in FreeBSD 9 I've found this: http://fxr.watson.org/fxr/source/opencrypto/cryptodev.h?v=FREEBSD9#L146 145 /* NB: deprecated */ 146 struct session_op { 147 u_int32_t cipher; /* ie. CRYPTO_DES_CBC */ 148 u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ 149 150 u_int32_t keylen; /* cipher key */ 151 caddr_t key; 152 int mackeylen; /* mac key */ 153 caddr_t mackey; 154 155 u_int32_t ses; /* returns: session # */ 156 }; 157 158 struct session2_op { 159 u_int32_t cipher; /* ie. CRYPTO_DES_CBC */ 160 u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ 161 162 u_int32_t keylen; /* cipher key */ 163 caddr_t key; 164 int mackeylen; /* mac key */ 165 caddr_t mackey; 166 167 u_int32_t ses; /* returns: session # */ 168 int crid; /* driver id + flags (rw) */ 169 int pad[4]; /* for future expansion */ OpenBSD has the original code and NetBSD added a "comp_alg" identifier: http://fxr.watson.org/fxr/source/crypto/cryptodev.h?v=OPENBSD#L254 http://fxr.watson.org/fxr/source/opencrypto/cryptodev.h?v=NETBSD#L149 149 struct session_op { 150 u_int32_t cipher; /* ie. CRYPTO_DES_CBC */ 151 u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ 152 u_int32_t comp_alg; /* ie. CRYPTO_GZIP_COMP */ 153 154 u_int32_t keylen; /* cipher key */ 155 void * key; 156 int mackeylen; /* mac key */ 157 void * mackey; 158 159 u_int32_t ses; /* returns: session # */ 160 }; Cristian S. _______________________________________________ Cryptodev-linux-devel mailing list Cryptodev-linux-devel@gna.org https://mail.gna.org/listinfo/cryptodev-linux-devel