Project design
This commit is contained in:
parent
c702fa9dd3
commit
e098f57a87
BIN
.README.md.swp
BIN
.README.md.swp
Binary file not shown.
29
README.md
29
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
|
||||
|
||||
|
||||
|
||||
|
BIN
src/.poly.c.swp
Normal file
BIN
src/.poly.c.swp
Normal file
Binary file not shown.
BIN
src/.types.h.swp
Normal file
BIN
src/.types.h.swp
Normal file
Binary file not shown.
4
src/poly.c
Normal file
4
src/poly.c
Normal file
@ -0,0 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
5
src/types.h
Normal file
5
src/types.h
Normal file
@ -0,0 +1,5 @@
|
||||
/* Here we Declared our custom data types */
|
||||
|
||||
struct infPoly {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user