LibCrypto: Implement AES-KW

Add the AES-KW (Key Wrap) implementation as of
https://www.rfc-editor.org/rfc/rfc3394#section-4.2.

Tests are taken from section 4 of RFC3394.
This commit is contained in:
devgianlu 2024-12-16 19:13:26 +01:00 committed by Jelle Raaijmakers
commit 1d94d678b3
Notes: github-actions[bot] 2024-12-17 10:01:34 +00:00
3 changed files with 290 additions and 1 deletions

View file

@ -12,6 +12,7 @@
#include <LibCrypto/Cipher/Mode/CBC.h>
#include <LibCrypto/Cipher/Mode/CTR.h>
#include <LibCrypto/Cipher/Mode/GCM.h>
#include <LibCrypto/Cipher/Mode/KW.h>
namespace Crypto::Cipher {
@ -96,6 +97,7 @@ public:
using CBCMode = CBC<AESCipher>;
using CTRMode = CTR<AESCipher>;
using GCMMode = GCM<AESCipher>;
using KWMode = KW<AESCipher>;
constexpr static size_t BlockSizeInBits = BlockType::BlockSizeInBits;