Hacker News new | past | comments | ask | show | jobs | submit login

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?



You 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.


The 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.


I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: