Encryption (Step By Step)

public string vernashCrypt(byte[] text, string key, bool saveToFile, string filename)

Vernash(“Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.”, “passphrase”) ==>

Step 1: randomExpansion(byte[] text)

randomExpansion(“Loerm ipsum...”) =>

Example: randomExpansion("ABC") =>

Step 2: expandText(byte[] text)

expandText() =>

expandedText = "0D3F531C61113D283F2E08183C2D0070492A2E471F4E021E23411B542F3D5718155D031D076C5910195B1D03124F6508610461..."

Step 3: scrambleText(string text, string key)

scrambleText(“0D3F531C61113D283F2E08183C2D0070492A2E471F4E02...”, “passphrase”) =>

Step 3,5: genKeyPos(int nPos, string key)

genKeyPos(468, “passphrase”) =>

Step 4: hashum(string sWord, int iTextLength)

hashum(expandText( “passphrase” ), textLen) =>



Step 5: char RotCharUp(int value, char lBound, char rBound)

Final: Rotating chars

Now we have a pseudorandom, expanded and shuffled text and an Hash of the same length (468 bytes): we can rotate them!


  1. Rotate UP('A' + 'X' in the range A-Z) => 'S'

  2. Rotate DOWN('S' - 'X' in the range A-Z) => we should get: 'A'


We get: 'A'! Everything works!!!