メイン コンテンツにスキップ
ソリューション

Capacitor アップデーターへの Code 署名による E2E 暗号化

__CAPGO_KEEP_1__ + AES 暗号を使用したアップデートの暗号化、企業向けおよび高セキュリティアプリ向けに設計

マーティン・ドナディュー

マーティン・ドナディュー

コンテンツマーケター

Capacitor アップデーターへの Code 署名による E2E 暗号化

Capacitor-updater 現在、code-updaterは、端末までのcode暗号化をサポートしています。Code署名により、エンドユーザーの端末で実行される更新プログラムが改ざんされていないことを確認し、Capacitor-updaterの標準的なWeb向けセキュリティの上位レベルの保護を提供します。

Capacitor-updaterの標準セキュリティ

デフォルトでは、Capgoのセキュリティモデルは、Webホスティングプロバイダーのものと似ています。Capgoは更新プログラムを __CAPGO_KEEP_0__-updaterは、暗号化された状態で保存し、HTTPSを使用して最新の暗号化技術で更新プログラムを配信します。同様に、開発者がコンピューターから更新プログラムを公開する場合も、HTTPSを使用します。 __CAPGO_KEEP_0__は、SSL LabsのHTTPSテストでA+を獲得

Capgoの標準セキュリティは、SSL LabsのHTTPSテストでA+を獲得 (

Capgo’s default security scores an A+ on SSL Labs’ HTTPS test (, 2022年11月)__CAPGO_KEEP_0__は、WebとIonicアプリケーションを使用する__CAPGO_KEEP_1__と同様に、サーバーとエンドユーザーの端末間のネットワーク接続のプライバシーと完整性を保護するために、HTTPSを使用します。これは、WebとIonicアプリケーションを使用する両方で、優れたセキュリティレベルです。

Like best-in-class web hosts, Capgo uses HTTPS to protect the privacy and integrity of network connections between the server and end users’ devices. This is an excellent level of security that works well both for the web and Ionic apps that use Capgo.

__CAPGO_KEEP_0__-updater

Another thing Capgo and most web hosts have in common is they run on lower-level cloud infrastructure, often from AWS, GCP, or another popular cloud provider. The hardware and software operated by these cloud providers and Capgo or other web hosts are part of the cloud supply chain.

クラウドサプライチェーンとそのセキュリティモデルは、多くのウェブサイトやアプリケーションに適しています。 どのウェブ開発者もクラウドプロバイダーに信頼を置き、アップロードしたファイルが実行または提供されるファイルであることを期待します。 そして、クラウドプロバイダーはインフラストラクチャをセキュアに保つために努力しています。

しかし、明らかにハードウェアとソフトウェアの脆弱性が発見されます。クラウドプロバイダーは時期のよいスケジュールで脆弱性を修正し、悪意のあるソフトウェア(e.g. "Google’s SLSA")を予防し、防御の層を構築し、実際にはクラウドインフラは多くのウェブサイトやアプリケーションのセキュリティニーズを満たしています。ただし、イオニックアプリには、ウェブ上の最高のセキュリティニーズを持つ__CAPGO_KEEP_0__ JSアプリケーションが含まれます。これらのアプリケーションには、クラウドインフラの脆弱性を脅威モデルに含めています。 これらの__CAPGO_KEEP_0__ JSアプリケーションに最も厳密なセキュリティニーズを持つアプリケーションに、__CAPGO_KEEP_1__、__CAPGO_KEEP_2__でエンドツーエンドの__CAPGO_KEEP_0__署名を実装しました。 __CAPGO_KEEP_0__ Updates標準プロトコル), and build layers of defense in depth, and in practice, cloud infrastructure has shown to meet most websites and apps’ security needs. However, some Ionic apps include compromised cloud infrastructure in their threat models. For these Capacitor JS apps with the highest security requirements above the web, we built end-to-end code signing in to Capgo and the Capgoのエンドツーエンド__CAPGO_KEEP_1__署名は、パブリックキー暗号学を使用して、エンドユーザーのデバイスが__CAPGO_KEEP_2__アプリケーション開発者によって提供されたオリジナルの更新ファイルのみを実行することを保証します。.

End-to-end code signing with Capgo

Capgo’s end-to-end code signing uses public-key cryptography to ensure end users’ devices run only unmodified, original updates from the Capacitor app developer.

“エンドツーエンド”とは、開発者がアップデートを公開した時点から、エンドユーザーのデバイスがアップデートを受信して実行するまでの流れをカバーするセキュリティのことです。 “Code signing”とは、暗号化と秘密のプライベートキーを使用して “code”を署名し、後で信頼されたパブリックキーを使用して署名を検証することです。

ここに、簡単な*スキーマがあります。

Capgo暗号化スキーマ

  • 実用上は複雑ですが、暗号化は難しい

