1 #ifndef PTLRPC_GSS_CRYPTO_H
2 #define PTLRPC_GSS_CRYPTO_H
4 #include <linux/scatterlist.h>
6 #include "gss_internal.h"
10 struct crypto_blkcipher *kb_tfm;
13 int gss_keyblock_init(struct gss_keyblock *kb, const char *alg_name,
15 void gss_keyblock_free(struct gss_keyblock *kb);
16 int gss_keyblock_dup(struct gss_keyblock *new, struct gss_keyblock *kb);
17 int gss_get_bytes(char **ptr, const char *end, void *res, size_t len);
18 int gss_get_rawobj(char **ptr, const char *end, rawobj_t *res);
19 int gss_get_keyblock(char **ptr, const char *end, struct gss_keyblock *kb,
21 int gss_setup_sgtable(struct sg_table *sgt, struct scatterlist *prealloc_sg,
22 const void *buf, unsigned int buf_len);
23 void gss_teardown_sgtable(struct sg_table *sgt);
24 int gss_crypt_generic(struct crypto_blkcipher *tfm, int decrypt, const void *iv,
25 const void *in, void *out, size_t length);
26 int gss_digest_hash(struct ahash_request *req, rawobj_t *hdr,
27 int msgcnt, rawobj_t *msgs, int iovcnt, lnet_kiov_t *iovs);
28 int gss_digest_hash_compat(struct ahash_request *req,
29 rawobj_t *hdr, int msgcnt, rawobj_t *msgs,
30 int iovcnt, lnet_kiov_t *iovs);
31 int gss_add_padding(rawobj_t *msg, int msg_buflen, int blocksize);
32 int gss_crypt_rawobjs(struct crypto_blkcipher *tfm, __u8 *iv,
33 int inobj_cnt, rawobj_t *inobjs, rawobj_t *outobj,
36 #endif /* PTLRPC_GSS_CRYPTO_H */