用語集 — セキュリティ Glossary — Security

AES-GCM暗号化とは What is AES-GCM Encryption?

AES-GCM(Galois/Counter Mode)は、データの暗号化と改ざん検出を同時に行う認証付き暗号化方式です。Obsidian連携シンプルメモでは、オフライン時のOutboxストレージにAES-256-GCMを採用しています。TLS 1.3(現在のHTTPS通信)と同じ方式ファミリーです。 AES-GCM (Galois/Counter Mode) is an authenticated encryption algorithm that simultaneously encrypts data and detects tampering. Simple Memo uses AES-256-GCM for Outbox storage — the same cipher family that protects TLS 1.3 (modern HTTPS) traffic.

定義

AES-GCM(Advanced Encryption Standard - Galois/Counter Mode)は、NIST(米国国立標準技術研究所)が標準化した認証付き暗号化(AEAD: Authenticated Encryption with Associated Data)方式です。AESブロック暗号をCounter Modeで動作させてデータを暗号化し、同時にGalois Fieldの演算で認証タグを生成します。鍵長は128/192/256ビットから選択でき、AES-256-GCMは最高強度の256ビット鍵を使用します。TLS 1.3のデフォルト暗号スイートに採用されており、現在のインターネット通信の基盤技術です。

Definition

AES-GCM (Advanced Encryption Standard - Galois/Counter Mode) is an authenticated encryption with associated data (AEAD) scheme standardized by NIST. It runs the AES block cipher in Counter Mode for encryption while simultaneously computing an authentication tag using Galois Field arithmetic. Key lengths of 128, 192, or 256 bits are supported; AES-256-GCM uses the strongest 256-bit key. It is the default cipher suite in TLS 1.3 and forms the backbone of modern internet security.

AES-GCMの仕組み How AES-GCM Works

AES-GCMは「暗号化」と「認証」という2つの機能を1回の処理で実現します。従来の暗号化方式(AES-CBCなど)では、暗号化した後に別途HMAC等で改ざん検出を行う必要がありました。AES-GCMはこの2つを統合することで、高速かつ安全なデータ保護を実現しています。 AES-GCM achieves two functions in a single pass: encryption and authentication. Traditional encryption modes like AES-CBC require a separate HMAC step for tamper detection. AES-GCM integrates both, delivering fast and secure data protection.

Counter Mode(暗号化) Counter Mode (Encryption)
初期化ベクトル(IV/Nonce)とカウンターを組み合わせ、AESブロック暗号でキーストリームを生成。平文とXOR演算して暗号文を生成します。各ブロックが独立して処理できるため、並列処理に適しています。 Combines an initialization vector (IV/Nonce) with a counter to generate a keystream via AES block cipher. The plaintext is XORed with the keystream to produce ciphertext. Each block is processed independently, enabling parallel computation.
Galois認証(改ざん検出) Galois Authentication (Tamper Detection)
暗号文に対してGF(2^128)上の多項式演算を行い、128ビットの認証タグを生成します。復号時にタグを検証し、1ビットでもデータが変更されていれば即座に検出して復号を拒否します。 Performs polynomial arithmetic over GF(2^128) on the ciphertext to produce a 128-bit authentication tag. During decryption, the tag is verified; any change — even a single bit — is detected and decryption is rejected.
256ビット鍵の強度 256-bit Key Strength
AES-256の鍵空間は2^256(約1.16 x 10^77)通り。現在のスーパーコンピューターでも総当たりに数十億年かかります。量子コンピューターを考慮してもGroverのアルゴリズムで2^128相当の安全性が保たれます。 AES-256 has a key space of 2^256 (approximately 1.16 x 10^77) possibilities. Even modern supercomputers would need billions of years for brute force. Against quantum computers, Grover's algorithm still leaves 2^128 effective security.

AES-GCM・AES-CBC・ChaCha20-Poly1305の違い AES-GCM vs AES-CBC vs ChaCha20-Poly1305

「AES-CBCとGCMのどちらを使うべき?」という疑問への答えを比較表にまとめました。結論から言うと、新規設計では認証付き暗号(AEAD)であるAES-GCMまたはChaCha20-Poly1305を選ぶのが現在の定石で、AES-CBC単体を新たに採用する理由はほぼありません。 Wondering whether to use CBC or GCM? The short answer: for new designs, choose an authenticated cipher (AEAD) — AES-GCM or ChaCha20-Poly1305. There is rarely a reason to adopt bare AES-CBC today.

項目AES-GCMAES-CBCChaCha20-Poly1305
改ざん検出(認証)内蔵(AEAD)なし(別途HMACが必要)内蔵(AEAD)
並列処理可能(高速)暗号化側は不可可能
ハードウェア支援AES-NIで非常に高速AES-NIで高速専用命令なしでも高速(モバイル向き)
主な採用例TLS 1.3・HTTPS・SSH旧TLS・レガシーシステムTLS 1.3・WireGuard
既知の注意点nonce(IV)の再利用は致命的パディングオラクル攻撃の事例nonceの再利用は致命的
AspectAES-GCMAES-CBCChaCha20-Poly1305
Tamper detection (auth)Built in (AEAD)No (needs separate HMAC)Built in (AEAD)
ParallelizableYes (fast)Not for encryptionYes
Hardware accelerationVery fast with AES-NIFast with AES-NIFast even without special instructions (mobile-friendly)
Typical usageTLS 1.3, HTTPS, SSHLegacy TLS and systemsTLS 1.3, WireGuard
Known caveatNonce (IV) reuse is catastrophicHistory of padding-oracle attacksNonce reuse is catastrophic

