2 ms·
Is there any reason the `secret` type can't be implemented in, say, Rust, or is it just Google getting really excited to reinvent the wheel again?
by anhner 4y ago
Is there any reason the `secret` type can't be implemented in, say, Rust, or is it just Google getting really excited to reinvent the wheel again?
- kibwen 4y agoYou can have a Secret type in Rust where the Eq, Add, etc. traits are overloaded with constant-time versions. I'm unclear if there are any semantics that operator overloading doesn't address.
- yccs27 4y agoThe secret (heh) is that any function defined on non-secret arguments can automatically be applied to secret arguments as well, and just returns a secret value now - without having to think about mapping/monads/whatever.
- mumblemumble 4y agoI think that it's actually something like the opposite of that. Rune disallows conditional branching on secrets, which would imply that passing secrets into the subset of functions defined on non-secrets that branch control flow based on an argument's value would be a compiler error.