当前位置:网站首页>CTF crypto (I) some simple encoding and encryption

CTF crypto (I) some simple encoding and encryption

2022-06-26 04:16:00 eliforsharon

Base64

be used for http In the environment, the longer identification information

The basic rule

  1. Change every three octets into four six bytes , Add two... To each byte high order 0, Examples are as follows :
    01111001 01101111 01110101
    011110 010110 111101 110101
    00011110 00010110 00111101 00110101
    According to Base64 The alphabet gets the following characters
    e W 9 1
  2. Every time 76 Characters plus a newline
  3. Handle the last Terminator
    At the end of the end, you can't put together three bytes , Then take ’=' The symbol complements the four bytes that have not been completed after conversion

variant

URL improvement Base64 code , Fill at the end ’=‘ Number , And encode the ’+‘ and ’/‘ Change the number to ’-‘ and ’_’, So as to avoid URL The conversion of codec and database storage .
Regular expression improvements will ’+‘ and ’/‘ Changed to ’!‘ and ’-’

Idempotent encryption

A very simple encryption method , There are... Letters in English 26 That's why 2 Of 0、1、2、3、4 The power can express 31 A unit , The alphabetic sequence number encryption is represented by binary powers .
Such as 15 = 2 0 + 2 1 + 2 2 + 2 3 15=2^0+2^1+2^2+2^3 15=20+21+22+23, So because O This letter is on the... Of the alphabet 15 position , So it can be binary idempotent 0123 To encrypt the presentation .

Fence code

Ordinary fence

Divide plaintext passwords into N In groups , Then start with the first word of each group , Connect the words in the same position in each group , Finally form a meaningless sentence .
Such as Ilovebutdontknow Divide into 4 A group of letters
Ilov ebut dont know
Then start with the first word of each group , Connect the words in the same position in each group .
ledk lbon ouno vttw
Finally form a meaningless sentence
ledklbonounovttw

W type

The string loveuloveu When grouping, the following W Type format
I . . . u . . . e .
. o . e . l . v . u
. . v . . . o . . .
Then link it together to form the following string lueoelvuvo
Decrypt by writing code , Or decrypt the following URL http://www.atoolbox.net/Tool.php?Id=777

Bacon code

A kind of use a,b Steganography in which two letters are used instead of the other letters .
Each letter corresponds to 5 individual a , b a,b a,b A group of letters , Such as A/a - aaaaa

原网站

版权声明
本文为[eliforsharon]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202180536406919.html