Skip to content

Instantly share code, notes, and snippets.

@mizdra
Created July 19, 2026 14:35
Show Gist options
  • Select an option

  • Save mizdra/01121b71b5bdd932a4c4d68db7b1c295 to your computer and use it in GitHub Desktop.

Select an option

Save mizdra/01121b71b5bdd932a4c4d68db7b1c295 to your computer and use it in GitHub Desktop.
検証報告書: sc_auth create-ctk-identity の初出 macOS バージョン (macOS 14.0 Sonoma)

検証報告書: sc_auth create-ctk-identity の初出 macOS バージョン

  • 検証日: 2026-07-19
  • 検証者: Claude Code (計画書「sc_auth create-ctk-identity の初出 macOS バージョン特定」に基づく)
  • 検証環境: Apple Silicon Mac (arm64) / ホスト macOS 26.5.2 (25F84) / tart 2.32.1 / ipsw 3.1.704

1. 結論

sc_auth create-ctk-identity は macOS 14.0 Sonoma (build 23A344, 2023-09-26 リリース) で導入された。

  • 確度: 高。以下の 3 点の実測により、「macOS 13 Ventura の最終ポイントリリースに存在せず、macOS 14.0 GA に存在する」ことを確認した。
    1. macOS 13.7.4 (22H420) VM: usage・man・スクリプト本体のいずれにも存在しない(実行すると「illegal option」で拒否)
    2. macOS 14.8.7 (23J520) VM: usage・man に存在し、実際に鍵作成に成功
    3. macOS 14.0 GA (23A344) IPSW から抽出した /usr/sbin/sc_auth: 実装が存在(14.8.7 のものとバイト単位で完全一致)
  • 推定を含む部分: 「13.0〜13.6 のどのバージョンにも無かった」ことは、13.7.4 に無いという実測からの推定(Apple のポイントリリースは機能を後退させないという前提)。なお 13.7.4 (2025 年リリース) は 14.0 GA より後に出た Ventura のセキュリティ更新であり、そこにすら backport されていないことから、13.x 系列に本機能が入ったことは無いと判断できる。
  • Monterey (12.x) の検証は計画書の規定(Ventura 最新に無ければ省略可)により省略した。

補足の発見

  • /usr/sbin/sc_auth は検証した全バージョン (13.7.4 / 14.0 / 14.8.7) で bash スクリプトであり、コンパイル済みバイナリではない。このため判定は strings ではなく grep で行った(計画書の注意点どおり)。
  • 14.0 で スクリプトが 9,207 bytes → 13,691 bytes に拡張され、CTK identity 系サブコマンド一式 (create-ctk-identity / delete-ctk-identity / delete-all-ctk-identities / list-ctk-identities / import-ctk-identities / export-ctk-identity / create-ctk-csr / import-ctk-certificate) が同時に追加された。
  • 14.0 GA と 14.8.7 の sc_auth は SHA-256 が一致(Sonoma の全ポイントリリースを通じて無変更)。よって Sonoma 系列内での二分探索は不要。
  • Ventura 版スクリプト内の "ctk" 該当 7 行はすべて CryptoTokenKit.framework/ctkbind.app (ペアリング用ヘルパー) の呼び出しであり、identity 作成機能とは無関係。

2. 判定表

macOS バージョン usage に create-ctk-identity man に記載 実行可否 証拠(ログパス)
12.x (Monterey 最新) 未検証(省略) 未検証(省略) 計画書 Phase 2 の規定により省略: Ventura 最新に無いため
13.7.4 (Ventura 最新, 22H420) 無し 無し (man 内 0 件/118 行) 不可 (illegal option -- l, exit=2) logs/ventura-sc_auth-usage.txt, logs/ventura-man-sc_auth.txt, logs/ventura-create-test.txt, logs/ventura-grep-ctk.txt
14.0 GA (Sonoma 初期, 23A344) 有り (スクリプト内 6 箇所、関数定義 L325) 未検証(IPSW からは sc_auth のみ抽出) 未実施(バイナリ判定のみ) logs/ipsw-14.0-result.txt, artifacts/ipsw-14.0/23A344__MacOS/usr/sbin/sc_auth
14.8.7 (Sonoma 最新, 23J520) 有り 有り (man 内 2 件) (鍵作成成功) logs/sonoma-sc_auth-usage.txt, logs/sonoma-man-sc_auth.txt, logs/sonoma-create-test.txt

3. 証拠の引用

3.1 Ventura 13.7.4 — 存在しない

logs/ventura-sw_vers.txt:

ProductVersion:		13.7.4
BuildVersion:		22H420

logs/ventura-sc_auth-usage.txt — usage は filevault サブコマンドまでで、CTK 系サブコマンドが一切無い。

logs/ventura-create-test.txt — 実行すると getopts が -l を不正オプションとして拒否(サブコマンド自体を認識しない):

/usr/sbin/sc_auth: illegal option -- l
Usage:
    sc_auth pair [-v] -u user -h hash # ...
exit=2

logs/ventura-grep-ctk.txt — スクリプト内の文字列判定(大文字小文字無視の "ctk" は 7 件、create-ctk-identity は 0 件):

