-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security Patch: Fixing Loopholes for Timing Attacks #3
base: master
Are you sure you want to change the base?
Conversation
… vulnerabilities by the means of timing attacks Signed-off-by: Marco Aurélio da Silva <[email protected]>
…pening phase Signed-off-by: Marco Aurélio da Silva <[email protected]>
Signed-off-by: Marco Aurélio da Silva <[email protected]>
…t Makefile step Signed-off-by: Marco Aurélio da Silva <[email protected]>
…OCaml +4.07 during CI build Signed-off-by: Marco Aurélio da Silva <[email protected]>
Signed-off-by: Marco Aurélio da Silva <[email protected]>
Signed-off-by: Marco Aurélio da Silva <[email protected]>
The let hmac_compare (a : string) (b : string) : bool =
let random = random_bytes 32 in
hmac_sha256 a ~key:random = hmac_sha256 b ~key:random |
Dunno if mixing |
…ring-comparison Signed-off-by: Marco Aurélio da Silva <[email protected]>
… base64 encoding on input message anymore Signed-off-by: Marco Aurélio da Silva <[email protected]>
…ing phases Signed-off-by: Marco Aurélio da Silva <[email protected]>
…ovided by now 'cause it will need a csprng from mirage-crypto dependency) Signed-off-by: Marco Aurélio da Silva <[email protected]>
…h by now Signed-off-by: Marco Aurélio da Silva <[email protected]>
Signed-off-by: Marco Aurélio da Silva <[email protected]>
Signed-off-by: Marco Aurélio da Silva <[email protected]>
I should as well test the timings by using AES-CTR mode instead AES-CBC. 'Cause I generate a random key, there's no such key+IV reuse problem for stream ciphers (AES-CTR in the case). AES-CTR is faster than AES-CBC, but harder to make it right due counter/IV management (it requires a stateful tracking of that). Nevertheless, AES-CTR makes padding useless (more timings saved), but both Another really important question is how secure is AES-CTR for long-lived data 'cause it's just a xor-ed key-stream, could it resist all major cipher attacks (assuming AEAD-support with Encrypt-then-MAC in the same sense of configured AES-CBC)? Would it be a commiting encryption / lockable box as well? Discussion open for future tracking. |
Things seem to fail no matter how I try to find a good |
…ad mirage-crypto - blake2b mac replaced by sha256 for broader compatibility Signed-off-by: Marco Aurélio da Silva <[email protected]>
AES-CTR encryption is discarded 'cause we will provide support for the encryption of opening key too (see #5), possibly reusing an end-user password from |
Signed-off-by: Marco Aurélio da Silva <[email protected]>
Signed-off-by: Marco Aurélio da Silva <[email protected]>
This PR is open to track changes and further discussion. This patch introduces the
eqaf
library dependence and some refactorings. I need to make both execution flows in case of success and failure to match in their own approximate execution times. In this sense:eqaf
);More discussion is still needed here.