#define pr_fmt(fmt) …
#include <crypto/skcipher.h>
#include <linux/module.h>
#include <linux/net.h>
#include <linux/skbuff.h>
#include <linux/udp.h>
#include <linux/scatterlist.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/key-type.h>
#include <net/sock.h>
#include <net/af_rxrpc.h>
#include <keys/rxrpc-type.h>
#include "ar-internal.h"
#define RXKAD_VERSION …
#define MAXKRB5TICKETLEN …
#define RXKAD_TKT_TYPE_KERBEROS_V5 …
#define ANAME_SZ …
#define INST_SZ …
#define REALM_SZ …
#define SNAME_SZ …
#define RXKAD_ALIGN …
struct rxkad_level1_hdr { … };
struct rxkad_level2_hdr { … };
static int rxkad_prime_packet_security(struct rxrpc_connection *conn,
struct crypto_sync_skcipher *ci);
static struct crypto_sync_skcipher *rxkad_ci;
static struct skcipher_request *rxkad_ci_req;
static DEFINE_MUTEX(rxkad_ci_mutex);
static int rxkad_preparse_server_key(struct key_preparsed_payload *prep)
{ … }
static void rxkad_free_preparse_server_key(struct key_preparsed_payload *prep)
{ … }
static void rxkad_destroy_server_key(struct key *key)
{ … }
static int rxkad_init_connection_security(struct rxrpc_connection *conn,
struct rxrpc_key_token *token)
{ … }
static struct rxrpc_txbuf *rxkad_alloc_txbuf(struct rxrpc_call *call, size_t remain, gfp_t gfp)
{ … }
static int rxkad_prime_packet_security(struct rxrpc_connection *conn,
struct crypto_sync_skcipher *ci)
{ … }
static struct skcipher_request *rxkad_get_call_crypto(struct rxrpc_call *call)
{ … }
static void rxkad_free_call_crypto(struct rxrpc_call *call)
{ … }
static int rxkad_secure_packet_auth(const struct rxrpc_call *call,
struct rxrpc_txbuf *txb,
struct skcipher_request *req)
{ … }
static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
struct rxrpc_txbuf *txb,
struct skcipher_request *req)
{ … }
static int rxkad_secure_packet(struct rxrpc_call *call, struct rxrpc_txbuf *txb)
{ … }
static int rxkad_verify_packet_1(struct rxrpc_call *call, struct sk_buff *skb,
rxrpc_seq_t seq,
struct skcipher_request *req)
{ … }
static int rxkad_verify_packet_2(struct rxrpc_call *call, struct sk_buff *skb,
rxrpc_seq_t seq,
struct skcipher_request *req)
{ … }
static int rxkad_verify_packet(struct rxrpc_call *call, struct sk_buff *skb)
{ … }
static int rxkad_issue_challenge(struct rxrpc_connection *conn)
{ … }
static int rxkad_send_response(struct rxrpc_connection *conn,
struct rxrpc_host_header *hdr,
struct rxkad_response *resp,
const struct rxkad_key *s2)
{ … }
static void rxkad_calc_response_checksum(struct rxkad_response *response)
{ … }
static int rxkad_encrypt_response(struct rxrpc_connection *conn,
struct rxkad_response *resp,
const struct rxkad_key *s2)
{ … }
static int rxkad_respond_to_challenge(struct rxrpc_connection *conn,
struct sk_buff *skb)
{ … }
static int rxkad_decrypt_ticket(struct rxrpc_connection *conn,
struct key *server_key,
struct sk_buff *skb,
void *ticket, size_t ticket_len,
struct rxrpc_crypt *_session_key,
time64_t *_expiry)
{ … }
static void rxkad_decrypt_response(struct rxrpc_connection *conn,
struct rxkad_response *resp,
const struct rxrpc_crypt *session_key)
{ … }
static int rxkad_verify_response(struct rxrpc_connection *conn,
struct sk_buff *skb)
{ … }
static void rxkad_clear(struct rxrpc_connection *conn)
{ … }
static int rxkad_init(void)
{ … }
static void rxkad_exit(void)
{ … }
const struct rxrpc_security rxkad = …;