frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

The cryptography behind electronic passports

https://blog.trailofbits.com/2025/10/31/the-cryptography-behind-electronic-passports/
63•tatersolid•7h ago

Comments

mothballed•3h ago
The amount of human effort, labor, and heartache put into squabbling over where someone was born or was naturalized is absolutely mind blowing.
axus•3h ago
The native Americans tolerated immigration, and we all know what happened to them.

On the topic of the article, every hotel outside the US I've used has asked for my passport; I didn't know that a copy of the details exposed weaknesses on the electronic side.

xhkkffbf•3h ago
Tolerated? Some welcomed it and some actively fought several wars against it and lost. Many tribes conducted some kind of economic transaction that traded land for something else.
mistrial9•3h ago
Various California native people practiced slavery and indentured servitude on each other before the arrival of Spanish Catholics. The Mayan people went further than that.
iso1631•3h ago
Still do. Slavery is perfectly legal in modern day USA, it's enshrined in the constitution

> Neither slavery nor involuntary servitude, except as a punishment for crime whereof the party shall have been duly convicted, shall exist within the United States, or any place subject to their jurisdiction.

Which is functionally the same as

> slavery or involuntary servitude, as a punishment for crime whereof the party shall have been duly convicted, shall exist within the United States, or any place subject to their jurisdiction.

Phemist•3h ago
Yes, as this blog post doesn't mention it, the "password key" is specifically derived from your Date of Birth, the document's Date of Expiry and the Document Number. For the specimen document in the blog post these values are respectively 740812 (YYMMDD), 120415 (YYMMDD) and L898902C3. They are contained in both the MRZ and the VIZ (Visual Inspection Zone).

Considering the Date of Birth and Date of Expiry are necessarily limited in entropy, one should take care in protecting their Document Number as it is the greatest source of entropy for the derived "password key".

iso1631•3h ago
> Every hotel outside the US I've used has asked for my passport

Every hotel in the US and any other country has asked for my passport (and credit card), but I'm not American.

The textual information on the page of my passport is basically public knowledge, like a phone number or an american social security number. It's rare that a hotel takes the passport out of sight (and potentially scan the chip), but a photocopy is fairly frequent.

wat10000•3h ago
The USA welcomed immigration and we all know what happened to them.
ghaff•3h ago
I very much doubt if every hotel I've stayed in outside the US has asked for my passport but certainly many/most have. Never really paid much mind.

As a US resident, I have often been asked for a drivers license in the US and it was actually an issue at one point when I had lost it though I was able to work around with some difficulty. I suspect the details were some combination of local/state/and hotel policy.

stackskipton•2h ago
Most hotels I’ve stayed at ask for ID. If you are foreign, they want a passport only.

I have had issues with US hotels accept US passports and fought with one over it.

ghaff•2h ago
I expect that quite a few hotel clerks in the US are just not familiar with anything other than a driver's license as government ID (or think a driver's license is the only acceptable ID). I'm pretty sure that I would have an issue with a global entry card at some point if I were to routinely use it outside of TSA (as I do after my driver's license issue) even though it's perfectly valid US government ID.

Generally speaking, hotels in the US do seem to want government ID. Don't really know the requirement in general. This was a fairly low-rent chain that I was only using because last minute. I expect if it had been one of my major loyalty chains, a manager would have fixed things pretty quickly.

ADDED: Normally I travel with a passport as well but, as I say, this was a last moment short trip so I didn't throw in all my travel pouches.

alphazard•3h ago
A democracy cannot function if the electorate is not well defined. They are vulnerable to Sybil attacks, same as the distributed ledgers and hash tables.
Danjoe4•3h ago
Go to South Sudan and tell me if you still feel the same way.
xhkkffbf•3h ago
If you want to have "safety net" social programs, it can't be avoided. At least until there's only one government.
iso1631•3h ago
In the UK I don't need a passport to travel or move home, yet social programs and taxes vary not just between the constituent nations but also between smaller government areas. It's often decried as a "postcode lottery".

I'm certain that it varies even more between American states. Presumably the social "safety net" assistance in California is different to that in Montana. In Alaska people get free money.

