freq_analysis: Frequency analysis

Description Usage Arguments Value Examples

View source: R/classic.R

Description

Caesar cipher can be decrypted without the key if the language of the message is known.

Usage

1
freq_analysis(msg, freq)

Arguments

msg

Ciphertext.

freq

Letter's frequency in the message's language.

Value

Caesar cipher secret key. Sorted according to their likelihood.

Examples

1
2
3
4
5
crypto <- caesar(msg_en,3)
crypto
info <- freq_analysis(preprocess(crypto),freqs$en)
info
caesar(crypto,info[1],decrypt=TRUE)

JorgeRiescoDavila/somecrypto documentation built on Jan. 10, 2022, 1:49 a.m.