It has made enough mistakes in this area that I now have a standing instruction (the only one) to always loudly warn whenever the official source for something couldn't be fetched.
7,725 karma · joined March 17, 2010
It has made enough mistakes in this area that I now have a standing instruction (the only one) to always loudly warn whenever the official source for something couldn't be fetched.
I'm not a native speaker, so I might have genuinely missed something here. Still, if I had this warning printed on my cubicle I would be fearing for my job everyday.
scale(1,2) = 0
scale(3,4) = 0
scale(5,6) = 0
scale(7,8) = -1 # If it was zero, the counterfeit would be ball #9.
scale(6,7) = 0 # Must compare to a known-good ball. Here #8 is counterfeit.You give it a pattern for each token type, and a function to process each match, and you get back a list of processed tokens.
Importantly, it processes the list in one pass and ensures the matches are contiguous, where a naive `re.findall` with capture groups will ignore unmatched characters. You also get a reference to the running scanner, so you can record the location of the match for reporting errors.
import re
# Initialize the scanner.
scanner = re.Scanner([
(r"\d+", lambda scanner, token: ('COUNT', int(token))),
(r"\w+", lambda scanner, token: ('ANIMAL', token.removesuffix('s'))),
(r"[,. ]", None), # None -> skip token.
])
# Scan a sample string.
results, remainder = scanner.scan("45 pigeons, 23 cows, 11 spiders.")
# Ensure we parsed the whole thing.
assert not remainder
print(results)
# [('COUNT', 45),
# ('ANIMAL', 'pigeon'),
# ('COUNT', 23),
# ('ANIMAL', 'cow'),
# ('COUNT', 11),
# ('ANIMAL', 'spider')]
[0]: https://stackoverflow.com/a/693818/252218[1]: https://en.wikipedia.org/wiki/Lexical_analysis#Tokenization
- Identifying suspicious people and situations.
- Helping people carry things through the lobby.
- Passing messages before cellphones.
- Receiving packages.
- Making sure people in the lobby behaved.
And probably more that I never realized as a child. Doorman doesn't necessarily mean "suited guy standing attention outside the building next to a door". The locks were also electronic, so they didn't even have to stand up to answer intercom buzzes.
But because the sun's trajectory changes throughout the year, and we live in very coarse timezones already, it was always a bit useless tracking this with seconds precision.
On a side note, I really like how the site formatted the reasoning. I'll be copying it to my technical writing.
The page lists several good reasons for this, including:
- It's a common source of bugs.
- Solar time is not that important in a world of coarse timezones.
- IoT and anything that cannot receive time updates have trouble with leap seconds.
- Negative leap seconds have never occurred before, but might occur in the future, and almost no software has tested this case.
I'd also add:
- Unix timestamps are actually defined as "seconds since epoch minus however many leap seconds have happened". It's a hack to keep code that assumes "86400 seconds in a day" from breaking. It means that during a leap second the Unix timestamp goes back and repeats a previous value, making them ambiguous and non-monotonic.
- Leap second unpredictability can make it impossible to calculate how many seconds are between two UTC dates or Unix timestamps, for example the countdown to the year 2038 bug.
- The proper ISO8601 formatting of leap seconds ("23:59:60") is widely unsupported, breaking parsers, along with the assumption of how many seconds are in a minute, hour, or day.
---
EDIT: I've emailed hn@ycombinator.com to change the title. It's avoiding editorialization, but I think it's also preventing the post from getting the attention it deserves.
I'm booking a yearly one-second-long holiday on my calendar, to celebrate all the headaches this will save me. Happy end of leap seconds!
In case somebody got the same question as me: the robot "sees" point clouds as input, so basically the full simulation state except for velocities (correct me if I'm wrong). As put in the limitations section, it "[does] not establish robustness to perception error, latency, or contact-model mismatch".
That's a clever attack and it indeed seems viable.
In my proposed protocol the public recovery key defines a "profile", and the account "username" is generated based on this key plus the service domain. So an attacker replacing this key would be reflected in the app as a completely new profile, and cause all your logins to fail. Not a perfect mitigation, but something.
I would be happy with that already, but I think even better solutions might exist.
Another issue of using one "master recovery keypair" naively with passkeys, is that you have to register the same recovery public key on every service, losing your pseudonymity. In my protocol that's not a problem because the recovery key pair is used for decryption, not signature, so the "public" key is never shared. Also, all these services already require an email anyway.
(I'm not trying to advertise my protocol because I never figured out a good way to do multi-device sync without trusting the cloud or having bad ergonomics. SQRL solved it by having deterministic keys, but that makes much worse the problem of a past leak compromising your future accounts)
> Nothing prevents an attacker [...]
I mean, hopefully the device security does! That's as bad as someone adding a hidden forwarding rule to your email account, or adding a new device to your password manager cloud sync.
Those are strings typed by humans and frequent victims of typos, so the need is much higher. But you're right that it's still useful to prevent a user from accidentally using a bad key, or from selecting a maliciously formatted public key to mess with the protocol. I just don't think these benefits outweigh the lost ability of making offline backups.
Maybe allowing registration of multiple keys, but only requiring proof of possession of one key would be a good compromise.
Then you won't be able to use it with Netflix when they require attestation. How's that supposed to help?
> nothing in principle stops them from forcing you to use [...] Microsoft Authenticator
Did you read the article? The author explicitly compares passkeys with TOTP, and explains how relying parties cannot force you to use a specific TOTP provider, because TOTP providers are indistinguishable from the relying party perspective. You could do it with pen and paper and nobody could stop you.
> Yet I do not see people using that as a reason to write articles about how OIDC 2.0 [...] is a trap.
First, there's no such thing as OIDC "2.0". And yes, people do complain about the SSO "Log in with X" services, for precisely the same lock in problems:
https://jeangalea.com/hidden-cost-of-sign-in-with-google/
https://www.androidauthority.com/are-you-still-using-sign-in...
https://www.techlusive.in/features/i-used-sign-in-with-googl...
Sorry to be blunt, but if your account was not so old I would be reporting you as a possible bot or troll. In my 16 years on HN, this has been my most baffling conversation. I see your other comments on this same post, and you make good points there, I don't understand what's going wrong here.
Filippo is my favorite way to keep myself abreast of the newest (professionally relevant!) drama in the cryptography community. As a colleague said today, "life is too short to read through all the TLS working group mailing list".
> Nothing forces you to use a passkey provider that enforces attestation if that’s what your threat model worries about.
I'm very confused by this statement.
For starters, attestation is unrelated to the topic of offline backups discussed in this thread.
Second, the whole problem of attestation, as described in the original post, is that it's not you who decides when to use it. And it's not the passkey provider who enforces attestation, as you said. It's the Relying Party, like Netflix, who can unilaterally decide the minimum security features of my passkey scheme, with all their drawbacks, and attestation ensures that they're followed.
Or, in an AI context, if I tell an ablated/heretic agent to accomplish a task "by any means necessary", isn't that intent?
I proposed a protocol with this feature almost a decade ago: https://www.researchgate.net/publication/343318317_Privacy-a...
The problem is that the passkey protocol prevents you from adding a (additional) key you don't currently control. This is what crote was referencing here:
> Passkeys have to be online to enroll additional keys, so any kind of software or smartphone solution is going to depend completely on cloud sync.
- Relying on emails for account recovery prevents creation of anonymous accounts.
- Have you ever lost your "convenience yubikey"? People underestimate how painful mass account recovery can be.
- The cost of 3 yubikeys can be substantial for some demographics.
- Important accounts are not properly backed up until you drive to your safe. That can be many days for a bank deposit box, or even longer if you're traveling.
Overall that's a lot of compromises for what should have been just "put this recovery key/password in a safe and forget about it until needed", if the protocol was better. And definitely not something that can be widely recommended.
That's all true, but also not the point of this thread (offline backups) or the post (attestation limiting user freedom).
The protocol requires additional keys to sign a challenge during registration, so at best you have to load a pre-generated key from the safe when creating a new account. In practice, you generate a new key for every account, so between generating the key and storing it in your safe there's no backup but cloud sync.
This prevents using backup storage that is safer but inconvenient to access, and also prevents registering accounts on-the-go.