Entitlement tends to be based on where you live

z2•3h ago
It is one of the core concepts of sovereignty--defining a territory and then deciding who or what gets to be inside. Along with a government with a monopoly on violence used inwards, and some foreign relations directed outwards, you have the recipe for a modern country.
drsim•3h ago
It is a shame you are being downvoted, as it is an admirable ideology: why should someone be (dis)advantaged by the accident of where they were born.

In reality though, 8 billion people hold a wide spectrum of beliefs. I would not want to live in a society with low taxation and low welfare for example. How can I live side-by-side with those that do? Of course, we all have limited choice to move if our society does not match our beliefs.

lazide•3h ago
It also essentially defines who is asserting ownership over someone (from the sense of ‘who gets the body if they die?’ to ‘who is going to go to war with us if we do something they really don’t like to this person’). Not to mention if someone gets hurt and ends up in a coma or something, who is responsible for the bills?

Which may seem like hypothetical questions to the young or the inexperienced, but are very real concerns hidden behind a veil of generally maintained civility in most of modern society.

morshu9001•2h ago
Plenty of the 8B people will take you up on that high taxation and welfare offer
15155•3h ago
How do you offer entitlements and quality healthcare to the entire population of the world without money?

Who should be allowed to participate in the decision-making process that allocates these finite resources?

ceejayoz•3h ago
Who said anything about "without money"?
15155•3h ago
Money is finite - where is this money coming from?

Vacuuming the (imaginary - we're using feelings here, let's not split hairs on things like 'markets') accounts of every billionaire and redistributing these funds evenly amounts to singular thousands of dollars to just citizens.

The overwhelming majority of actual taxpaying citizens don't pay enough tax to cover their per-capita share of government spending, is there some factual evidence to suggest that unlimited economic migrants would? (or could?)

ceejayoz•2h ago
Money is finite. So are basic survival needs.

We certainly can't give everyone a Bezos yacht. But we can probably have a little less famine, as a treat.

gruez•2h ago
>But we can probably have a little less famine, as a treat.

Surely it's cheaper to do that via foreign aid in whatever country that's experiencing famine, where the cost of living is lower?

ceejayoz•2h ago
Yes, we should absolutely undo the USAID cuts.
15155•2h ago
Thankfully, these superfluous expenses will almost certainly remain unpaid for at least another 3 years.
ceejayoz•2h ago
See, this is what always happens. You didn't actually want to "do that via foreign aid". You don't want it at all.

Same deal with "what about the homeless veterans?!" or "it's mental health, not guns!" from people whose politics boil down to "fuck them, too".

15155•2h ago
> You don't want it at all.

Correct. We should shore up our own domestic finances and prosperity before helping the rest of the world.

We do not automatically incur a debt every time someone in a foreign country gets pregnant.

> "it's mental health, not guns!"

I wonder why Switzerland has no issue.

ceejayoz•1h ago
> Correct.

Then be honest and just say "fuck the poors", not a fake desire for doing it a different way that you hope will go unquestioned.

> I wonder why Switzerland has no issue.

27.6 guns per 100 residents, versus 120 in the US. Firearms registries, acquisition permits, and quite a few controls over ammo acquisition. Plus mandatory universal training via conscription.

15155•2h ago
> Money is finite. So are basic survival needs.

Yes, and the United States cannot shoulder the burden of the entirety of the world's economic migrants.

