Cipher Fayadh
Block cipher Feistel 128-bit dengan fungsi putaran sigma-delta
Loading...
Searching...
No Matches
permutation.hpp File Reference

Permutasi bit 64 bit (transposisi) untuk layer akhir F. More...

#include <cstdint>

Go to the source code of this file.

Functions

uint64_t permute_bits (uint64_t x)
 Permutasi bit: bit posisi i dipindah ke posisi (i * PERM_MULT) mod 64.

Variables

constexpr int PERM_MULT = 41

Detailed Description

Permutasi bit 64 bit (transposisi) untuk layer akhir F.

Function Documentation

◆ permute_bits()

uint64_t permute_bits ( uint64_t x)

Permutasi bit: bit posisi i dipindah ke posisi (i * PERM_MULT) mod 64.

Parameters
[in]xNilai 64 bit.
Returns
Nilai dengan bit-bit yang sudah dipermutasi.

Variable Documentation

◆ PERM_MULT

int PERM_MULT = 41
constexpr

Pengali permutasi. Harus ganjil (relatif prima dengan 64) dan 1 <= m <= 63 agar bijektif. 41 dipilih karena 8 bit dari satu byte tersebar ke 8 byte berbeda.