

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 的版本 AWS Encryption SDK
<a name="about-versions"></a>

 AWS Encryption SDK 語言實作使用[語意版本控制](https://semver.org/)，讓您更輕鬆地識別每個版本中的變更幅度。主要版本編號的變更，例如 1.*x**.x* 到 2.*x*.*x*，表示可能需要程式碼變更和計劃部署的重大變更。新版本的中斷變更可能不會影響每個使用案例，請檢閱版本備註以查看您是否受到影響。次要版本中的變更，例如 *x*.1.*x* 到 *x*.2.*x*，一律回溯相容，但可能包含已取代的元素。

盡可能使用 AWS Encryption SDK 您所選程式設計語言的最新版本 。每個版本的[維護和支援政策](introduction.md#support)會因程式設計語言實作而有所不同。如需您慣用程式設計語言中支援版本的詳細資訊，請參閱其 [GitHub 儲存庫](introduction.md#esdk-repos)中的 `SUPPORT_POLICY.rst` 檔案。

當升級包含需要特殊組態以避免加密或解密錯誤的新功能時，我們會提供中繼版本和詳細的使用說明。例如，1.7.*x* 版和 1.8.*x* 版的設計為轉換版本，可協助您從 1.7.*x* 版升級至 2.0.*x* 版和更新版本。如需詳細資訊，請參閱[遷移您的 AWS Encryption SDK](migration.md)。

**注意**  
版本編號中的 *x* 代表主要和次要版本的任何修補程式。例如，1.7.*x* 版代表以 1.7 開頭的所有版本，包括 1.7.1 和 1.7.9。  
新的安全功能最初在 AWS 加密 CLI 版本 1.7.*x* 和 2.0.*x* 中發行。不過， AWS Encryption CLI 1.8.*x* 版取代了 1.7.*x* 版，而 AWS Encryption CLI 2.1.*x* 版取代了 2.0.*x*。如需詳細資訊，請參閱 GitHub 上 [aws-encryption-sdk-cli](https://github.com/aws/aws-encryption-sdk-cli/) 儲存庫中的相關[安全建議](https://github.com/aws/aws-encryption-sdk-cli/security/advisories/GHSA-2xwp-m7mq-7q3r)。

下表概述 AWS Encryption SDK 每種程式設計語言支援的 版本之間的主要差異。

## C
<a name="esdk-c-versions"></a>

如需所有變更的詳細說明，請參閱 GitHub 上 [aws-encryption-sdk-c](https://github.com/aws/aws-encryption-sdk-c/) 儲存庫中的 [CHANGELOG.md](https://github.com/aws/aws-encryption-sdk-c/blob/master/CHANGELOG.md)：//。


| 
| 
| **主要版本** | **詳細資訊** | **SDK 主要版本生命週期階段** | 
| --- |--- |--- |
| 1.x | 1.0 | Initial release. | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 1.7 | Updates to the AWS Encryption SDK that help users of earlier versions upgrade to versions 2.0.x and later. For more information, see [1.7.*x* 版](#version-1.7). | 
| 2.x | 2.0 | Updates to the AWS Encryption SDK. For more information, see [2.0.*x* 版](#version-2). | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 
| 2.2 | Improvements to the message decryption process. | 
| 2.3 | Adds support for AWS KMS multi-Region keys. | 

## C\$1 / .NET
<a name="esdk-dot-net-versions"></a>

如需所有變更的詳細說明，請參閱 GitHub 上儲存[https://github.com/aws/aws-encryption-sdk/tree/mainline/AwsEncryptionSDK/runtimes/net/](https://github.com/aws/aws-encryption-sdk/tree/mainline/AwsEncryptionSDK/runtimes/net/)庫中的 [CHANGELOG.md](https://github.com/aws/aws-encryption-sdk/tree/mainline/AwsEncryptionSDK/runtimes/net/CHANGELOG.md)。


| 
| 
| **主要版本** | **詳細資訊** | **SDK 主要版本生命週期階段** | 
| --- |--- |--- |
| 3.x | 3.1.0 | Initial release. | [End-of-Support](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle)  [AWS Encryption SDK 適用於 .NET 的 3.x 版](https://www.nuget.org/packages/AWS.EncryptionSDK)已進入終止支援；請[升級至 4.x。](https://www.nuget.org/packages/AWS.Cryptography.EncryptionSDK) | 
| 4.x | 4.0 | Adds support for the AWS KMS Hierarchical keyring, the required encryption context CMM, and asymmetric RSA AWS KMS keyrings. | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 
| 5.x | 5.0 | Updates to version 2.x of the Material Providers Library (MPL). Drops support for the AWS SDK for .NET v3 and requires the AWS SDK for .NET v4. | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 

## 命令列界面 (CLI)
<a name="esdk-cli-versions"></a>

如需所有變更的詳細說明，請參閱 GitHub 上 [aws-encryption-sdk-cli](https://github.com/aws/aws-encryption-sdk-cli/) 儲存庫中的 [AWS 加密 CLI 的版本](crypto-cli-versions.md)和 [CHANGELOG.rst](https://github.com/aws/aws-encryption-sdk-cli/blob/master/CHANGELOG.rst)。


| 
| 
| **主要版本** | **詳細資訊** | **SDK 主要版本生命週期階段** | 
| --- |--- |--- |
| 1.x | 1.0 | Initial release. | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 1.7 | Updates to the AWS Encryption SDK that help users of earlier versions upgrade to versions 2.0.x and later. For more information, see [1.7.*x* 版](#version-1.7). | 
| 2.x | 2.0 | Updates to the AWS Encryption SDK. For more information, see [2.0.*x* 版](#version-2). | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 2.1 |  移除 `--discovery` 參數，並將其取代為 `--wrapping-keys` 參數的 `discovery` 屬性。  AWS 加密 CLI 的 2.1.0 版等同於其他程式設計語言的 2.0 版。  | 
| 2.2 | Improvements to the message decryption process. | 
| 3.x | 3.0 | Adds support for AWS KMS multi-Region keys. | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 4.x | 4.0 | The AWS Encryption CLI no longer supports Python 2 or Python 3.4. As of major version 4.x of the AWS Encryption CLI, only Python 3.5 or later is supported. | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 
| 4.1 | The AWS Encryption CLI no longer supports Python 3.5. As of version 4.1.x of the AWS Encryption CLI, only Python 3.6 or later is supported. | 
| 4.2 | The AWS Encryption CLI no longer supports Python 3.6. As of version 4.2.x of the AWS Encryption CLI, only Python 3.7 or later is supported. | 

## Java
<a name="esdk-java-versions"></a>

如需所有變更的詳細說明，請參閱 GitHub 上 [aws-encryption-sdk-java](https://github.com/aws/aws-encryption-sdk-java/) 儲存庫中的 [CHANGELOG.rst](https://github.com/aws/aws-encryption-sdk-java/blob/master/CHANGELOG.md)。


| 
| 
| **主要版本** | **詳細資訊** | **SDK 主要版本生命週期階段** | 
| --- |--- |--- |
| 1.x | 1.0 | Initial release. | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 1.3 | Adds support for cryptographic materials manager and data key caching. Moved to deterministic IV generation. | 
| 1.6.1 |  棄用 `AwsCrypto.decryptString()` `AwsCrypto.encryptString()`和 並將其取代為 `AwsCrypto.encryptData()`和 `AwsCrypto.decryptData()`。  | 
| 1.7 | Updates to the AWS Encryption SDK that help users of earlier versions upgrade to versions 2.0.x and later. For more information, see [1.7.*x* 版](#version-1.7). | 
| 2.x | 2.0 | Updates to the AWS Encryption SDK. For more information, see [2.0.*x* 版](#version-2). |  [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) 2.x 版 適用於 JAVA 的 AWS Encryption SDK 將在 2024 年進入維護模式。  | 
| 2.2 | Improvements to the message decryption process. | 
| 2.3 | Adds support for AWS KMS multi-Region keys. | 
| 2.4 | Adds support for AWS SDK for Java 2.x. | 
| 3.x | 3.0 |  將 適用於 JAVA 的 AWS Encryption SDK 與[物料提供者程式庫 ](https://github.com/aws/aws-cryptographic-material-providers-library)(MPL) 整合。 新增對對稱和非對稱 RSA AWS KMS keyring、 AWS KMS ECDH keyring、 AWS KMS 階層 keyring、原始 AES keyring、原始 RSA keyring、原始 ECDH keyring、多重 keyring 和所需加密內容 CMM 的支援。  | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 

## Go
<a name="esdk-go-versions"></a>

如需所有變更的詳細說明，請參閱 GitHub 上 [aws-encryption-sdk](https://github.com/aws/aws-encryption-sdk/tree/mainline) 儲存庫 Go 目錄中的 [CHANGELOG.md](https://github.com/aws/aws-encryption-sdk/tree/mainline/releases/go/encryption-sdk/CHANGELOG.md)：//。


| 
| 
| **主要版本** | **詳細資訊** | **SDK 主要版本生命週期階段** | 
| --- |--- |--- |
| 0.1.x | 0.1.0 | Initial release. | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 

## JavaScript
<a name="esdk-javascript-versions"></a>

如需所有變更的詳細說明，請參閱 GitHub 上 [aws-encryption-sdk-javascript](https://github.com/aws/aws-encryption-sdk-javascript/tree/master/modules) 儲存庫中的 [CHANGELOG.md](https://github.com/aws/aws-encryption-sdk-javascript/blob/master/CHANGELOG.md)：//。


| 
| 
| **主要版本** | **詳細資訊** | **SDK 主要版本生命週期階段** | 
| --- |--- |--- |
| 1.x | 1.0 | Initial release. | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 1.7 | Updates to the AWS Encryption SDK that help users of earlier versions upgrade to versions 2.0.x and later. For more information, see [1.7.*x* 版](#version-1.7). | 
| 2.x | 2.0 | Updates to the AWS Encryption SDK. For more information, see [2.0.*x* 版](#version-2). | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 2.2 | Improvements to the message decryption process. | 
| 2.3 | Adds support for AWS KMS multi-Region keys. | 
| 3.x | 3.0 | Removes CI coverage for Node 10. Upgrades dependencies to no longer support Node 8 and Node 10. |  [Maintenance](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (維護) 3.x 版的支援 適用於 JavaScript 的 AWS Encryption SDK 將於 2024 年 1 月 17 日結束。  | 
| 4.x | 4.0 | Requires version 3 of the 適用於 JavaScript 的 AWS Encryption SDK's kms-用戶端 to use the AWS KMS keyring. | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 

## Python
<a name="esdk-python-versions"></a>

如需所有變更的詳細說明，請參閱 GitHub 上 [aws-encryption-sdk-python](https://github.com/aws/aws-encryption-sdk-python/) 儲存庫中的 [CHANGELOG.rst](https://github.com/aws/aws-encryption-sdk-python/blob/master/CHANGELOG.rst)。


| 
| 
| **主要版本** | **詳細資訊** | **SDK 主要版本生命週期階段** | 
| --- |--- |--- |
| 1.x | 1.0 | Initial release. | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 1.3 | Adds support for cryptographic materials manager and data key caching. Moved to deterministic IV generation. | 
| 1.7 | Updates to the AWS Encryption SDK that help users of earlier versions upgrade to versions 2.0.x and later. For more information, see [1.7.*x* 版](#version-1.7). | 
| 2.x | 2.0 | Updates to the AWS Encryption SDK. For more information, see [2.0.*x* 版](#version-2). | [End-of-Support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) | 
| 2.2 | Improvements to the message decryption process. | 
| 2.3 | Adds support for AWS KMS multi-Region keys. | 
| 3.x | 3.0 | The 適用於 Python 的 AWS Encryption SDK no longer supports Python 2 or Python 3.4. As of major version 3.x of the 適用於 Python 的 AWS Encryption SDK, only Python 3.5 or later is supported. | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 
| 4.x | 4.0 |  將 適用於 Python 的 AWS Encryption SDK 與[物料提供者程式庫 ](https://github.com/aws/aws-cryptographic-material-providers-library)(MPL) 整合。  | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 

## Rust
<a name="esdk-rust-versions"></a>

如需所有變更的詳細說明，請參閱 GitHub 上 [aws-encryption-sdk](https://github.com/aws/aws-encryption-sdk/tree/mainline) 儲存庫的 Rust 目錄中的 [CHANGELOG.md](https://github.com/aws/aws-encryption-sdk-dafny/tree/mainline/AwsEncryptionSDK/runtimes/rust/CHANGELOG.md)：//。


| 
| 
| **主要版本** | **詳細資訊** | **SDK 主要版本生命週期階段** | 
| --- |--- |--- |
| 1.x | 1.0 | Initial release. | [一般可用性](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle) (GA) | 

## 版本詳細資訊
<a name="version-details"></a>

下列清單說明 支援版本之間的主要差異 AWS Encryption SDK。

**Topics**
+ [1.7.*x* 之前的版本](#versions-earlier)
+ [1.7.*x* 版](#version-1.7)
+ [2.0.*x* 版](#version-2)
+ [2.2.*x* 版](#version2.2.x)
+ [2.3.*x* 版](#version2.3)

### 1.7.*x* 之前的版本
<a name="versions-earlier"></a>

**注意**  
所有 1*.x*.*x* 版本的 AWS Encryption SDK 都處於[end-of-support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle)。盡快升級到 AWS Encryption SDK 適用於您的程式設計語言的最新可用版本。若要從 1.7.*x* 之前的 AWS Encryption SDK 版本升級，您必須先升級至 1.7.*x*。如需詳細資訊，請參閱[遷移您的 AWS Encryption SDK](migration.md)。

1.7.*x* AWS Encryption SDK 之前的 版本提供重要的安全功能，包括使用 Galois/計數器模式 (AES-GCM) 中的進階加密標準演算法加密、HMAC extract-and-expand金鑰衍生函數 (HKDF)、簽署和 256 位元加密金鑰。不過，這些版本不支援我們建議的[最佳實務](best-practices.md)，包括[金鑰承諾](concepts.md#key-commitment)。

### 1.7.*x* 版
<a name="version-1.7"></a>

**注意**  
所有 1*.x*.*x* 版本的 AWS Encryption SDK 都處於[end-of-support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle)。

1.7.*x* 版旨在協助舊版 的使用者 AWS Encryption SDK 升級至 2.0.*x* 版及更新版本。如果您是初次使用 AWS Encryption SDK，您可以略過此版本，並以您程式設計語言的最新可用版本開始。

1.7.*x* 版完全回溯相容；它不會引入任何重大變更或變更 的行為 AWS Encryption SDK。它也會轉送相容性；它可讓您更新程式碼，使其與 2.0.*x* 版相容。它包含新功能，但不完全啟用它們。它需要組態值，以防止您立即採用所有新功能，直到您準備好為止。

1.7.*x* 版包含下列變更：

**AWS KMS 主金鑰提供者更新 （必要）**  <a name="changes-to-mkps"></a>
1.7.*x* 版將新的建構函式引入 適用於 Python 的 AWS Encryption SDK ， 適用於 JAVA 的 AWS Encryption SDK 並在*嚴格*或*探索*模式中明確建立 AWS KMS 主金鑰提供者。此版本會將類似的變更新增至 AWS Encryption SDK 命令列界面 (CLI)。如需詳細資訊，請參閱[更新 AWS KMS 主金鑰提供者](migrate-mkps-v2.md)。  
+ 在*嚴格模式下*， AWS KMS 主金鑰提供者需要包裝金鑰的清單，它們只會使用您指定的包裝金鑰來加密和解密。這是 AWS Encryption SDK 最佳實務，可確保您使用打算使用的包裝金鑰。
+ 在*探索模式中*， AWS KMS 主金鑰提供者不會採用任何包裝金鑰。您無法使用它們進行加密。解密時，他們可以使用任何包裝金鑰來解密加密的資料金鑰。不過，您可以將用於解密的包裝金鑰限制為特別是那些金鑰 AWS 帳戶。帳戶篩選是選用的，但我們建議[最佳實務](best-practices.md)。
建立舊版 AWS KMS 主金鑰提供者的建構函式已在 1.7.*x* 版中棄用，並在 2.0.*x* 版中移除。這些建構函數會執行個體化使用您指定包裝金鑰進行加密的主金鑰提供者。不過，它們會使用加密資料的包裝金鑰來解密加密的資料金鑰，而不考慮指定的包裝金鑰。使用者可能會無意中使用他們不打算使用的包裝金鑰解密訊息，包括在其他 AWS KMS keys AWS 帳戶 和 區域中。  
 AWS KMS 主金鑰的建構函數沒有變更。加密和解密時， AWS KMS 主金鑰只會使用 AWS KMS key 您指定的 。

**AWS KMS keyring 更新 （選用）**  
1.7.*x* 版將新的篩選條件新增至 適用於 C 的 AWS Encryption SDK 和 適用於 JavaScript 的 AWS Encryption SDK 實作，將[AWS KMS 探索 keyring ](use-kms-keyring.md#kms-keyring-discovery)限制為特定 AWS 帳戶。這個新帳戶篩選條件是選用的，但我們建議採用[最佳實務](best-practices.md)。如需詳細資訊，請參閱[更新 AWS KMS keyring](migrate-keyrings-v2.md)。  
 AWS KMS keyring 的建構函數沒有變更。在嚴格模式下，標準 AWS KMS keyring 的行為類似於主金鑰提供者。 AWS KMS 探索 keyring 是在探索模式下明確建立的。

**傳遞金鑰 ID AWS KMS 以解密**  
從 1.7.*x* 版開始，在解密加密的資料金鑰時， AWS Encryption SDK 一律會在對 AWS KMS [Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) 操作的呼叫 AWS KMS key 中指定 。 AWS KMS key 會從每個加密資料金鑰中的中繼資料 AWS Encryption SDK 取得 的金鑰 ID 值。此功能不需要任何程式碼變更。  
 AWS KMS key 不需要指定 的金鑰 ID，即可解密在對稱加密 KMS 金鑰下加密的加密文字，但這是[AWS KMS 最佳實務](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId)。如同在金鑰提供者中指定包裝金鑰一樣，此實務可確保 AWS KMS 僅使用您打算使用的包裝金鑰進行解密。

**使用金鑰承諾解密加密文字**  
1.7.*x* 版可以解密有或沒有[金鑰承諾](concepts.md#key-commitment)加密的加密文字。不過，它無法使用金鑰承諾來加密加密文字。此屬性可讓您完全部署應用程式，在遇到任何此類加密文字之前，可以解密以金鑰承諾加密的加密文字。由於此版本會解密在沒有金鑰承諾的情況下加密的訊息，因此您不需要重新加密任何加密文字。  
為了實作此行為， 1.7.*x* 版包含新的[承諾政策](concepts.md#commitment-policy)組態設定，可決定 AWS Encryption SDK 是否可以使用金鑰承諾來加密或解密。在 1.7.*x* 版中，承諾政策 的唯一有效值`ForbidEncryptAllowDecrypt`是用於所有加密和解密操作。此值可防止 AWS Encryption SDK 使用包含金鑰承諾的任何新演算法套件進行加密。它允許 使用和不使用金鑰承諾 AWS Encryption SDK 來解密加密文字。  
雖然 1.7.*x* 版中只有一個有效的承諾政策值，但當您使用此版本中引入的新 APIs 時，我們會要求您明確設定此值。當您升級至 2.1.*x* 版`require-encrypt-require-decrypt`時，設定 值會明確防止您的承諾政策自動變更為 。反之，您可以分階段[遷移您的承諾政策](migrate-commitment-policy.md)。

**具有關鍵承諾的演算法套件**  
1.7.*x* 版包含兩個支援金鑰承諾的新[演算法套件](supported-algorithms.md)。一個包含簽署，另一個不包含簽署。如同先前支援的演算法套件，這兩種新的演算法套件都包含 AES-GCM 加密、256 位元加密金鑰，以及 HMAC extract-and-expand金鑰衍生函數 (HKDF)。  
不過，用於加密的預設演算法套件不會變更。這些演算法套件會新增至 1.7.*x* 版，以準備您的應用程式在 2.0.*x* 版和更新版本中使用它們。

**CMM 實作變更**  
1.7.*x* 版將變更引入預設密碼編譯資料管理員 (CMM) 介面，以支援金鑰承諾。只有在您撰寫自訂 CMM 時，此變更才會對您造成影響。如需詳細資訊，請參閱 API 文件或[程式設計語言](programming-languages.md)的 GitHub 儲存庫。

### 2.0.*x* 版
<a name="version-2"></a>

2.0.*x* 版支援 中提供的新安全功能 AWS Encryption SDK，包括指定的包裝金鑰和金鑰承諾。為了支援這些功能，2.0.*x* 版包含舊版 的重大變更。 AWS Encryption SDK您可以透過部署 1.7.*x* 版來準備這些變更。2.0.*x* 版包含 1.7.*x* 版中引進的所有新功能，以及下列新增和變更。

**注意**  
2.*x*.*x* 版的 適用於 JavaScript 的 AWS Encryption SDK 適用於 Python 的 AWS Encryption SDK和 AWS 加密 CLI 處於[end-of-support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle)。  
如需有關以您偏好的程式設計語言[支援和維護](introduction.md#support)此 AWS Encryption SDK 版本的資訊，請參閱其 [GitHub 儲存庫](introduction.md#esdk-repos)中的 `SUPPORT_POLICY.rst` 檔案。

**AWS KMS 主金鑰提供者**  
在 1.7.*x* 版中取代的原始 AWS KMS 主金鑰提供者建構函式會在 2.0.*x* 版中移除。您必須以[嚴格模式或探索模式](migrate-mkps-v2.md)明確建構 AWS KMS 主金鑰提供者。

**使用金鑰承諾加密和解密加密文字**  
2.0.*x* 版可以在有或沒有[金鑰承諾](concepts.md#key-commitment)的情況下加密和解密加密文字。其行為取決於承諾政策設定。根據預設，它一律使用金鑰承諾加密，並且只會解密使用金鑰承諾加密的加密文字。除非您變更承諾政策，否則 AWS Encryption SDK 不會解密任何舊版 加密的加密文字 AWS Encryption SDK，包括 1.7.*x* 版。  
根據預設，2.0.*x* 版不會解密任何在沒有金鑰承諾的情況下加密的加密文字。如果您的應用程式可能遇到在沒有金鑰承諾的情況下加密的加密文字，請使用 設定承諾政策值`AllowDecrypt`。
在 2.0.*x* 版中，承諾政策設定有三個有效值：  
+ `ForbidEncryptAllowDecrypt` — AWS Encryption SDK 無法使用金鑰承諾加密 。它可以解密使用或不使用金鑰承諾加密的加密文字。
+ `RequireEncryptAllowDecrypt` — AWS Encryption SDK 必須使用金鑰承諾加密 。它可以解密使用或不使用金鑰承諾加密的加密文字。
+ `RequireEncryptRequireDecrypt` （預設） — AWS Encryption SDK 必須使用金鑰承諾加密。它只會解密具有金鑰承諾的加密文字。
如果您要從舊版 遷移 AWS Encryption SDK 至 2.0.*x* 版，請將 承諾政策設定為 值，以確保您可以解密應用程式可能遇到的所有現有加密文字。您可能會隨著時間調整此設定。

### 2.2.*x* 版
<a name="version2.2.x"></a>

新增數位簽章和限制加密資料金鑰的支援。

**注意**  
2.*x*.*x* 版的 適用於 JavaScript 的 AWS Encryption SDK 適用於 Python 的 AWS Encryption SDK和 AWS 加密 CLI 處於[end-of-support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle)。  
如需有關以您偏好的程式設計語言[支援和維護](introduction.md#support)此 AWS Encryption SDK 版本的資訊，請參閱其 [GitHub 儲存庫](introduction.md#esdk-repos)中的 `SUPPORT_POLICY.rst` 檔案。

**數位簽章**  
為了改善解密時[數位簽章](concepts.md#digital-sigs)的處理， AWS Encryption SDK 包含下列功能：  
+ *非串流模式* — 只有在處理所有輸入後才會傳回純文字，包括驗證存在的數位簽章。此功能可防止您在驗證數位簽章之前使用純文字。每當您解密使用數位簽章 （預設演算法套件） 加密的資料時，請使用此功能。例如，由於 AWS 加密 CLI 一律會在串流模式下處理資料，因此使用數位簽章解密加密文字時，請使用 `- -buffer` 參數。
+ *僅簽署的解密模式* — 此功能只會解密未簽署的加密文字。如果解密在加密文字中遇到數位簽章，操作會失敗。使用此功能以避免在驗證簽章之前意外處理已簽署訊息的純文字。

**限制加密的資料金鑰**  
您可以[限制加密訊息中的加密資料金鑰數量](configure.md#config-limit-keys)。此功能可協助您在加密時偵測設定錯誤的主金鑰提供者或 keyring，或在解密時識別惡意加密文字。  
當您從不受信任的來源解密訊息時，您應該限制加密的資料金鑰。它可避免對金鑰基礎設施進行不必要的、昂貴且可能詳盡的呼叫。

### 2.3.*x* 版
<a name="version2.3"></a>

新增 AWS KMS 對多區域金鑰的支援。如需詳細資訊，請參閱[使用多區域 AWS KMS keys](configure.md#config-mrks)。

**注意**  
 AWS 加密 CLI 支援從 3.0.*x* 版開始的多區域金鑰。  
2.*x*.*x* 版的 適用於 JavaScript 的 AWS Encryption SDK 適用於 Python 的 AWS Encryption SDK和 AWS 加密 CLI 處於[end-of-support階段](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle)。  
如需有關以您偏好的程式設計語言[支援和維護](introduction.md#support)此 AWS Encryption SDK 版本的資訊，請參閱其 [GitHub 儲存庫](introduction.md#esdk-repos)中的 `SUPPORT_POLICY.rst` 檔案。