> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet/ja/nfcworetto-bakkuendo/kdo/kdowo.md).

# カード情報を暗号化

## 概要

カード認証情報は機密情報です。NFC Wallet SDK を使用してカード登録を開始する前に、これらを暗号化してください。

## カード暗号化要件

カード情報は、RFC 2315 および RFC 5652 で定義された PKCS#7 暗号化形式を使用し、次の暗号化条件を満たします。

* コンテンツ暗号化アルゴリズム: AES256/CBC/PKCS7Padding
* 鍵暗号化アルゴリズム: イシュア公開鍵長 2048 バイトの RSA。

暗号化するカードペイロードには、次の JSON フィールドを含める必要があります。

<table><thead><tr><th width="123.88885498046875">JSON フィールド</th><th width="402.66668701171875">説明</th><th width="89.7777099609375">MOC</th><th>長さ</th></tr></thead><tbody><tr><td><code>fpan</code></td><td>デジタル化する資金供給用 PAN。</td><td>M</td><td>16-20</td></tr><tr><td><code>exp</code></td><td>カードの有効期限を MMYY 形式で指定します。</td><td>M</td><td>4</td></tr><tr><td><code>cvv</code></td><td>セキュリティコードは任意です。その有無はカード発行会社によって異なります。</td><td>C</td><td>3-4</td></tr><tr><td><code>nonce</code></td><td>この一時的な値は、green enrollment フローでのみ使用されます。提供する場合は、nonce の SHA256 ハッシュも認証トークンに含める必要があります。</td><td>O</td><td>1-50</td></tr></tbody></table>

暗号化結果は、その後 base64 でエンコードする必要があります。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet/ja/nfcworetto-bakkuendo/kdo/kdowo.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
