|
Cipher Fayadh
Block cipher Feistel 128-bit dengan fungsi putaran sigma-delta
|
Implementasi Cipher-based Message Authentication Code (CMAC / OMAC1, RFC 4493) dan derivasi pemisahan kunci (key separation) menggunakan BlockCipher 128-bit. More...
Go to the source code of this file.
Classes | |
| class | Cmac |
| Generator dan verifikator Message Authentication Code berbasis CMAC (RFC 4493). More... | |
| struct | DerivedKeys |
| Struktur pasangan kunci hasil derivasi untuk enkripsi dan autentikasi. More... | |
Functions | |
| void | cmac_detail::dbl (const uint8_t in[16], uint8_t out[16]) |
| Operasi doubling dalam medan GF(2^128) pada blok 16-byte big-endian. | |
| DerivedKeys | derive_keys (const BlockCipher &master_cipher) |
| Menghasilkan kunci enkripsi dan kunci MAC terpisah dari master cipher (KDF berbasis PRF). | |
Variables | |
| constexpr size_t | MAC_TAG_SIZE = 16 |
| Ukuran tag MAC dalam byte (128 bit / 16 byte). | |
Implementasi Cipher-based Message Authentication Code (CMAC / OMAC1, RFC 4493) dan derivasi pemisahan kunci (key separation) menggunakan BlockCipher 128-bit.
| void cmac_detail::dbl | ( | const uint8_t | in[16], |
| uint8_t | out[16] ) |
Operasi doubling dalam medan GF(2^128) pada blok 16-byte big-endian.
Menggeser seluruh blok 128 bit ke kiri sebesar 1 bit secara branch-free. Jika MSB bernilai 1, byte terakhir (byte 15) di-XOR dengan konstanta Rb = 0x87.
| [in] | in | Blok masukan, 16 byte. |
| [out] | out | Blok hasil doubling, 16 byte. |
| std::invalid_argument | jika in atau out bernilai nullptr. |
| DerivedKeys derive_keys | ( | const BlockCipher & | master_cipher | ) |
Menghasilkan kunci enkripsi dan kunci MAC terpisah dari master cipher (KDF berbasis PRF).
enc = E_master(00 00 ... 00 01) mac = E_master(00 00 ... 00 02)
| [in] | master_cipher | Block cipher yang dikunci dengan master key. |
enc dan mac yang berbeda satu sama lain.