7
---
0

3.2 Sonoma 14.8.7 — 存在し、動作する

logs/sonoma-sw_vers.txt:

ProductVersion:		14.8.7
BuildVersion:		23J520

logs/sonoma-sc_auth-usage.txt (11 行目):

sc_auth create-ctk-identity -l label -k p-256|p-384|p-521|p-256-ne|p-384-ne [-t bio|none] [-N CN] [-E emailAddress] [-U OU] [-O O] [-L L] [-S ST] [-C C]

logs/sonoma-create-test.txt — 仮想 Secure Enclave 上で p-256-ne 鍵の作成に成功:

exit=0
Key Type Public Key Hash                          Prot Label Common Name Email Address Valid To         Valid
p-256-ne 7572F79C923A66899146CE6B7A022A7C58716C74 none probe probe                     7/19/27, 2:08 PM YES

3.3 macOS 14.0 GA (23A344) — 導入バージョン

logs/ipsw-14.0-result.txt — IPSW から抽出した /usr/sbin/sc_auth に完全実装が存在:

artifacts/ipsw-14.0/23A344__MacOS/usr/sbin/sc_auth: Bourne-Again shell script text executable, ASCII text
--- create-ctk-identity count ---
6
--- usage 行 ---
45:    $(basename $0) create-ctk-identity -l label -k p-256|p-384|p-521|p-256-ne|p-384-ne [-t bio|none] ...
72:  create-ctk-identity) opts=l:k:t:N:E:U:O:L:S:C:;;
325:create-ctk-identity() {

logs/artifacts-sha256.txt — 14.0 GA と 14.8.7 のスクリプトは同一:

2ef46adbcb32347e4d2a22728d5f9550cec069049211c08351f447a247129d39  artifacts/sc_auth-ventura-13.7.4
aad0a6ca3ef458128eb241d3ed0b9994de84a8a6660f86d814f570d035ded5b4  artifacts/sc_auth-sonoma-14.8.7
aad0a6ca3ef458128eb241d3ed0b9994de84a8a6660f86d814f570d035ded5b4  artifacts/ipsw-14.0/23A344__MacOS/usr/sbin/sc_auth

3.4 ホストのベースライン

ホスト macOS 26.5.2 でも usage に存在(logs/host-sc_auth-usage.txt)。現行 OS まで継続して提供されている。

4. man ページ初出との関係についての考察

  • man ページへの create-ctk-identity 追加は Xcode 15.0 beta 1 (15A5160n, 2023-06-05, WWDC23) 同梱の man ページで初出(keith/xcode-man-pages の blame による既知事実)。これは macOS 14 Sonoma beta 1 と同一サイクル。
  • 今回の実測で、実装の初出も macOS 14.0 であることが確認できた。つまり**「機能がポイントリリースで先行し man が後追いした」パターンではなく、機能と man が同じメジャーリリース (Sonoma) で同時に出た**ケースである。
  • 14.0 GA と 14.8.7 でスクリプトが無変更であることも、この機能が 14.0 時点で完成形として出荷されたことを裏付ける。

5. 再現手順の要約

  1. ツール導入: brew install cirruslabs/cli/tart blacktop/tap/ipsw esolitos/ipa/sshpass(Homebrew 6 では事前に brew trust <tap> が必要)
  2. Ventura 検証: tart clone ghcr.io/cirruslabs/macos-ventura-base:latest ventura && tart run --no-graphics ventura & SSH (admin/admin) 可能になるまで数分待ち、sc_auth 2>&1man sc_authgrep -c create-ctk-identity /usr/sbin/sc_auth を実行。 ※初回起動直後は「No route to host」になる。ブート完了まで 5〜10 分程度リトライが必要。
  3. Sonoma 検証: 同様に macos-sonoma-base:latest で実施。動作確認は sc_auth create-ctk-identity -l probe -k p-256-ne -t none && sc_auth list-ctk-identities(VM 内のみで実行)。
  4. 14.0 GA バイナリ確認(フル IPSW ダウンロード不要):
    ipsw download ipsw --macos --device VirtualMac2,1 --version 14.0 --urls   # URL 取得
    ipsw extract --files --pattern 'usr/sbin/sc_auth$' --remote <上記URL> -o out
    grep -c create-ctk-identity out/23A344__MacOS/usr/sbin/sc_auth
    HTTP レンジリクエストによるリモート部分抽出のため、所要は数分・転送量は数百 MB 程度。
  5. 後片付け: tart stop <vm> && tart delete <vm>tart prune で OCI キャッシュ削除。

6. 成果物

  • logs/ — 全証拠ログ(本報告書の引用元)
  • artifacts/sc_auth-ventura-13.7.4 — Ventura 13.7.4 の /usr/sbin/sc_auth(9,207 bytes)
  • artifacts/sc_auth-sonoma-14.8.7 — Sonoma 14.8.7 の /usr/sbin/sc_auth(13,691 bytes)
  • artifacts/ipsw-14.0/23A344__MacOS/usr/sbin/sc_auth — 14.0 GA の /usr/sbin/sc_auth(14.8.7 と同一)
  • VM・フル IPSW は保持していない(クリーンアップ済み)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment