Class: Cipher::NihilistT

Inherits:
GenericBiCipher show all
Defined in:
lib/cipher.rb

Overview

Nihilist

The Nihilist cipher has gone through several variations over the original version by the Russians nihilists. Main characteristics is the checkerboard which shorten the cryptogram by having frequent letters use one letter as ciphertext and thus disturbing the recognition of bigrams/monograms.

The version used by USSR intelligence (aka spies) was using a super encryption by using an additive key (digit by digit without carryover)

One possible variation would be having a transposition as supercipher. This is the one here.

Instance Attribute Summary

Attributes inherited from GenericBiCipher

#key, #super_key

Instance Method Summary (collapse)

Methods inherited from GenericBiCipher

#decode, #encode

Methods inherited from SimpleCipher

#decode, #encode

Constructor Details

- (NihilistT) initialize(key, super_key = '')

initialize



302
303
304
# File 'lib/cipher.rb', line 302

def initialize(key, super_key = '')
  super(Cipher::StraddlingCheckerboard, key, Cipher::Transposition, super_key)
end