This PR introduces a purely ElGamal-based rerandomizable encryption scheme for arbitrarily long ciphertexts and makes that the default over the HPKE based double encryption.
Unfortunately the purely ElGamal-based encryption scheme is very slow since it basically encodes a message byte for byte as P256 group elements and the performs encryption / randomization / decryption on those encoded message bytes indivually. This takes a lot of time, as does the encoding and decoding.
This should also fix the WASM demo, since we no longer depend on libcrux (for HPKE) by default. We no longer need emscripten to build the demo, running wasm-pack build --target web --features wasm seems to work. Still some issues apparently, since the demo is not displayed when served in the way the old version was served.
This PR introduces a purely ElGamal-based rerandomizable encryption scheme for arbitrarily long ciphertexts and makes that the default over the HPKE based double encryption.
Unfortunately the purely ElGamal-based encryption scheme is very slow since it basically encodes a message byte for byte as P256 group elements and the performs encryption / randomization / decryption on those encoded message bytes indivually. This takes a lot of time, as does the encoding and decoding.
This should also fix the WASM demo, since we no longer depend on libcrux (for HPKE) by default. We no longer need emscripten to build the demo, running
wasm-pack build --target web --features wasm
seems to work. Still some issues apparently, since the demo is not displayed when served in the way the old version was served.