Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
crypto.c File Reference
#include <linux/ceph/ceph_debug.h>
#include <linux/err.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <crypto/hash.h>
#include <linux/key-type.h>
#include <keys/ceph-type.h>
#include <linux/ceph/decode.h>
#include "crypto.h"

Go to the source code of this file.

Macros

#define AES_KEY_SIZE   16
 

Functions

int ceph_crypto_key_clone (struct ceph_crypto_key *dst, const struct ceph_crypto_key *src)
 
int ceph_crypto_key_encode (struct ceph_crypto_key *key, void **p, void *end)
 
int ceph_crypto_key_decode (struct ceph_crypto_key *key, void **p, void *end)
 
int ceph_crypto_key_unarmor (struct ceph_crypto_key *key, const char *inkey)
 
int ceph_decrypt (struct ceph_crypto_key *secret, void *dst, size_t *dst_len, const void *src, size_t src_len)
 
int ceph_decrypt2 (struct ceph_crypto_key *secret, void *dst1, size_t *dst1_len, void *dst2, size_t *dst2_len, const void *src, size_t src_len)
 
int ceph_encrypt (struct ceph_crypto_key *secret, void *dst, size_t *dst_len, const void *src, size_t src_len)
 
int ceph_encrypt2 (struct ceph_crypto_key *secret, void *dst, size_t *dst_len, const void *src1, size_t src1_len, const void *src2, size_t src2_len)
 
int ceph_key_instantiate (struct key *key, struct key_preparsed_payload *prep)
 
int ceph_key_match (const struct key *key, const void *description)
 
void ceph_key_destroy (struct key *key)
 
int ceph_crypto_init (void)
 
void ceph_crypto_shutdown (void)
 

Variables

struct key_type key_type_ceph
 

Macro Definition Documentation

#define AES_KEY_SIZE   16

Definition at line 83 of file crypto.c.

Function Documentation

int ceph_crypto_init ( void  )

Definition at line 480 of file crypto.c.

int ceph_crypto_key_clone ( struct ceph_crypto_key dst,
const struct ceph_crypto_key src 
)

Definition at line 14 of file crypto.c.

int ceph_crypto_key_decode ( struct ceph_crypto_key key,
void **  p,
void end 
)

Definition at line 36 of file crypto.c.

int ceph_crypto_key_encode ( struct ceph_crypto_key key,
void **  p,
void end 
)

Definition at line 24 of file crypto.c.

int ceph_crypto_key_unarmor ( struct ceph_crypto_key key,
const char inkey 
)

Definition at line 54 of file crypto.c.

void ceph_crypto_shutdown ( void  )

Definition at line 484 of file crypto.c.

int ceph_decrypt ( struct ceph_crypto_key secret,
void dst,
size_t dst_len,
const void src,
size_t  src_len 
)

Definition at line 331 of file crypto.c.

int ceph_decrypt2 ( struct ceph_crypto_key secret,
void dst1,
size_t dst1_len,
void dst2,
size_t dst2_len,
const void src,
size_t  src_len 
)

Definition at line 351 of file crypto.c.

int ceph_encrypt ( struct ceph_crypto_key secret,
void dst,
size_t dst_len,
const void src,
size_t  src_len 
)

Definition at line 384 of file crypto.c.

int ceph_encrypt2 ( struct ceph_crypto_key secret,
void dst,
size_t dst_len,
const void src1,
size_t  src1_len,
const void src2,
size_t  src2_len 
)

Definition at line 404 of file crypto.c.

void ceph_key_destroy ( struct key key)

Definition at line 466 of file crypto.c.

int ceph_key_instantiate ( struct key key,
struct key_preparsed_payload *  prep 
)

Definition at line 426 of file crypto.c.

int ceph_key_match ( const struct key key,
const void description 
)

Definition at line 461 of file crypto.c.

Variable Documentation

struct key_type key_type_ceph
Initial value:
= {
.name = "ceph",
.instantiate = ceph_key_instantiate,
.match = ceph_key_match,
.destroy = ceph_key_destroy,
}

Definition at line 473 of file crypto.c.