StringTools - Maple Programming Help

Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Statistics : StringTools/Kasiski

StringTools

 Kasiski
 compute the Kasiski test on a string

 Calling Sequence Kasiski( s )

Parameters

 s - Maple string

Description

 • The Kasiski(s) command computes the so-called Kasiski-test for the string s. This is defined to be the least common multiple of the lengths of repeated substrings of s.
 • In elementary cryptanalysis, it is often used in conjunction with the index of coincidence to attempt to determine the number of alphabets used to encipher a plain text with a polyalphabetic substitution cipher.

Examples

 > $\mathrm{with}\left(\mathrm{StringTools}\right):$
 > $\mathrm{Kasiski}\left("abcde"\right)$
 ${0}$ (1)
 > $\mathrm{Kasiski}\left("abcdeabcdabc"\right)$
 ${1}$ (2)