cryptsetup  2.4.3
About: cryptsetup is a utility used to conveniently setup disk encryption based on the dm-crypt kernel module. These include plain dm-crypt volumes, LUKS volumes, loop-AES and TrueCrypt compatible format.
  Fossies Dox: cryptsetup-2.4.3.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

verity_fec.c File Reference
#include <stdlib.h>
#include <errno.h>
#include "verity.h"
#include "internal.h"
#include "rs.h"
Include dependency graph for verity_fec.c:

Go to the source code of this file.

Data Structures

struct  fec_input_device
 
struct  fec_context
 

Macros

#define FEC_RSM   255
 
#define FEC_MIN_RSN   231
 
#define FEC_MAX_RSN   253
 
#define FEC_INPUT_DEVICES   2
 
#define FEC_PARAMS(roots)
 

Functions

static uint64_t FEC_div_round_up (uint64_t x, uint64_t y)
 
static uint64_t FEC_interleave (struct fec_context *ctx, uint64_t offset)
 
static int FEC_read_interleaved (struct fec_context *ctx, uint64_t i, void *output, size_t count)
 
static int FEC_process_inputs (struct crypt_device *cd, struct crypt_params_verity *params, struct fec_input_device *inputs, size_t ninputs, int fd, int decode, unsigned int *errors)
 
int VERITY_FEC_process (struct crypt_device *cd, struct crypt_params_verity *params, struct device *fec_device, int check_fec, unsigned int *errors)
 
uint64_t VERITY_FEC_blocks (struct crypt_device *cd, struct device *fec_device, struct crypt_params_verity *params)
 

Macro Definition Documentation

◆ FEC_INPUT_DEVICES

#define FEC_INPUT_DEVICES   2

Definition at line 34 of file verity_fec.c.

◆ FEC_MAX_RSN

#define FEC_MAX_RSN   253

Definition at line 32 of file verity_fec.c.

◆ FEC_MIN_RSN

#define FEC_MIN_RSN   231

Definition at line 31 of file verity_fec.c.

◆ FEC_PARAMS

#define FEC_PARAMS (   roots)
Value:
8, /* symbol size in bits */ \
0x11d, /* field generator polynomial coefficients */ \
0, /* first root of the generator */ \
1, /* primitive element to generate polynomial roots */ \
(roots), /* polynomial degree (number of roots) */ \
0 /* padding bytes at the front of shortened block */

Definition at line 37 of file verity_fec.c.

◆ FEC_RSM

#define FEC_RSM   255

Definition at line 30 of file verity_fec.c.

Function Documentation

◆ FEC_div_round_up()

static uint64_t FEC_div_round_up ( uint64_t  x,
uint64_t  y 
)
inlinestatic

Definition at line 64 of file verity_fec.c.

Referenced by FEC_process_inputs().

◆ FEC_interleave()

static uint64_t FEC_interleave ( struct fec_context ctx,
uint64_t  offset 
)
inlinestatic

Definition at line 70 of file verity_fec.c.

References fec_context::block_size, fec_context::rounds, and fec_context::rsn.

Referenced by FEC_read_interleaved().

◆ FEC_process_inputs()

◆ FEC_read_interleaved()

static int FEC_read_interleaved ( struct fec_context ctx,
uint64_t  i,
void *  output,
size_t  count 
)
static

◆ VERITY_FEC_blocks()

◆ VERITY_FEC_process()