エンジニアの人には、Nostr のアカウントは SSH 公開鍵認証と同じで、NIP-07 は ssh-agent みたいなもの。で大体済むような気がする。
S. Ota
_@susumuota.github.io
npub1susu...0yu8
A programmer. An author of nostr-keyx. Interests: Reinforcement Learning, Natural Language Processing and Artificial General Intelligence.
Twitter のセキュリティキー認証が FIDO U2F を使っていて、その FIDO U2F による2要素認証の情報が、 ykman で調べてもどこにも保存されていないのが気になって調べてみた結果、どこにも保存されていないことが判明。
個々の YubuKey デバイス固有の鍵が製造時にオンチップで生成されていて、その鍵と入力を合わせて決定論的に鍵ペアを生成して、必要になった時に同じ鍵ペアを生成できるようにしているらしい。
https://www.reddit.com/r/yubikey/comments/10onj2k/i_have_my_keys_added_as_security_keys_on_many/
なお FIDO2 (WebAuthn, パスキー認証) はまた別で、YubiKey 内部のストレージに秘密鍵を保存していて、以下コマンドで確認可能。
ykman fido credentials list

Yubico
Yubico’s Take on U2F Key Wrapping
How does Yubico’s implementation of U2F support any number of services with unique key pairs when we have limited storage?
今こんな感じです。


出来た!


Nostr のイベントは明日の夜からか。
コスタリカの朝9時は日本の夜12時。
https://iris.to/nostrica.com

nostrica
a nostr unconference
YubiKey の設定方法を書きました。
とりあえず、SSH の公開鍵認証と GitHub コミットの署名まで。
- Generate gpg keys
- Backup the keys
- Use YubiKey for SSH
- Use YubiKey for signing GitHub commits
- Use YubiKey for 2 Factor Authentication (2FA) (e.g. Google, Amazon, Twitter, etc.) (WIP)
- Use YubiKey for Passkey Authentication (Yahoo! JAPAN) (WIP)
- Use YubiKey for Nostr (WIP)

GitHub
GitHub - susumuota/yubikey-setup: YubiKey setup memo
YubiKey setup memo. Contribute to susumuota/yubikey-setup development by creating an account on GitHub.
Bluesky で投稿の検索が出来るようになってる!
https://search.bsky.social/search/posts?q=nostr
Bluesky Social
Bluesky
GPG の鍵を RSA 4096 bit から楕円曲線に変えようと思って調べた。結論: Ed25519 で良さそう。
Guidance for Choosing an Elliptic Curve Signature Algorithm in 2022 - Dhole Moments
A cartoon wild canid on the Internet provides general guidance on elliptic curve cryptography parameter choices.
ESP32 で Nostr の署名(schnorr_sign) が 64 msec, 検証(schnorr_verify)が 128 msec だった。これは普通に使えそう。

GitHub
GitHub - micro-bitcoin/uBitcoin: Bitcoin library for microcontrollers. Supports Arduino, mbed, bare metal.
Bitcoin library for microcontrollers. Supports Arduino, mbed, bare metal. - micro-bitcoin/uBitcoin
Nostr 署名デバイスやってる人いた。 ESP32 で出来るみたい。果たして何秒くらいで署名できるのかな。
Web Serial API でブラウザからシリアルポートにアクセス出来るらしい。何でもアリだな Chrome。
GitHub
GitHub - lnbits/nostr-signing-device: Signing device for Nostr
Signing device for Nostr. Contribute to lnbits/nostr-signing-device development by creating an account on GitHub.
GitHub
GitHub - lnbits/horse: hardware remote nostr event signer with webserial
hardware remote nostr event signer with webserial. Contribute to lnbits/horse development by creating an account on GitHub.
Web Serial API - Web APIs | MDN
The Web Serial API provides a way for websites to read from and write to serial devices. These devices may be connected via a serial port, or be US...
Iris 、コンソール開いて `localStorage.clear()` してタブを立ち上げ直すとしばらく回復するけど、そのうちまたおかしくなる。
bech32 の 32 は
10 + 26 - 4 = 32
数字 + アルファベット - 紛らわしいアルファベット = 32
なので大文字は NG (32じゃなくなってしまう)。表記の際にデバイスの都合で大文字で書いてもいいけど encode / decode の計算のときは小文字必須。と理解してます。
BIP-32 で 256 bits が勧告されているのはここです。
> Generate a seed byte sequence S of a chosen length (between 128 and 512 bits; 256 bits is advised) from a (P)RNG.

GitHub
bips/bip-0032.mediawiki at master · bitcoin/bips
Bitcoin Improvement Proposals. Contribute to bitcoin/bips development by creating an account on GitHub.
また nostr-tools か...
確定申告を郵送する時に、局員の人がやたらレターパックを推してくるので怪しんでしまった。レターパック=詐欺のイメージが刷り込まれ過ぎている...
Ingress 懐かしい。自分もレジスタンスでした。2014 年頃か。過去に訪れたポータルを Google Maps で保存する Web アプリを作ってました。
NIP-06 とは関係なしに、BIP-39 に従って Nostr 秘密鍵と1対1に対応するニーモニックを作成するスクリプト。

GitHub
nostr-keyx/bin/npub2hex.ts at main · susumuota/nostr-keyx
A NIP-07 browser extension that uses the OS's keychain or YubiKey to protect your private keys. - susumuota/nostr-keyx

NIP-06 は、最初にエントロピー(=ニーモニック)を生成してから Nostr 秘密鍵を**導出**する構造になっているので、既に秘密鍵を持っている人は、その秘密鍵を NIP-06のニーモニックに変換することは出来ない。
が、NIP-06とは関係なしに、BIP-39 に従って Nostr 秘密鍵と1対1に対応するニーモニックは作成可能で、これを紙に書き写すという手はあります。(NIP-06 と混同しないように注意)
Snort の markdown がひどい...