Cypherock / MPC-TSS

MPC-TSS is a project to demonstrate the working of our threshold signature scheme leveraging the security of X1 hardware wallet
https://cypherock.com/
GNU Affero General Public License v3.0
8 stars 5 forks source link

ot: init #1

Closed natto1784 closed 12 months ago

natto1784 commented 1 year ago

Directory Structure

git ls-tree -r --name-only HEAD | tree --fromfile

.
├── .gitignore
├── include
│   ├── bignum.h
│   ├── bignum.h.gch
│   ├── byte_order.h
│   ├── memzero.h
│   ├── options.h
│   ├── ot.h
│   └── sha2.h
├── LICENSE
├── Makefile
└── src
    ├── bignum.c
    ├── main.c
    ├── memzero.c
    ├── ot.c
    └── sha2.c

include: C headers for files in src src: C source files Makefile: Makefile recipe

Files

bignum.h bignum.c: 256 bit integer library from trezor-crypto sha2.h sha2.c: library for SHA-2 hash functions from trezor-crypto memzero.c memzero.h options.h byte_order.h: Other dependencies from trezor-crypto ot.h ot.c: POC for a very simple oblivious transfer (Needs more work IMO) main.c: Entrypoint

New Functions in ot.h

void xorr (uint8_t *, uint8_t *, uint8_t *, uint32_t)

Simple XOR operation for on two byte arrays (for simulating encryption and decryption)

void random256bits(uint8_t )

Generates random byte array from /dev/urandom (entropy based PRNGs in UNIX-like systems).

void ot_poc(uint32_t)

Experimental POC for oblivious transfer