Commit 09334b70 authored by Jack Doerner's avatar Jack Doerner

Even more bitpacking. Even more speed.

parent 8dc86b2c
......@@ -12,7 +12,7 @@ CKT_ORAM_DEPS=block.oo circuit_oram.oo linear_scan_oram.oo nonrecursive_oram.oo
FLAT_ORAM_DEPS=bitpropagate.oo bitpropagate.o flatoram_util.oo flatoram_util.o scanrom.oo scanrom.o flatoram.oo
ORAM_DEPS = $(SQRT_ORAM_DEPS:%=oram_sqrt/%) $(CKT_ORAM_DEPS:%=oram_ckt/%) $(FLAT_ORAM_DEPS:%=oram_flat/%) oram.oo
OBJS=$(DEPS) $(ORAM_DEPS) obig.oo ochacha.oo ograph.oo omatch.oo oqueue.oo\
osalsa.oo oscrypt.oo osearch.oo osha256.oo osha512.oo osort.oo ofastaes.oo
osalsa.oo oscrypt.oo osearch.oo osha256.oo osha512.oo osort.oo oaes.oo
TEST_PATH=tests/
TEST_OUT_PATH=build/tests/
......
This diff is collapsed.
......@@ -10,6 +10,7 @@ void oaes_128(obliv uint8_t out[16], obliv uint8_t key[16],const obliv uint8_t b
oaes_ctx * oaes_128_ctx_ctr_new(const obliv uint8_t key[16],const obliv uint8_t iv[16]);
void oaes_128_rekey(oaes_ctx * ctx, obliv uint8_t key[16], obliv uint8_t iv[16]);
void oaes_128_encdec(obliv uint8_t out[16], oaes_ctx * ctx, const obliv uint8_t block[16]) obliv;
void oaes_128_encdec_double(obliv uint8_t out1[16], obliv uint8_t out2[16], oaes_ctx * ctx, const obliv uint8_t block1[16], const obliv uint8_t block2[16]) obliv;
void oaes_128_ctx_free(oaes_ctx * ctx);
#endif
\ No newline at end of file
This diff is collapsed.
#ifndef OBLIV_FAST_AES_OH
#define OBLIV_FAST_AES_OH
#include <obliv.oh>
#include <stdint.h>
void oaes_fast128(obliv uint8_t out[16], obliv uint8_t key[16], const obliv uint8_t in[16]) obliv;
#endif
\ No newline at end of file
......@@ -32,7 +32,9 @@ void online_expand(void * dest, void * src, size_t n) obliv {
~obliv() {
oaes_128_rekey(sslctx, src, sslzero);
}
for (size_t ii = 0; ii < n; ii++) {
oaes_128_encdec(element(&sslcpy, dest, ii), sslctx, NULL);
size_t ii = 0;
for (; ii < n/2; ii++) {
oaes_128_encdec_double(element(&sslcpy, dest, ii*2), element(&sslcpy, dest, ii*2+1), sslctx, NULL, NULL);
}
if (n%2 != 0) oaes_128_encdec(element(&sslcpy, dest, ii*2), sslctx, NULL);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment