在私は個人事業主として割とのんびりと生きておりますが、昔は暗号通信やデジタル認証を専門としたIT技術者として、バリバリの企業戦士をしておりました。だからという訳ではないのですけれども、最近の「パスワード方式からパスキー方式への移行トレンド」を正確に説明するサイトやメディアがほとんどない事に、大いなる懸念と不満を抱いております。そればかりか、巷には嘘の説明やデタラメな解説が溢れていて、こうした事実を、元専門職として到底看過出来ないのであります。
These days I live rather leisurely as a sole proprietor, but in the past,
I was a hard-working corporate warrior specializing in cryptographic communications
and digital authentication as an IT engineer. It’s not just because of
that, but I feel great concern and dissatisfaction that there are almost
no websites or media outlets accurately explaining the recent trend of
transitioning from password-based methods to passkey-based methods. On
top of that, false explanations and nonsense abound in public discourse,
and as a former professional, I simply cannot overlook this reality.
「パスキーってパスワードの代わりに、指紋とかフェイスIDとかの生体認証に変えただけの事でしょ?」と思っていらっしゃる方も多いのではないでしょうか。いいえ、違います。セキュリティは使用者本人がその仕組みを理解していないと、盗用などのトラブルの確率が上がってしまいます。今回はちょっと真面目に、正確に、でもなるたけ平易な言葉で、説明をしていこうと思います。
Many people might think, “Passkeys just mean replacing passwords with biometric
authentication like fingerprints or Face ID, right?” But that’s not true. If users don’t understand the system, the probability of misuse or theft
increases. So today, I’d like to explain the situation seriously, accurately,
and as simply as possible.
まずは順を追って、パスワード方式から説明していきましょう。ユーザ登録の際に、ユーザIDとパスワードを決め、それをサーバ側に格納しておき、ログオン時にはユーザIDとパスワードを入力させ、それがサーバ側に格納されている情報と一致したら正規のユーザと見なす方式です。コンピュータの黎明期にはほとんどがこの方式でしたが、サーバ側のスタッフに悪意を持った者が居ると、ユーザIDとパスワードの組を一気に抜かれて、闇サイト等で売却される可能性がありました。お金さえ出せば、闇サイトで情報を購入して、誰かに成り済ましてアカウントを乗っ取る事が出来てしまっていた訳です。
Let’s start with password-based authentication. When a user registers,
they set a user ID and password, which are stored on the server. At login,
the user enters both, and if they match the information stored on the server,
the user is authenticated. This method was the standard during the early
days of computing. However, if malicious staff exist on the server side,
they could steal all the user ID and password combinations and sell them
on black market sites. If you have money, you could buy such information
and hijack someone’s account.
こうした内部の者の犯行による情報の大量流出事件の頻発を受けて、サーバ側にパスワードそのものを格納せず、パスワードから生成されたハッシュ値を格納しておく方式が主流になりました。ある暗号化関数を想像してみて下さい。この関数に例えば「ABCD」と入力すると全く別の「4R#hds5B」という文字列に変換出来るとします。この関数は適当に文字列を出すのではなく、「ABCD」と入れれば必ずいつでも「4R#hds5B」と値を返します。あるロジックに従って文字列を変換しているのです。入力する値を変えると出力される値も変わります。これがハッシュ関数です。ハッシュ関数の内部ロジックは一般的には秘密にされていて、例えばハッシュ値「4R#hds5B」から元の値「ABCD」に戻す事は非常に困難になるよう設計されています。
Due to a spate of data leaks caused by insider threats, it became standard
to store not the password itself, but a hash value generated from the password.
Imagine an encryption function: if you input “ABCD,” it outputs something
like “4R#hds5B.” The function always returns the same result for the same
input. The inner workings are typically confidential, and it’s very difficult
to reverse-engineer the original value from the hash. This is a hash function.
ユーザからのパスワードの入力があったら、それをハッシュ関数に掛けてハッシュ値を得、それをサーバに格納されていたハッシュ値と比較します。一致すれば正しいパスワードが入力されたと判断できますから、正規のユーザからのアクセスと見なす方式です。
When a user enters their password, it is hashed and compared to the stored
hash value. If it matches, the system authenticates the user. Since the
password is never stored, even if an internal leak occurs, it’s difficult
to recover the original passwords. This method was revolutionary in reducing
insider threats.
ハッシュ値は盗まれてもパスワードに戻す事は出来ませんので、内部の者の犯行による情報の大量流出事件は、これにより激減しました。パスワードをサーバから盗まれないようにするのではなく、パスワードをサーバに置かないでユーザにだけ管理させるハッシュ値方式は、当時は画期的な方法だったと申せましょう。
Since hashed values cannot be reversed into the original password even
if stolen, the number of large-scale data breaches caused by insider attacks
was significantly reduced. Rather than trying to protect passwords from
being stolen from the server, the idea of not storing passwords on the
server at all, and instead having users manage only hashed values, was
a groundbreaking approach at the time.
しかし、ユーザ側でのパスワードの使い回しや、フィッシングサイトに誘導されて騙されてユーザIDとパスワードを入力してしまう事による、個人的なパスワード漏洩や、それに起因するアカウント乗っ取りは一向になくなりません。最近発生した某ネット証券会社のアカウント乗っ取り事件は、まだ記憶に新しいでしょう。
However, password reuse by users and phishing attacks where users are tricked
into entering their credentials on fake websites continue to cause password
leaks and account hijacking. The recent incident involving a compromised
account at a certain online securities company is still fresh in our minds.
さてここで一旦別の話題に触れてみます。現代の暗号やデジタル認証を支える中心的な技術について、その概要を知っておく必要があるでしょう。という訳で、一般にRSA方式と呼ばれる公開鍵・秘密鍵方式暗号について簡単に説明してみます。
Let’s shift topics briefly. To understand modern encryption and digital
authentication, it's important to know the basics of the core technologies
involved. One such technology is the RSA encryption system, commonly referred
to as a public key/private key encryption method.
例えば家の鍵(キー)は、鍵(ロック)を掛ける事も、鍵(ロック)を解除する事も出来ますよね。RSA方式はこれを数学的な工夫を凝らして、「ロックしか出来ない鍵(キー)」と「解錠しか出来ない鍵(キー)」を一つのドア鍵(ロック)に用意したモノだと考えて下さい。これには因数分解が非常に難しい巨大な素数積や、大きさの概念のない法数という考え方(数直線が円形)が使われているのですが、その原理についての細かい説明は、ある程度の数学的知識を必要とする為、別の機会に譲るとしましょう。今は、「ロックしか出来ない鍵(キー)」と「解錠しか出来ない鍵(キー)」を一つのドア鍵(ロック)に用意した事だけを考えてみて下さい。
For example, think of a physical key?it can both lock and unlock a door.
The RSA method, through clever mathematical constructs, creates a pair
of keys: one that can only lock and one that can only unlock the same door.
This system uses concepts such as the product of very large prime numbers,
and modular arithmetic where size has no meaning (like wrapping a number
line into a circle). The detailed explanation of its mechanism requires
mathematical knowledge, so for now, let’s just focus on the idea of having
one key that only locks and another that only unlocks.
一組の「ロックしか出来ない鍵(キー)」と「解錠しか出来ない鍵(キー)」を作り、ユーザの端末(例えばスマホ)には「解錠しか出来ない鍵(キー)」を、サーバには「ロックしか出来ない鍵(キー)」をインストールします。サーバに対してユーザからログオン要求があったら、サーバは長大でランダムなデータを作って、それを「ロックしか出来ない鍵(キー)」を使って暗号化し、ユーザに送ります。
A pair of such keys is generated: the unlocking key (private key) is stored
on the user’s device (like a smartphone), and the locking key (public key)
is stored on the server. When the user requests login, the server generates
a long, random string of data and encrypts it using the locking key, then
sends it to the user.
この暗号化を解けるのは「解錠しか出来ない鍵(キー)」を持つ正規のユーザだけの筈です。成り済ましたユーザはこの暗号を解く事が出来ません。しかし正規のユーザは「解錠しか出来ない鍵(キー)」を持っていますので、これを解いて、サーバが作った長大でランダムなデータを得る事が出来ます。ユーザがこの長大なランダムなデータをサーバに送付して、サーバ側で作ったモノと一致すれば、正規のユーザとして認証される訳です。一般的には、サーバが持つ「ロックしか出来ない鍵(キー)」を公開鍵、ユーザの端末が持つ「解錠しか出来ない鍵(キー)」を秘密鍵と呼びます。
Only the legitimate user with the unlocking key can decrypt this encrypted
data. An impersonator cannot decode it. But the real user, who has the
unlocking key, can decode it and retrieve the original random data generated
by the server. If the user sends this data back to the server and it matches
what the server initially generated, the user is authenticated. Typically,
the server’s locking key is called the public key, and the user’s unlocking
key is called the private key.
この方式を用いれば、パスワードという概念から離れる事が出来るという訳です。「サーバが作った長大なランダムなデータ」をパスキーと呼びます。
This method allows us to break free from the concept of passwords. The
“long, random data generated by the server” is what we call a passkey.
簡単にまとめますと、ユーザからのログオン要求を受けて、サーバはパスキーを生成しそれを当該ユーザの公開鍵で暗号化してユーザに送付します。ユーザの端末では受け取った暗号化データを当該ユーザの秘密鍵で復号化しパスキーを得、それをサーバに送り返す事で認証して貰うのです。
To summarize simply: when a user requests to log in, the server generates
a passkey, encrypts it with the user’s public key, and sends it to the
user. The user’s device decrypts it using the private key, retrieves the
passkey, and sends it back to the server for authentication.
ここで鋭い皆さんはお気付きになられたかも知れませんね。「パスキーの話に、生体認証の話題が全く出てこないじゃん」と。そうなのです。一部報道では「パスキー方式=生体認証」のような誤った誘導がなされています。しかしパスキー方式はあくまで公開鍵・秘密鍵方式暗号を用いたデジタル認証がその中心的な技術で、生体認証は付随的な仕掛けでしかないのです。
Some of you may have noticed: “Hey, there’s no mention of biometrics in
this whole explanation of passkeys.” Exactly. Some media reports misleadingly
equate passkeys with biometric authentication. But in reality, the core
of passkey authentication is digital verification using public-key cryptography;
biometric data is merely a supplementary mechanism.
パスキー方式はパスワードを扱う必要がない代わりに、端末機(例えばスマホ)を落としてしまうと、誰でも正規のユーザとして成り済ましが可能になってしまうというデメリットがあります。そこで、スマホを落としたとしても第三者が簡単にスマホを使えないように、生体認証を併用しているという訳です。
One downside of passkeys is that if a device (such as a smartphone) is
lost, anyone who picks it up could potentially impersonate the user. That’s
why biometric authentication is used?to ensure that even if the device
is lost, unauthorized users can’t easily gain access.
先日、某銀行が「今後はキャッシュカードを使わずに指紋だけでATMから口座操作出来るようにする」と高らかにアナウンスしておりましたけれども、こうした馬鹿げた低セキュリティの仕掛けと、パスキーを使った高セキュリティなプロダクトとは、全くレベルの違うモノである事を認識する必要があります。例えばクレジットカードの情報が漏洩して不正に使われてしまった場合、クレジットカードを全く新しい番号のモノと交換して、古いカードを使用不能にしますよね。しかし指紋データを元にして作ったハッシュ値が漏洩した場合、指を取り替える事など出来ません。ハッシュ値を含むログオン用のデータが絶対に盗まれないという前提で作られたシステムなど、セキュリティの観点から見ればクズ同然と云えるのです。
Recently, a certain bank proudly announced, “From now on, you’ll be able
to use ATMs with just your fingerprint, without needing your cash card.”
But we must understand that such a foolish, low-security scheme is worlds
apart from the high-security nature of passkey systems. For example, if
your credit card information leaks, you can simply get a new card with
a different number. But if the hash of your fingerprint data is leaked,
you can’t just replace your finger. Systems built on the assumption that
login data containing hash values will never be stolen are, from a security
perspective, practically worthless.
その点、パスキー方式では、サーバには公開鍵(ロックしか出来ない鍵)しかありませんから、もし仮にこれが外部に漏れたとして、更にフィッシングサイトに同様の認証の仕組みを組み込まれたと仮定しても、相手が秘密鍵を持つ正規のユーザである事が判明するだけで、秘密鍵を入手する事は不能ですし、ましてや成り済ましをする事など一切出来ません。パスキー方式では、根本的に盗まれて困るデータが、サーバ上にも、通信経路上にも、一切存在しないのです。唯一、端末機が盗まれた時のために生体認証を用いているに過ぎません。更に端末機紛失時に、遠隔で秘密鍵を消す仕掛けも用意されている事がほとんど。パスキー方式は旧来のパスワード方式とはレベルの違う、公開鍵・秘密鍵方式暗号を用いたデジタル認証技術に支えられているのです。
In contrast, with the passkey method, only the public key (which can only
lock) is stored on the server. So even if it’s leaked, and even if a phishing
site mimics the authentication system, the worst-case scenario is only
confirming that the user has the corresponding private key. No one can
obtain the private key itself, and impersonation is impossible. In fact,
there is no critical data?neither on the server nor in transit?that would
be damaging if stolen. Biometric authentication is used solely as a safeguard
in case the device is stolen. Most devices even have a remote wipe feature
for the private key. The passkey method is a fundamentally different and
far more secure authentication technology compared to the traditional password
method.
混同しやすいモノの中に、ショートメールを使った確認番号送付方式が挙げられましょう。ユーザがサーバにログインしようとIDとパスワードを入力します。IDとパスワードが一致したら、サーバはすぐにログインを許すのではなく、携帯電話に6桁程度の番号をショートメールで送ります。ユーザがこの番号をサイトに入力すると認証が完了する方式です。これをパスキー方式と誤認していらっしゃる方も多いと思いますが、1.パスワードを使っている、2.公開鍵・秘密鍵方式暗号を用いていない、訳ですから、これはパスキー方式とは明らかに異なります。実際はパスワード方式の派生でしかありません。実は、携帯電話にショートメールで確認番号を送る方式は既にSIMスワップと呼ばれる方法でクラックされてしまう事が分かっています。簡単にいうと携帯キャリアの窓口に行って「スマホを落としました」と云って新しい携帯を買うと、元々のSIMが無効化されて、新しく買ったスマホに電話番号が移されてしまうという、キャリアの運用を利用したハッキング方法が既に確立されているのです。
One common source of confusion is SMS-based verification codes. The user
enters their ID and password; if they match, the server sends a six-digit
code via SMS to their phone. Only after entering this code is the user
authenticated. Some may mistake this for the passkey method, but clearly
it is not?it still uses passwords and does not employ public-key cryptography.
It’s merely an extension of the password system. In fact, this SMS verification
method has already been cracked via a method called “SIM swap.” Simply
put, if someone claims they lost their phone at a carrier store, they can
get a new phone, which disables the old SIM and transfers the phone number
to the new device?a vulnerability that hackers now exploit.
一応ここで、マイナンバーカードについても考えてみましょう。まず4桁のパスワード方式を使っている時点で、これが第三者に漏れる可能性が出て参ります。ユーザはこのパスワードを誰にも漏れないように厳重に管理しなければなりません。しかも今どき4桁の数字とは。この時点で相当に遅れた仕組みである事が分かるでしょう。莫大な予算を掛けた割には、あまりにもしょぼいではありませんか。一応電子署名もインストールされていますが、この電子署名は当該マイナンバーカードが偽造品ではない事を証明するモノで、カードの使用者が正規のユーザである事を証明出来るモノではありません。その為には生体認証なり何なりの付随的な認証方式の追加は必須でありますからね。
Let’s also consider the Japanese My Number Card. It uses a 4-digit password,
which already poses a risk of leakage to third parties. Users must manage
this password very carefully. But in this day and age, a mere 4-digit code?
That shows how outdated the system is. Despite the massive budget, the
outcome is underwhelming. While the card includes a digital signature,
it only proves that the card itself is not counterfeit?it does not prove
that the cardholder is the legitimate user. Therefore, additional authentication
methods like biometrics are essential.
本日はパスキー方式の安全性の高さについて説明をさせて頂きました。利用しようとするサービスが、パスワード方式なのか、それともパスキー方式なのか、きちんと確かめてから利用するようにしましょう。某ネット証券会社のようにアカウントが乗っ取られてしまって大損したのでは、目も当てられませんからなぁ。という訳で、本日はご清聴有り難う御座いました〜。
Today, I’ve explained the strong security of the passkey system. Before
using any online service, make sure to check whether it uses a password
or passkey authentication. Getting your account hijacked like with a certain
online securities company would be devastating. Thank you very much for
reading.
【つづく】
「あれこれ」の目次に戻る