AES-128-WRAP-PAD-INV ENCRYPTION TOOL
Other Crypto Algorithms
AES-128-CBC AES-128-CBC-CTS AES-128-CBC-HMAC-SHA1 AES-128-CBC-HMAC-SHA256 AES-128-CCM AES-128-CFB AES-128-CFB1 AES-128-CFB8 AES-128-CTR AES-128-ECB AES-128-GCM AES-128-GCM-SIV AES-128-OCB AES-128-OFB AES-128-SIV AES-128-WRAP AES-128-WRAP-INV AES-128-WRAP-PAD AES-128-WRAP-PAD-INV AES-128-XTS AES-192-CBC AES-192-CBC-CTS AES-192-CCM AES-192-CFB AES-192-CFB1 AES-192-CFB8 AES-192-CTR AES-192-ECB AES-192-GCM AES-192-GCM-SIV AES-192-OCB AES-192-OFB AES-192-SIV AES-192-WRAP AES-192-WRAP-INV AES-192-WRAP-PAD AES-192-WRAP-PAD-INV AES-256-CBC AES-256-CBC-CTS AES-256-CBC-HMAC-SHA1 AES-256-CBC-HMAC-SHA256 AES-256-CCM AES-256-CFB AES-256-CFB1 AES-256-CFB8 AES-256-CTR AES-256-ECB AES-256-GCM AES-256-GCM-SIV AES-256-OCB AES-256-OFB AES-256-SIV AES-256-WRAP AES-256-WRAP-INV AES-256-WRAP-PAD AES-256-WRAP-PAD-INV AES-256-XTS ARIA-128-CBC ARIA-128-CCM ARIA-128-CFB ARIA-128-CFB1 ARIA-128-CFB8 ARIA-128-CTR ARIA-128-ECB ARIA-128-GCM ARIA-128-OFB ARIA-192-CBC ARIA-192-CCM ARIA-192-CFB ARIA-192-CFB1 ARIA-192-CFB8 ARIA-192-CTR ARIA-192-ECB ARIA-192-GCM ARIA-192-OFB ARIA-256-CBC ARIA-256-CCM ARIA-256-CFB ARIA-256-CFB1 ARIA-256-CFB8 ARIA-256-CTR ARIA-256-ECB ARIA-256-GCM ARIA-256-OFB CAMELLIA-128-CBC CAMELLIA-128-CBC-CTS CAMELLIA-128-CFB CAMELLIA-128-CFB1 CAMELLIA-128-CFB8 CAMELLIA-128-CTR CAMELLIA-128-ECB CAMELLIA-128-OFB CAMELLIA-192-CBC CAMELLIA-192-CBC-CTS CAMELLIA-192-CFB CAMELLIA-192-CFB1 CAMELLIA-192-CFB8 CAMELLIA-192-CTR CAMELLIA-192-ECB CAMELLIA-192-OFB CAMELLIA-256-CBC CAMELLIA-256-CBC-CTS CAMELLIA-256-CFB CAMELLIA-256-CFB1 CAMELLIA-256-CFB8 CAMELLIA-256-CTR CAMELLIA-256-ECB CAMELLIA-256-OFB CHACHA20 CHACHA20-POLY1305 DES-EDE-CBC DES-EDE-CFB DES-EDE-ECB DES-EDE-OFB DES-EDE3-CBC DES-EDE3-CFB DES-EDE3-CFB1 DES-EDE3-CFB8 DES-EDE3-ECB DES-EDE3-OFB DES3-WRAPThe AES-128-WRAP-PAD-INV algorithm is a cryptographic procedure used for secure key unwrapping in accordance with the Advanced Encryption Standard (AES) specifications. It operates on 128-bit keys and applies a padding mechanism to ensure the integrity of wrapped data. This algorithm is specifically designed to reverse the AES key wrapping with padding process, recovering the original key material from an encrypted and padded input.
Input Requirements
The algorithm requires an input consisting of a wrapped key block along with an initial key encryption key (KEK) of 128 bits. The input key block may include padding added during the wrapping process to align the data to the required block size. Correct input formatting is crucial for successful unwrapping.
Core Procedure
The core steps of AES-128-WRAP-PAD-INV include:
- Initialization: The algorithm sets up the AES cipher in ECB mode using the 128-bit KEK. It also determines the length of the input wrapped key and identifies any padding bytes appended during the wrapping process.
- Iterative Unwrapping: The wrapped key is divided into 64-bit blocks. The algorithm iteratively decrypts these blocks in a specific order, reversing the sequence used during key wrapping. Each iteration applies AES decryption while adjusting intermediate results to remove the effect of previous encryption rounds.
- Padding Verification: After unwrapping, the algorithm examines the last byte of the decrypted output to determine the padding length. It validates that all padding bytes are consistent with the PKCS#7 padding standard, ensuring data integrity and correctness.
- Key Reconstruction: Once padding is verified, the algorithm reconstructs the original key from the decrypted blocks. It removes padding bytes and concatenates the intermediate decrypted blocks to restore the full-length original key material.
Output
The output of AES-128-WRAP-PAD-INV is the original unwrapped key, free from padding and fully restored to its original size. Any failure in padding verification or block decryption will result in an error, indicating that the wrapped input may have been tampered with or corrupted.
Security Considerations
This algorithm provides strong security for key unwrapping by leveraging AES-128 encryption and strict padding verification. It is essential to ensure that the KEK remains confidential, as its compromise would allow unauthorized access to the wrapped key material. Implementation must prevent side-channel leaks during the iterative decryption process to maintain robustness against timing and cache-based attacks.