mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibCrypto: Add CTR cipher mode
Kernel: Changed fortuna implementation to use CTR mode instead of manually implementing a counter.
This commit is contained in:
parent
0f32155fa4
commit
2e8cfe5435
Notes:
sideshowbarker
2024-07-19 05:22:51 +09:00
Author: https://github.com/petelliott
Commit: 2e8cfe5435
Pull-request: https://github.com/SerenityOS/serenity/pull/2613
Reviewed-by: https://github.com/alimpfard ✅
3 changed files with 153 additions and 26 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibCrypto/Cipher/Cipher.h>
|
||||
#include <LibCrypto/Cipher/Mode/CBC.h>
|
||||
#include <LibCrypto/Cipher/Mode/CTR.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace Cipher {
|
||||
|
@ -110,6 +111,7 @@ private:
|
|||
class AESCipher final : public Cipher<AESCipherKey, AESCipherBlock> {
|
||||
public:
|
||||
using CBCMode = CBC<AESCipher>;
|
||||
using CTRMode = CTR<AESCipher>;
|
||||
|
||||
constexpr static size_t BlockSizeInBits = BlockType::BlockSizeInBits;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue