Andrew Kozlik
10e0a90cb6
Fix possible shift overflow UB in unbitslice()
...
Fixes #36
Signed-off-by: Daan Sprenkels <daan@dsprenkels.com >
2020-08-25 14:57:12 +02:00
Daan Sprenkels
b613717c2b
hazmat: remove SHA256 decl.
2017-08-03 19:27:21 +07:00
Daan Sprenkels
5f6a1fbbff
hazmat: Use randombytes instead of SHAKE256
2017-07-10 18:30:53 +08:00
Daan Sprenkels
6da0abfd83
Remove inline declarations
2017-07-07 14:49:40 +08:00
Daan Sprenkels
5ad67a192b
Change sss_Keyshare type to uint8_t[33]
...
This change is introduced, because this makes it a lot easier to
expose the API the other languages that do not support C structs.
This is a break in the API contract for the `hazmat.h` module.
No API changes have been introduced in the `sss.c` module so all
current language bindings should be okay.
2017-07-06 10:57:32 +08:00
Daan Sprenkels
0ddc34c662
Merge branch 'master' into internal_serde
2017-06-13 16:34:14 +02:00
Daan Sprenkels
7ea08e7f5f
Merge branch 'travis'
2017-06-13 16:32:20 +02:00
Daan Sprenkels
b42869cc34
Move serde functions out of their own module
2017-06-13 16:01:56 +02:00
Daan Sprenkels
b835557e39
Optimize gf256_inv
...
This commit slightly optimizes the `gf256_inv` function. It now
uses some temporary (bitsliced) registers allowing us to shave off
two GF(2^8) multiplications. This does not really matter in the
long (~2%), but after having implemented it, it feels strange *not*
to submit it.
2017-06-04 18:20:21 +02:00
Daan Sprenkels
954c43bb8a
Merge branch 'builtin-random' into travis
2017-05-13 21:08:25 +02:00
Daan Sprenkels
acdc769e29
Add separate randombytes module
2017-05-13 21:05:24 +02:00
Daan Sprenkels
cc2dc7c509
hazmat.c: eliminated one 256 bit variable
2017-05-13 13:04:53 +02:00
Daan Sprenkels
e1cf7e6b71
Add some docs to C code
2017-05-12 12:10:39 +02:00
Daan Sprenkels
fe0627959f
Increase optimization level
2017-05-12 12:10:25 +02:00
Daan Sprenkels
d058b3a453
Optimize away memset in gf256_mul
2017-05-12 11:06:32 +02:00
Daan Sprenkels
39491f82c0
Inline hot functions in hazmat.c
2017-05-12 11:02:45 +02:00
Daan Sprenkels
2e884f5f28
Implement squaring in gf2^8
2017-05-12 10:39:57 +02:00
Daan Sprenkels
8dbd19496b
Implement bitsliced keysharing
2017-05-11 19:22:09 +02:00
Daan Sprenkels
35cf931c00
Revert "Temporarily replace randombytes with user supplied buf"
...
This reverts commit c713515597 .
2017-05-08 14:14:14 +02:00
Daan Sprenkels
ebf5d1bca5
Replace int-mult by mask op in gf256 multiplication
2017-05-08 13:46:13 +02:00
Daan Sprenkels
23f96d00e1
Reduce the amount of generated random bytes
...
This commit optimized the generation of key shares by letting
the SKAHE256 PRF only generate the exact amount of random bytes
that is needed.
2017-04-25 17:54:40 +02:00
Daan Sprenkels
c713515597
Temporarily replace randombytes with user supplied buf
2017-04-14 09:53:24 +02:00
Daan Sprenkels
4777684ece
Remove some unnecessary includes
2017-04-13 22:10:28 +02:00
Daan Sprenkels
8819494e86
Substitute {SSS => sss}
2017-04-13 21:57:03 +02:00
Daan Sprenkels
a32f3fd149
Add implementation of high level API
2017-04-13 16:20:13 +02:00
Daan Sprenkels
f3ca3bd574
Add separate randombytes module
2017-04-13 13:15:49 +02:00
Daan Sprenkels
41ff9bc7fe
Revert "Add travis-ci config file"
...
Travis does not seem to work with the getrandom system
call yet. We should probably look into this later.
This reverts commit 137fa98b92 .
2017-04-12 09:21:50 +02:00
Daan Sprenkels
137fa98b92
Add travis-ci config file
2017-04-11 20:02:55 +02:00
Daan Sprenkels
53b0e218c7
Finish low level API prototype
2017-04-11 19:09:12 +02:00
Daan Sprenkels
ed25e5ff4e
[wip] Implement sharing/combining for byte secrets
2017-04-09 20:56:07 +02:00