定義:

  • AES: Advanced Encryption Standard、シームトリック暗号化アルゴリズム、1つのキーで暗号化と復号が行われます。
  • RSA: Rivest–Shamir–Adleman、非対称暗号化アルゴリズム、2つのキーが使用されます: パブリックキーとプライベートキー。
  • シフター: エンコードされたデータ。
  • セッションキー: AESキーを使用してデータを暗号化および復号するために使用されるキー。
  • チェックサム: ファイルのハッシュ
  • 署名: チェックサムがプライベートのRSAキーで暗号化されたものです。パブリックのRSAキーを使用して検証できます。

アップデートをAESアルゴリズムで暗号化します。アップロードごとにランダムなAESキーが生成され、AESキーとチェックサム(署名)が開発者のプライベートRSAキーで暗号化されます。開発者のパブリックRSAキーを使用して、iOSアプリでAESキーと署名(チェックサムに戻す)を復号します。後で、復号されたAESキーを使用してアップデートを復号し、復号されたアップデートのチェックサムを計算し、復号された署名と比較します。

We use two different encryption algorithms because RSA cannot be used to encrypt large amounts of data. AES is used to encrypt the update and RSA is used to encrypt the AES key and the checksum.

Even Capgo cannot read the content of your bundle with this robust security model that is used by many enterprise customers.

Update encryption V2 2024-08-27:

  • We switched the key type that is stored in the app. This was done in order to prevent inferring the public key (previously used for encryption) from the private key (previously used for decryption). Now, the app stores the public key (now used for decryption).
  • We switched the checksum from the CRC32 algorithm to the SHA256 algorithm. We also started signing the bundle. When encryption V2 is configured, an update must have a valid signature. This is strictly enforced by the plugin.We now enforce a valid signature when encryption V2 is configured. These 3 changes have been done after a security analysis from a member of the community. They are here to prevent cryptographic attacks during update.
  • If you used encryption V1, migrate to V2 to benefit from the new security features. Follow the migration instructions.

With end-to-end __CAPGO_KEEP_0__ signing, __CAPGO_KEEP_1__ becomes a “trustless” cloud infrastructure. If one of __CAPGO_KEEP_2__’s cloud providers or even __CAPGO_KEEP_3__ itself were to modify a __CAPGO_KEEP_4__-signed update, end users’ devices would reject that update and run the previous, trusted update that’s already on the device. Capacitor.

With end-to-end code signing, Capgo becomes a “trustless” cloud infrastructure. If one of Capgo’s cloud providers or even Capgo itself were to modify a code-signed update, end users’ devices would reject that update and run the previous, trusted update that’s already on the device.

While web-level HTTPS is sufficient for many apps, some large companies find the extra level of security from end-to-end code signing appealing. Some of these companies make finance apps that issue high-value, permanent transactions. Other companies have CISOs who include compromised cloud infrastructure in their threat models. We built end-to-end code signing in to Capgo for these use cases and are interested in hearing more from companies with higher-level security needs.

Enterpriseスタート

For large companies or projects who care deeply about security, we want to make code signing easy to set up and maintain. To that end, we now provide the following features:

  • クイックな証明書設定と構成
  • code signing development servers with both Capgo and development builds
  • code signing on every update

Capgo code signing is available for all customers. To get started, follow the セットアップ手順.

クレジット

Capgoに感謝する Ionicこの記事は、Ionicに基づいています。 この記事はChat-GPT-3で書き直されました。 E2E暗号化のアップデート用の__CAPGO_KEEP_0__と__CAPGO_KEEP_1__の署名から始めてください。

Keep going from E2E Encryption for Capacitor Updater via Code Signing

E2E暗号化のアップデート用の__CAPGO_KEEP_0__と__CAPGO_KEEP_1__の署名 セキュリティとコンプライアンスの計画に使用する場合、Capacitor暗号化とCodeコンプライアンスを接続してください。 暗号化の実装詳細については コンプライアンスの実装詳細については __CAPGO_KEEP_0__セキュリティ スキャナ __CAPGO_KEEP_0__セキュリティ スキャナの製品ワークフローについては __CAPGO_KEEP_0__セキュリティ スキャナを参照してください。 Capgo Security Scanner for the product workflow in Capgo Security Scanner, Capgo セキュリティ Capgo セキュリティの製品ワークフローに Capgo トラスト センター Capgo トラスト センターの製品ワークフローに

Capacitorアプリのリアルタイム更新

ウェブ層のバグが生じた場合、Capgoを介して修正を配信し、アプリストアの承認待ちの日数を省きます。ユーザーはバックグラウンドでアップデートを受け取り、ネイティブの変更は通常のレビュー経路で残ります。

スタートする

ブログの最新記事

Capgoは、プロフェッショナルなモバイルアプリを作成するために必要な最良の洞察を提供します。