Where is this magical, commensurate influx of licensed doctors coming from to deal with the influx of unlimited economic migrants (who can't cover their own tax expenses?)

We're not talking about yachts: we're talking about healthcare and food. Take all the yachts away, force Bezos to liquidate everything (and every other billionaire): neither the income nor the fixed assets are enough to cover healthcare for the population we already have, much less a gargantuan, unproductive group of new arrivals.

ceejayoz•2h ago
But no one proposed bringing everyone to the US and leaving the rest of the world as a depopulated national park?
gruez•2h ago
>The overwhelming majority of actual taxpaying citizens don't pay enough tax to cover their per-capita share of government spending, is there some factual evidence to suggest that unlimited economic migrants would? (or could?)

Exactly. Evidence actually points in the opposite direction:

https://www.economist.com/sites/default/files/images/print-e...

https://www.economist.com/content-assets/images/20250315_FNC...

15155•2h ago
Basic math would show you that the vast majority of citizens cannot cover the taxable Federal spend: $6.4T/340M persons = $18823/individual. ~$20k in taxes are paid at ~$100k in income. The US taxation regime is highly progressive, obviously the vast majority of the country is not earning $100k annually.

> Evidence actually points in the opposite direction:

I was speaking about the United States: can you find a study that somehow documents illegal immigrant (by definition: undocumented) persons' productivity?

Folks brought over on legal immigration visas likely do make more money (and contribute more) than the average American: that's why we have these programs for 'exceptional' individuals. Nobody is going through the effort (nor can they afford the costs) of obtaining lawful visas for construction labor or meat processing staff.

gruez•2h ago
Read my comment more carefully. "Exactly" implies I agree with you, and so do the charts, which shows that immigrants are either a net drain on public finances, or only a subset are net contributors (and therefore implies some sort of screening is needed).
wat10000•1h ago
You might be underestimating the wealth of modern billionaires. According to Forbes, the net worth of the 50 wealthiest people in the US totals about $3.9 trillion. There are something like 320 million US citizens at the moment, so that's around $12,000 each. That's just the top 50. All US billionaires would be about $8 trillion, or $25,000 per citizen.

I agree with your overall point, seizing all the billionaires' wealth and redistributing it doesn't solve money woes (there are other reasons to do it), but they amount they do have is getting strikingly high.

In any case, money is accounting, not ability. The important question is: do we have the resources and skilled people needed for it? If not, then all the money in the world won't make it work. If so, then it can be done if people want it badly enough.

wat10000•3h ago
The downvotes on this comment are wild. Like, you didn't even say we should definitely enact open borders right now. You just lamented how things are. And it is absolutely lamentable. All the responses are basically saying "but we need it!" Which isn't even addressing what you're saying. Plenty of necessary things are lamentable.
foofoo12•3h ago
I was going to respond, but when I looked in my bag of trollfeed I saw it contained fuck all.
blackcatsec•2h ago
The comments rebuking you appear to forget that by definition GDP and wealth are derived from the population. Wealth for social programs is not a finite resource as the general consensus is that over one's lifetime more wealth is created by one's work effort than is needed to sustain the individual. Capitalism by definition extracts this extra wealth for the private interests of a few. But there's no particular reason that this extra wealth can't be used to assist those that may not even meet the necessity of output of sustaining themselves.

This is a difficult concept for people to understand because they look at their paychecks and go "I'm not deriving so much wealth!" well yeah. A huge, large chunk of your wealth is being extracted for capitalism. And in manners that will be very difficult for you to understand.

I'll try to explain it, though, for the audience that peruses these forums. You're a software developer.

You work for a public B2B software company. Your wealth is being extracted to: Pay for those company pizza parties, pay for the office you work in, pay in to the healthcare system that "your company is paying for" that isn't directly part of the premium you see on open enrollment, paying for the company holiday parties, paying into everyone's various insurance plans to reduce the out-of-pocket costs for everyone in those insurance plans (outside of your company, of course), paying for the CEO's multi-million dollar paycheck, paying for the bonuses of all of the management, paying for shareholder value and dividends, paying for the taxes your company pays, paying for the taxes you pay.

If your existence at your job didn't pay for those things, most companies will tend to lay you off.

And this goes for pretty much the vast majority of workers in the vast majority of jobs.

So saying that more immigrants somehow puts a strain on the system is just by definition incorrect, even if a percentage of those immigrants don't generate the same level of value you do as an individual. Do you think every person in your organization generates the same relative value? Of course not. In most businesses in America, does the janitor generate the same wealth as the CEO?

To be fair, there is a snarky comment to be made there about CEOs--but the objective reality is probably not. But the janitor is still generating some wealth by ensuring a safe, healthy, and comfortable workplace for the employees. Does that mean the janitor is not entitled to income? to healthcare? to benefits? to company holiday parties? to company pizza parties?

Just convert this into a much larger scale of the entirety of a country's population--and well, the answer is that most populations have enough free money floating around somewhere to provide essential services to everyone: education, food, safety and security, health, and likely even housing, electricity, and pretty much any other public service we could provide.

And this scales as a population grows.

blackcatsec•2h ago
To build on this: One might ask, why don't countries with larger populations directly derive more wealth (particular by measurement of GDP) than smaller populations naturally?

There are a lot of reasons for this, but the short answer is that health, education, and enough individual wealth to explore figuring out ways to generate new revenue streams is important. Authoritarian countries are by nature not able to do this due to limits of their authoritarian nature, not necessarily limits of their population numbers.

It's all intertwined :)

IncreasePosts•2h ago
Do you treat your immediate family better than an absolute stranger?

If so, why? Aren't they all just people?

morshu9001•2h ago
It's because generations/families are a thing. Even the countries taking the most immigrants like USA aren't expecting an immediate benefit, they're thinking 1-2 gens later.
SJk7TAy•3h ago
I have a very practical question with big political implications: Can electronic passports be used to make large-scale elections without government involvement?

I am thinking of authoritarian countries that issue modern e-passports but do not allow free elections. Can activists organize an election for all citizens of that country in some online form, asking the voters to scan their passports using their phones, so that

- only legitimate citizens (who have passports) can vote - votes remain anonymous - everybody can vote only once - the whole election can be audited

iso1631•3h ago
> authoritarian countries that issue modern e-passports but do not allow free elections

Those tend to not issue passports (of any kind) to many citizens.

Then there's access. In America for example only half the adults in the country even have a passport, and I suspect that skews quite heavily towards one demographic. Do you think that India, Nigeria, or Russia have more equitable access?

And even if they did, what stops the state issuing extra fake passports to citizens they want to vote.

of course then there's key elements of a free election, freedom of access to the ballot paper, freedom to campaign the same as others, freedom from imprisonment because you are running against the incumbent leader, having each vote being worth the same. Many countries prevent people in jail from voting, or even people who used to be in jail. Many countries give more power to one constituency than another, almost all have some level of unequal access to campaigning.

It's not a "Free election" or "no election".

The actual casting of the vote is only part of the story.

alphazard•3h ago
Yes, as long as the passports implement a signing scheme, and the set of valid public keys (the electorate) can be agreed upon. If you can sign arbitrary data, then you can sign other public keys, including whatever the voting system requires.

Vitalik has a great blog post about blockchain voting.

https://vitalik.eth.limo/general/2021/05/25/voting2.html

You probably wouldn't want to use the cryptography on the passports themselves to implement the voting system. You probably want to use one of the general purpose zkSTARKs or multi-party-computation systems.

morshu9001•2h ago
Can it be anonymous though? Ie you as a citizen can check that the outcome didn't count illegitimate votes, and that it included your vote, but can't tell who voted each way or at all.
gruez•2h ago
hence why

>You probably wouldn't want to use the cryptography on the passports themselves to implement the voting system. You probably want to use one of the general purpose zkSTARKs or multi-party-computation systems.

morshu9001•2h ago
Even if you're using a separate key for voting, the passport key had to sign it. How do you prove legitimacy of the voting key without exposing the passport key? It's not like in blockchain where your anonymity normally comes from people just not knowing which irl person owns a pubkey. (Though I know Monero etc use homomorphic enc for anon payments)

I'm also assuming here that the govt is signing all the passport keys, cause idk how else that would work.

alphazard•2h ago
Yes, it is possible to anonymously aggregate votes from a set of public keys, and ensure that no key has voted twice. It's also possible to ensure that one's own vote was included in the total.

The fact that this is even possible is deeply un-intuitive as it requires some of the most sophisticated cryptography. That's probably the greatest barrier to adoption. When people think of electronic voting, they think about trusting a company to make machines that operate on plaintext, and require humans to guard access to the machines. They aren't thinking about systems that are provably correct, where it is more likely for an asteroid to wipe out the country conducting the election than for the election results to be incorrect.

For the details and tradeoffs, I highly recommend Vitalik's blog.

morshu9001•2h ago
The authoritarian govt controls who gets passports and can create fake people if it wants.
embedding-shape•2h ago
I think once an authoritarian government is holding elections, regardless digital, analog or anything else, they can manipulate the results, there is no 100% foolproof way of holding honest elections when the top authority might not be honest.
morshu9001•2h ago
See also: e2ee on Facebook Messenger
j16sdiz•2h ago
> authoritarian countries that issue modern e-passports but do not allow free elections

You are trying to solve a political problem with a technological solution.

1. Many authoritarian countries don't allow freedom of travel (i.e. it is not easy to get a passport)

2. If they don't care free election, what's stopping them issuing more passport just for voting?

3. What's stopping them confiscating or revoking your passport?

darkamaul•2h ago
I never realized how much complexity goes into a passport, the cryptography, authentication layers, and others are mind blowing.

It’s impressive that something so small carries so many trust anchors. I’m wondering how they will manage to upgrade them - for future algorithms without breaking compatibility.

lxgr•1h ago
What's even more impressive is that this technology has been around for decades!

> I’m wondering how they will manage to upgrade them - for future algorithms without breaking compatibility.

Just like all other smartcard systems: Very, very slowly. Credit and debit payment cards with a smartcard (EMV) chip have similar issues – even small patches take multiple years due to the relatively long average card validity.

tonymet•2h ago
Washington State “Enhanced ID” (which is also REALID compliant) was one of the first DHS-approved IDs from way back in 2005 . Ari Jeuls et al (see below) found a number of vulns including remote cloning and remote disablement, publishing their findings a few years after the launch.

I talked to WA DOL Privacy Officer about it a couple years ago, and found that the tech platform had remained unchanged. WA maintains the printed material and DHS maintains the RFID package which is over 20 years old now .

Think of other 20 year old tech and how safe you feel having that in your wallet.

https://www.arijuels.com/wp-content/uploads/2013/09/KJKB09.p...

Edit: clarified Enhanced ID because there are differences in the program

mothballed•2h ago
Enhanced ID allows border crossing for most cases covered by the passport card, while real ID does not, for reasons that are unclear to me.
tonymet•2h ago
My understanding is that you can be RealID compliant without checking for citizenship. And in theory RealID doesn’t have to have RFID in the chip. Enhanced ID has to have both of those requirements.
lxgr•1h ago
Nice overview, although it seems to be missing one of the most important changes from AA to CA: AA uses signatures for challenge/responses, which are by definition non-repudiable.

This means that any second party with access to your passport can prove to any (unaffiliated/untrusted) third party that they had access to your passport and can even include something like a cryptographic timestamp to prove that they did so at a given point in time.

There were even some experimental schemes explicitly making use of ICAO biometric passports as a "proof of personhood", as far as I remember, but given that the ICAO scheme does not have any notion of document holder consent (e.g. via a PIN or other means of authentication), there are also significant privacy and security problems.

CA intentionally avoids all of that, since the risk of entities using ICAO passports as unintentional and insecure digital signature tokens was apparently deemed too high.

Ford X-100: A Futuristic 1950s Concept Car

https://spectrum.ieee.org/ford-x-100-concept-car
1•rbanffy•2m ago•0 comments

A Beautiful App Gallery for Self-Hosters

https://github.com/deyaa1251/HostMonk/blob/main/README.md
1•oss-terminator•2m ago•0 comments

We Deleted Tokio from Our Payment System and Cut Cloud Costs by $127,000

https://medium.com/@the_atomic_architect/we-deleted-tokio-from-our-payment-system-and-cut-cloud-c...
2•codewiz•2m ago•1 comments

The PicoGUS, a Modern ISA Sound Card

https://brainbaking.com/post/2025/01/the-picogus-isa-soundcard/
1•ecliptik•5m ago•0 comments

Chain-of-Thought Hijacking

https://arxiv.org/abs/2510.26418
1•belter•8m ago•0 comments

Taking steps to end abusive traffic from cloud providers

https://anubis.techaro.lol:443/blog/2025/file-abuse-reports/
1•mkeeter•8m ago•0 comments

ESPN, ABC cut off for millions as Disney channels go dark on YouTube TV

https://www.axios.com/2025/10/31/disney-youtube-tv-blackout-espn
1•mikhael•8m ago•0 comments

A Computing Legend Speaks, a New Oral History with Ken Thompson

https://computerhistory.org/blog/a-computing-legend-speaks/
1•oldnetguy•9m ago•0 comments

I Write HTTP Servers

https://blainsmith.com/articles/how-i-write-http-servers/
1•speckx•13m ago•0 comments

Install PostgreSQL 18 on Ubuntu 25.10

https://www.paulox.net/2025/10/31/install-postgresql-18-on-ubuntu-25-10-questing-quokka/
1•pauloxnet•13m ago•0 comments

Show HN: Buy/Sell Electric Vehicles

https://evmarketplace.online/
1•deanandreakis•15m ago•0 comments

The Pretense of Political Debate

https://nautil.us/the-pretense-of-political-debate-1244993/
2•rbanffy•15m ago•0 comments

Postgres Conference 2026: Call for papers

https://postgresconf.org/
5•linuxhiker•16m ago•1 comments

Premium Butter Sales Surge Even as US Shoppers Cut Back Elsewhere

https://www.bloomberg.com/news/features/2025-09-30/premium-butter-sales-surge-even-as-us-shoppers...
1•gwintrob•17m ago•0 comments

OpenAI thought to be preparing for $1T stock market float

https://www.theguardian.com/technology/2025/oct/30/openai-1tn-stock-market-float-ipo
4•pseudolus•17m ago•0 comments

BGP zombies and excessive path hunting

https://blog.cloudflare.com/going-bgp-zombie-hunting/
2•emot•18m ago•0 comments

Design Teams Are Reacting to 10x Developer Productivity from AI

https://www.lukew.com/ff/entry.asp?2133
2•speckx•22m ago•1 comments

Beyond IP lists: a registry format for bots and agents

https://blog.cloudflare.com/agent-registry/
1•kwar13•22m ago•0 comments

The Hunger Games Begin

https://paulkrugman.substack.com/p/the-hunger-games-begin
4•throw0101a•23m ago•2 comments

Timeline of the most recent ChatGPT updates

https://techcrunch.com/2025/10/31/chatgpt-everything-to-know-about-the-ai-chatbot/
1•andrewstetsenko•23m ago•0 comments

Liberalism, Isis, and Toaster Nationalism

https://www.richardhanania.com/p/liberalism-isis-and-toaster-nationalism
1•paulpauper•23m ago•0 comments

Upgrading PostgreSQL and Citus for Enhanced Database Functionality

https://www.commandprompt.com/blog/upgrading-postgresql-and-citus-for-enhanced-database-functiona...
1•linuxhiker•23m ago•1 comments

Install PostgreSQL 18 on Ubuntu 25.10

https://www.paulox.net/2025/10/21/install-postgresql-18-on-ubuntu-25-10-questing-quokka/
2•todsacerdoti•24m ago•0 comments

Show HN: rstructor, Pydantic+instructor for Rust

https://github.com/clifton/rstructor
1•cliftonk•26m ago•0 comments

Pickleball popularity surge serves up spike in serious eye injuries

https://medicalxpress.com/news/2025-10-pickleball-popularity-surge-spike-eye.html
3•PaulHoule•27m ago•0 comments

Postmark

https://en.wikipedia.org/wiki/Postmark
1•tosh•27m ago•0 comments

Show HN: Flat Fee MVPs for 1000 dollars

1•hpen•27m ago•0 comments

Compare Video Models

https://twitter.com/shridharathi/status/1984315089265029628
4•johnsillings•28m ago•0 comments

Project Goals for 2025H2

https://blog.rust-lang.org/2025/10/28/project-goals-2025h2/
1•todsacerdoti•29m ago•0 comments

Show HN: Sebastian.run – Build mobile apps from prompts using AI

https://sebastian.run/
1•HansP958•30m ago•1 comments