From 05009f9407700943b47ba166ef371e57fd5d6d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mamy=20Andr=C3=A9-Ratsimbazafy?= Date: Sun, 23 Feb 2020 02:23:19 +0100 Subject: [PATCH] Fix mux comment and link --- constantine/primitives/constant_time.nim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/constantine/primitives/constant_time.nim b/constantine/primitives/constant_time.nim index 89372bb..dee207e 100644 --- a/constantine/primitives/constant_time.nim +++ b/constantine/primitives/constant_time.nim @@ -215,10 +215,9 @@ template mux*[T: Ct](ctl: CTBool[T], x, y: T): T = ## So equivalent to ctl? x: y # # TODO verify assembly generated - # as mentioned in https://cryptocoding.net/index.php/Coding_rules - # the alternative `(x and ctl) or (y and -ctl)` - # is optimized into a branch by Clang :/ - # See also: https://www.cl.cam.ac.uk/~rja14/Papers/whatyouc.pdf + # Alternatives: + # - https://cryptocoding.net/index.php/Coding_rules + # - https://www.cl.cam.ac.uk/~rja14/Papers/whatyouc.pdf # # TODO: assembly fastpath for conditional mov let # Templates duplicate input params code