diff --git a/.README.md.swp b/.README.md.swp index d921b21..5bfef70 100644 Binary files a/.README.md.swp and b/.README.md.swp differ diff --git a/README.md b/README.md index 7f0aa3a..8a02c3c 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,39 @@ C polynomial library for ECC based cryptography. - **Libntru** : Polynomial multiplication and inversion [commit](https://github.com/tbuktu/libntru/commit/15423e7f5f44d5ef69cb4aa50eaa03c07a7ecad0) - **Sanfoundry** : [C Program to Evaluate given polynomial equation](https://www.sanfoundry.com/c-program-polynomial-equation/) +## Libntru Notes + +Libntru use some custom data types declared in `types.h`. + +`NtruIntPoly` : Polynomial with 16-bit integer coefficients + +```c + typedef struct NtruIntPoly { + uint16_t N; + int16_t coeffs[NTRU_INT_POLY_SIZE]; + } NtruIntPoly; +``` + +`NtruTernPoly` : Ternary polynomial, all coefficients are equal to -1, 0, or 1. +```c + typedef struct NtruTernPoly { + uint16_t N; + uint16_t num_ones; + uint16_t num_neg_ones; + uint16_t ones[NTRU_MAX_ONES]; + uint16_t neg_ones[NTRU_MAX_ONES]; + } NtruTernPoly; +``` + + + ## Key Components +- [ ] Basic Evaluation on generated equation - [ ] Basic Operation (Addition, Reduction, Multiplication, Division) - [ ] Advance Operation (Inversion) - [ ] Bitwise for array - [ ] Pointer management for polynomial indexes - +- [ ] Random Generators diff --git a/src/.poly.c.swp b/src/.poly.c.swp new file mode 100644 index 0000000..4766d92 Binary files /dev/null and b/src/.poly.c.swp differ diff --git a/src/.types.h.swp b/src/.types.h.swp new file mode 100644 index 0000000..9d5fc07 Binary files /dev/null and b/src/.types.h.swp differ diff --git a/src/poly.c b/src/poly.c new file mode 100644 index 0000000..9093717 --- /dev/null +++ b/src/poly.c @@ -0,0 +1,4 @@ +#include +#include + + diff --git a/src/types.h b/src/types.h new file mode 100644 index 0000000..f8ffedc --- /dev/null +++ b/src/types.h @@ -0,0 +1,5 @@ +/* Here we Declared our custom data types */ + +struct infPoly { + +}