bifid_delastelle: bifid_delastelle

View source: R/bifid_delastelle.R

bifid_delastelleR Documentation

bifid_delastelle

Description

The bifid cipher is an encryption method that combines a substitution with a Polybius square and a transposition, and uses fractionation to achieve diffusion. It was invented by Felix Delastelle.

Usage

bifid_delastelle(input, key = "", period = 100, encrypt = TRUE)

Arguments

input

Word or phrase to be encrypted, or character vector with the sequence of coordinate numbers if we need to decrypt

key

key Word for creating the modified Polybius square

period

period length for splitting the input phrase. If greater or equal to the length of the input then the split is not executed

encrypt

If 'TRUE' (default), the program ciphers the input word, If 'FALSE', the program decrypts it.

Value

a string

References

https://en.wikipedia.org/wiki/Bifid_cipher

Examples

bifid_delastelle("dcode", key = "secret", period = 3, encrypt = TRUE)
bifid_delastelle("apiai", key = "secret", period = 3, encrypt = FALSE)


ciphertext documentation built on April 4, 2025, 12:17 a.m.