補足:nonceの誤用リスクまで設計で吸収したい場合は、誤用耐性を持つ派生方式のAES-GCM-SIV(RFC 8452)もあります。 Note: if you need resilience against nonce misuse, the misuse-resistant variant AES-GCM-SIV (RFC 8452) exists for exactly that.

シンプルメモでのAES-GCM活用 AES-GCM in Simple Memo

Obsidian連携シンプルメモは、オフライン時にメモをデバイス上のOutbox(送信待ちキュー)に一時保存します。このOutboxに保存されるメモデータは、すべてAES-256-GCMで暗号化されます。暗号鍵はiOSのKeychain(Secure Enclaveバックアップ)に格納され、アプリ外からはアクセスできません。 Simple Memo temporarily stores memos in an on-device Outbox queue when offline. All memo data in the Outbox is encrypted with AES-256-GCM. The encryption key is stored in the iOS Keychain (backed by Secure Enclave) and cannot be accessed outside the app.

ネットワーク接続が回復すると、メモはCloudflare Workers経由でResend APIを通じて送信されます。送信完了後、Outboxのデータは即座に削除されます。つまり、サーバー上にメモが永続的に保存されることはなく、デバイス上の一時データもAES-256-GCMで保護されています。 When network connectivity is restored, memos are sent via Cloudflare Workers through the Resend API. After successful delivery, Outbox data is immediately deleted. This means memos are never permanently stored on any server, and temporary on-device data is always AES-256-GCM protected.

実例:オフラインメモの暗号化フロー Example: Offline Memo Encryption Flow

シナリオ

地下鉄の車内でアイデアを思いつき、シンプルメモに入力。送信ボタンをタップするが、地下で電波が届かない。

1. アプリはメモのテキストをAES-256-GCMで暗号化

2. 暗号化されたデータをOutboxキューに保存(平文はメモリから即破棄)

3. 地上に出てWi-Fiに接続 → Outboxから暗号文を取り出し、復号してAPIに送信

4. 送信成功を確認 → Outboxの暗号化データを完全削除

このプロセスはユーザーには完全に透過的で、意識する必要はありません。

Scenario

You have an idea on the subway, type it into Simple Memo, and tap send — but there is no signal underground.

1. The app encrypts the memo text with AES-256-GCM

2. Encrypted data is saved to the Outbox queue (plaintext is immediately discarded from memory)

3. You emerge above ground and connect to Wi-Fi — the encrypted data is retrieved from Outbox, decrypted, and sent via API

4. Delivery confirmed — encrypted Outbox data is permanently deleted

This entire process is completely transparent to the user — no action required.

よくある質問(AES-GCM暗号化) FAQ: AES-GCM Encryption

AES-GCMとは何ですか?

AES-GCM(Advanced Encryption Standard - Galois/Counter Mode)は、データの暗号化と認証を同時に行う暗号化方式です。暗号化によりデータを読めなくし、認証タグにより改ざんを検出します。米国政府の機密情報保護にも採用されている信頼性の高い方式です。

AES-GCMとAES-CBCの違いは何ですか?

AES-CBCは暗号化のみを行い、データの改ざん検出は別途MACなどが必要です。AES-GCMは暗号化と認証を一体化(AEAD)しており、より高速で安全です。また、GCMはパラレル処理が可能で、CBCより高いパフォーマンスを発揮します。

シンプルメモはどのようにAES-GCMを使っていますか?

オフライン時にデバイス上のOutbox(送信待ちキュー)にメモを保存する際、AES-256-GCMで暗号化します。暗号鍵はデバイスのKeychain/Secure Enclaveに保管され、サーバーには送信されません。デバイスを紛失してもメモ内容は保護されます。

What is AES-GCM encryption?

AES-GCM (Advanced Encryption Standard - Galois/Counter Mode) is an authenticated encryption algorithm that provides both data confidentiality and integrity verification. It encrypts data so it cannot be read, and generates an authentication tag that detects any tampering. It is used by the U.S. government and is a standard in TLS 1.3.

How does Simple Memo use AES-GCM?

Simple Memo uses AES-256-GCM to encrypt memos stored in the on-device Outbox when offline. The encryption key is stored in the device's Keychain/Secure Enclave and never transmitted to any server. This ensures memos remain protected even if the device is lost or stolen.

Is AES-256-GCM safe enough for sensitive notes?

Yes. AES-256-GCM is approved for Top Secret classification by the U.S. NSA. It would take billions of years to brute-force a 256-bit key with current technology. Combined with Simple Memo's on-device key storage, your offline memos are protected at the highest commercially available level.

参考文献・外部リンク

References

AES-256-GCMで守られたメモ体験 Memo Experience Protected by AES-256-GCM
Obsidian連携シンプルメモは暗号化を意識させません。書いて送るだけで、裏側ではAES-256-GCMがメモを守ります。ダウンロードは無料。 Simple Memo makes encryption invisible. Just write and send — AES-256-GCM protects your memos behind the scenes. Free to download.
App Store からダウンロード Download on the App Store

関連ページ Related Pages