mat.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "matrix.h"

Include dependency graph for mat.c:

Go to the source code of this file.

Functions

binmat_t mat_ini (int rown, int coln)
binmat_t mat_ini_from_string (int rown, int coln, const unsigned char *s)
void mat_free (binmat_t A)
binmat_t mat_copy (binmat_t A)
binmat_t mat_rowxor (binmat_t A, int a, int b)
int * mat_rref (binmat_t A)
void mat_vec_mul (unsigned long *cR, unsigned char *x, binmat_t A)
binmat_t mat_mul (binmat_t A, binmat_t B)


Function Documentation

binmat_t mat_copy ( binmat_t  A  ) 

Definition at line 66 of file mat.c.

References matrix::coln, matrix::elem, mat_ini(), matrix::rown, and matrix::rwdcnt.

Here is the call graph for this function:

void mat_free ( binmat_t  A  ) 

Definition at line 60 of file mat.c.

References matrix::elem.

Referenced by key_genmat(), and keypair().

binmat_t mat_ini ( int  rown,
int  coln 
)

Definition at line 33 of file mat.c.

References matrix::alloc_size, BITS_PER_LONG, matrix::coln, matrix::elem, matrix::rown, and matrix::rwdcnt.

Referenced by key_genmat(), mat_copy(), and mat_mul().

binmat_t mat_ini_from_string ( int  rown,
int  coln,
const unsigned char *  s 
)

binmat_t mat_mul ( binmat_t  A,
binmat_t  B 
)

Definition at line 165 of file mat.c.

References matrix::alloc_size, matrix::coln, matrix::elem, mat_change_coeff, mat_coeff, mat_ini(), and matrix::rown.

Here is the call graph for this function:

binmat_t mat_rowxor ( binmat_t  A,
int  a,
int  b 
)

Definition at line 78 of file mat.c.

References matrix::elem, and matrix::rwdcnt.

Referenced by mat_rref().

int* mat_rref ( binmat_t  A  ) 

Definition at line 91 of file mat.c.

References matrix::coln, mat_coeff, mat_rowxor(), and matrix::rown.

Referenced by key_genmat().

Here is the call graph for this function:

void mat_vec_mul ( unsigned long *  cR,
unsigned char *  x,
binmat_t  A 
)

Definition at line 148 of file mat.c.

References matrix::elem, matrix::rown, and matrix::rwdcnt.


This work was partially suported by Europian Network of Excellence, ECRYPT; ECRYPT