Cipher Fayadh
Block cipher Feistel 128-bit dengan fungsi putaran sigma-delta
Loading...
Searching...
No Matches
BlockCipher Class Referenceabstract

Interface block cipher 128-bit. More...

#include <cipher.hpp>

Inheritance diagram for BlockCipher:
CustomCipher

Public Member Functions

virtual void encrypt_block (const uint8_t *in, uint8_t *out) const =0
 Enkripsi satu blok.
virtual void decrypt_block (const uint8_t *in, uint8_t *out) const =0
 Dekripsi satu blok.

Detailed Description

Interface block cipher 128-bit.

Mode operasi (ECB, CBC, CFB, OFB, CTR) hanya bergantung pada kelas ini, sehingga cipher lain bisa dipasang tanpa mengubah kode mode.

in dan out harus menunjuk ke BLOCK_SIZE byte. Keduanya boleh sama persis (in-place), tetapi tidak boleh overlap sebagian.

Member Function Documentation

◆ decrypt_block()

virtual void BlockCipher::decrypt_block ( const uint8_t * in,
uint8_t * out ) const
pure virtual

Dekripsi satu blok.

Parameters
[in]inCiphertext, BLOCK_SIZE byte.
[out]outPlaintext, BLOCK_SIZE byte.

Implemented in CustomCipher.

◆ encrypt_block()

virtual void BlockCipher::encrypt_block ( const uint8_t * in,
uint8_t * out ) const
pure virtual

Enkripsi satu blok.

Parameters
[in]inPlaintext, BLOCK_SIZE byte.
[out]outCiphertext, BLOCK_SIZE byte.

Implemented in CustomCipher.


The documentation for this class was generated from the following file: