Skip to content

Latest commit

 

History

History
48 lines (48 loc) · 1.5 KB

README.md

File metadata and controls

48 lines (48 loc) · 1.5 KB

ome useful ctf crypto functions:

  • atbash_encode(m)
  • atbash_decode(c)
  • urlencode(m)
  • urldecode(c)
  • morseencode(decoded)
  • morsedecode(encoded)
  • shift_encrypt(m,k)
  • shift_decrypt(c,k)
  • zhalan_encrypt(m,k)
  • zhalan_decrypt(c,k)
  • caesar_128_encrypt(m,k)
  • caesar_128_decrypt(c,k)
  • caesar_128_brute(c,match_str)
  • caesar_128_bruteall(c)
  • rot13(m)
  • caesar_alphabet_encrypt(m,k)
  • caesar_alphabet_decrypt(c,k)
  • caesar_alphabet_brute(c,match_str)
  • caesar_alphabet_bruteall(c)
  • substitution_encode(m,k,origin="abcdefghijklmnopqrstuvwxyz")
  • substitution_decode(c,k,origin="abcdefghijklmnopqrstuvwxyz")
  • affine_encode(m,a,b,origin="abcdefghijklmnopqrstuvwxyz")
  • affine_decode(c,a,b,origin="abcdefghijklmnopqrstuvwxyz")
  • affine_brute(c,origin="abcdefghijklmnopqrstuvwxyz")
  • affine_guessab(m1,c1,m2,c2,origin="abcdefghijklmnopqrstuvwxyz")
  • gen_cheese_map(k,use_Q=True,upper=True)
  • playfair_encode(m,k="",cheese_map=[])
  • playfair_decore(c,k="",cheese_map=[])
  • polybius_encode(m,k="",name="ADFGX",cheese_map=[])
  • polybius_decode(c,k="",name="ADFGX",cheese_map=[])
  • c01248_decode(c)
  • des_encrypt_ecb(m,key)
  • des_decrypt_ecb(c,key)
  • des_encrypt_cbc(m,key,iv)
  • des_decrypt_ecb(c,key,iv)
  • aes_encrypt_ecb(m,key)
  • aes_decrypt_ecb(c,key)
  • aes_encrypt_cbc(m,key,iv)
  • aes_decrypt_ecb(c,key,iv)
  • cbc_bit_attack_mul(c,m,position,target)
  • cbc_chosen_cipher_recover_iv(cc,mm)
  • modinv(a,n)
  • gcd(a,b)
  • relate_message_attack(a, b, c1, c2, n)
  • brute_m_with_low_e(c,n,e)
  • same_n_sttack(n,e1,e2,c1,c2)
  • broadcast_attack(data)