]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Private/Protocol/Crypto.h
CryptoPkg/BaseCryptLib: Retire Aes Ecb mode algorithm
[mirror_edk2.git] / CryptoPkg / Private / Protocol / Crypto.h
index a30660c1920ab4d5fedff1f1a6578d7221994f17..e76ff623a51d4775c7ad7c4c62d3900598daca65 100644 (file)
@@ -2498,69 +2498,22 @@ BOOLEAN
   );\r
 \r
 /**\r
-  Performs AES encryption on a data buffer of the specified size in ECB mode.\r
-\r
-  This function performs AES encryption on data buffer pointed by Input, of specified\r
-  size of InputSize, in ECB mode.\r
-  InputSize must be multiple of block size (16 bytes). This function does not perform\r
-  padding. Caller must perform padding, if necessary, to ensure valid input data size.\r
-  AesContext should be already correctly initialized by AesInit(). Behavior with\r
-  invalid AES context is undefined.\r
-\r
-  If AesContext is NULL, then return FALSE.\r
-  If Input is NULL, then return FALSE.\r
-  If InputSize is not multiple of block size (16 bytes), then return FALSE.\r
-  If Output is NULL, then return FALSE.\r
-  If this interface is not supported, then return FALSE.\r
-\r
-  @param[in]   AesContext  Pointer to the AES context.\r
-  @param[in]   Input       Pointer to the buffer containing the data to be encrypted.\r
-  @param[in]   InputSize   Size of the Input buffer in bytes.\r
-  @param[out]  Output      Pointer to a buffer that receives the AES encryption output.\r
-\r
-  @retval TRUE   AES encryption succeeded.\r
-  @retval FALSE  AES encryption failed.\r
-  @retval FALSE  This interface is not supported.\r
+  AES ECB Mode is deprecated and unsupported any longer.\r
+  Keep the function field for binary compability.\r
 \r
 **/\r
 typedef\r
 BOOLEAN\r
-(EFIAPI *EDKII_CRYPTO_AES_ECB_ENCRYPT) (\r
+(EFIAPI *DEPRECATED_EDKII_CRYPTO_AES_ECB_ENCRYPT) (\r
   IN   VOID         *AesContext,\r
   IN   CONST UINT8  *Input,\r
   IN   UINTN        InputSize,\r
   OUT  UINT8        *Output\r
   );\r
 \r
-/**\r
-  Performs AES decryption on a data buffer of the specified size in ECB mode.\r
-\r
-  This function performs AES decryption on data buffer pointed by Input, of specified\r
-  size of InputSize, in ECB mode.\r
-  InputSize must be multiple of block size (16 bytes). This function does not perform\r
-  padding. Caller must perform padding, if necessary, to ensure valid input data size.\r
-  AesContext should be already correctly initialized by AesInit(). Behavior with\r
-  invalid AES context is undefined.\r
-\r
-  If AesContext is NULL, then return FALSE.\r
-  If Input is NULL, then return FALSE.\r
-  If InputSize is not multiple of block size (16 bytes), then return FALSE.\r
-  If Output is NULL, then return FALSE.\r
-  If this interface is not supported, then return FALSE.\r
-\r
-  @param[in]   AesContext  Pointer to the AES context.\r
-  @param[in]   Input       Pointer to the buffer containing the data to be decrypted.\r
-  @param[in]   InputSize   Size of the Input buffer in bytes.\r
-  @param[out]  Output      Pointer to a buffer that receives the AES decryption output.\r
-\r
-  @retval TRUE   AES decryption succeeded.\r
-  @retval FALSE  AES decryption failed.\r
-  @retval FALSE  This interface is not supported.\r
-\r
-**/\r
 typedef\r
 BOOLEAN\r
-(EFIAPI *EDKII_CRYPTO_AES_ECB_DECRYPT) (\r
+(EFIAPI *DEPRECATED_EDKII_CRYPTO_AES_ECB_DECRYPT) (\r
   IN   VOID         *AesContext,\r
   IN   CONST UINT8  *Input,\r
   IN   UINTN        InputSize,\r
@@ -3779,11 +3732,11 @@ struct _EDKII_CRYPTO_PROTOCOL {
   DEPRECATED_EDKII_CRYPTO_TDES_ECB_DECRYPT        DeprecatedTdesEcbDecrypt;\r
   DEPRECATED_EDKII_CRYPTO_TDES_CBC_ENCRYPT        DeprecatedTdesCbcEncrypt;\r
   DEPRECATED_EDKII_CRYPTO_TDES_CBC_DECRYPT        DeprecatedTdesCbcDecrypt;\r
-  /// AES\r
+  /// AES - ECB Mode is deprecated and unsupported\r
   EDKII_CRYPTO_AES_GET_CONTEXT_SIZE               AesGetContextSize;\r
   EDKII_CRYPTO_AES_INIT                           AesInit;\r
-  EDKII_CRYPTO_AES_ECB_ENCRYPT                    AesEcbEncrypt;\r
-  EDKII_CRYPTO_AES_ECB_DECRYPT                    AesEcbDecrypt;\r
+  DEPRECATED_EDKII_CRYPTO_AES_ECB_ENCRYPT         DeprecatedAesEcbEncrypt;\r
+  DEPRECATED_EDKII_CRYPTO_AES_ECB_DECRYPT         DeprecatedAesEcbDecrypt;\r
   EDKII_CRYPTO_AES_CBC_ENCRYPT                    AesCbcEncrypt;\r
   EDKII_CRYPTO_AES_CBC_DECRYPT                    AesCbcDecrypt;\r
   /// Arc4 - deprecated and unsupported\r