mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:47:35 +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
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