News for hackers. Stuff that matters.
Re:ᚣ the Rune Programming Language by namkt on Sunday November 27, 2022 @05:52AM (#33762039)
I think the point behind "constant time" here is that the comparison always takes the same amount of time, and not based on how many characters in the two strings are equal, to prevent a timing attack. "Constant time" isn't very accurate here because given a choice of hashing algorithm, the hash is a fixed-length string and therefore even a trivial string comparison technically "runs in constant time", at least if we allow the typical abuses of language in CS.
Re:ᚣ the Rune Programming Language by fidgewidge on Sunday November 27, 2022 @10:16AM (#33763451)
Yes, but my point is that there are only a few use cases for this, mostly in cryptography, and to ensure something is genuinely constant time you have to write in assembly. The routines needed are small enough and compilers hard enough to trust that you just bypass them in practice, so it's an odd choice for something to build into a language syntax.
Re:ᚣ the Rune Programming Language by namkt on Monday November 28, 2022 @06:47AM (#33772430)
My assumption is that it's not just the syntax, but that their compiler does the right thing. Though someone said it's based on LLVM, so who knows how much control they get.