Exemplo n.º 1
0
# -*- coding: utf-8 -*-
"""
Created on Fri May 29 21:09:16 2020

@author: omeil
"""

from Master import Encrypt
from Master import Decrypt

S = "SECRETMESSAGETHISISVERYIMPORTANTDONOTTELLANYONEWHATTHISSAYS"
key = "EXPO"

enc = Encrypt(S, verbose=1)

enc.encodeAutokey(key)

#============================================================================

S2 = "WBRFWXOVWLMKWLHOWBZDWZQDQGMZFPBKWOAHWHRZETRJZNRUVNXPOILLHGK"

dec = Decrypt(S2, verbose=1)

dec.decodeAutokey(key)
Exemplo n.º 2
0
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 27 21:23:42 2020

@author: omeil
"""
from Master import Encrypt
from Master import Decrypt

S = "SECRETMESSAGETHISISVERYIMPORTANTDONOTTELLANYONEWHATTHISSAYS"
key = "EXPO"

enc = Encrypt(S, verbose = 1)

enc.encodeVigenere(key)

#============================================================================

S2 = "WBRFIQBSWPPUIQWWWFHJIONWQMDFXXCHHLCCXQTZPXCMSKTKLXIHLFHGEVH"

dec = Decrypt(S2, verbose = 1)

dec.decodeVigenere(key)
Exemplo n.º 3
0
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 18 17:27:44 2020

@author: omeil
"""

from Master import Encrypt
from Master import Decrypt

S = "SECRETMESSAGETHISISVERYIMPORTANTDONOTTELLANYONEWHATTHISSAYS"

k1 = 5
k2 = 9
k3 = 3
k4 = 6

enc = Encrypt(S, verbose=1)

enc.encodeHill(k1, k2, k3, k4)

#============================================================================

S2 = "WAHEJWSISGCKJWDRGYTYRKKQNWPORFCXLPJTGPPADHVBFQKOJVGPDRSGIOLK"

dec = Decrypt(S2, verbose=1)

dec.decodeHill(k1, k2, k3, k4)
Exemplo n.º 4
0
# -*- coding: utf-8 -*-
"""
Created on Tue June 9 14:06:47 2020

@author: omeil
"""

from Master import Encrypt
from Master import Decrypt

S = "SECRETMESSAGETHISISVERYIMPORTANTDONOTTELLANYONEWHATTHISSAYS"
e = 769

enc = Encrypt(S, verbose=1)

enc.encodePohligHellman(e)

#============================================================================

S2 = "CDCHCEHDAAHJBCCHBHFDAGDJAAHJBADFAJFICHJCAJJBBHACBGBDCDIEAEEDBBIACHEIBJEHCFIEBBBHCDIBCCIBCBCHBDCAACCJCFIEBADFBHFDABCIADFI"

dec = Decrypt(S2, verbose=1)

dec.decodePohligHellman(e)
Exemplo n.º 5
0
# -*- coding: utf-8 -*-
"""
This program is an example of how to use the Master program 
to encrypt and decrypt using an Affine Cipher.
"""
from Master import Encrypt
from Master import Decrypt

S = "SECRETMESSAGETHISISVERYIMPORTANTDONOTTELLANYONEWHATTHISSAYS"
m = 3
n = 7

enc = Encrypt(S, verbose=1)

enc.encodeAffine(m, n)

#============================================================================

S2 = "JTNGTMRTJJHZTMCFJFJSTGBFRAXGMHUMQXUXMMTOOHUBXUTVCHMMCFJJHBJ"

dec = Decrypt(S2, verbose=1)

dec.decodeAffine(m, n)
Exemplo n.º 6
0
# -*- coding: utf-8 -*-
"""
Created on Wed May 20 21:36:03 2020

@author: omeil
"""
from Master import Encrypt
from Master import Decrypt

S = "SECRETMESSAGETHISISVERYIMPORTANTDONOTTELLANYONEWHATTHISSAYS"
perm = [2, 4, 1, 3]

enc = Encrypt(S, verbose=1)

enc.encodePermutation(perm)

#============================================================================

S2 = "ERSCTEEMSGSATIEHIVSSRIEYPRMOATTNOODNTLTEAYLNNWOEATHTISHSYXAS"

dec = Decrypt(S2, verbose=1)

dec.decodePermutation(perm)
Exemplo n.º 7
0
# -*- coding: utf-8 -*-
"""
Created on Wed June 3 19:28:45 2020

@author: omeil
"""
from Master import Encrypt
from Master import Decrypt

key = "GERMANY"
S = "SECRETMESSAGETHISISVERYIMPORTANTDONOTTELLANYONEWHATTHISSAYS"

enc = Encrypt(S, verbose=1)

enc.encodeGedeFu18(key)

#============================================================================

S2 = "AAFGFVXXVXGFVGGDFDFGVAFFXADXFAFDXDFFFDXXDDGAVGVAXAXGGDFXVDVDVAFDXAFDXGDGDFXDAVAXXXAFDFGFDXDDVXVGFDGGXDDDXAXGGFGAFDVAXDX"

dec = Decrypt(S2, verbose=1)

dec.decodeGedeFu18(key)
Exemplo n.º 8
0
# -*- coding: utf-8 -*-
"""
Created on Wed May 30 21:21:21 2020

@author: omeil
"""

from Master import Encrypt
from Master import Decrypt

S = "SECRETMESSAGETHISISVERYIMPORTANTDONOTTELLANYONEWHATTHISSAYS"
keyword = "MENTAL"

enc = Encrypt(S, verbose=1)

enc.encodeKCT(keyword)

#============================================================================

S2 = "EASYTNLEHSEETVPTTYASTGIIAOAWIXSMESMNTNHSCSHEODEOTARSIRROLNTY"

dec = Decrypt(S2, verbose=1)

dec.decodeKCT(keyword)