blog.area23.at - a simple url encoder/decoder

 a simple url encoder/decoder
 https://blog.area23.at

Labels

Wirtschaft (156) Pressefreiheit (149) Österreich (125) IT (109) code (69) Staatsschulden (37) EZB (27) Pensionssystem (16) Geopolitik (11)

2024-04-25

Making symmetric cipher encryption great again [updated]

Prolog

When students in the 2nd semester in year 1992 type on the laptop during the lecture or start talking, Professor Gerd Baron always repeated very loudly that's what's all about:

Wir haben hier ein Universum und es geht um 
die Anzahl der Anordnungen der Elemente einer endlichen Menge.

We have a universe here and 
it's all about of the number of combinations of items in a finite set.

Professor Gerd Baron of Mathematics modified math lecture for computer scientists, where he claimed graph theory and combinatorics and weighted models (for traveling salesmen or ip routing graph) to understand better things we will need later (like equal costs => multipath).



In the years 2021-2023 [ CV ] I coded after an idea of Georg Toth the SUPU (SUdocu PUzzle) game. For the "Game Automation" mode I needed a smart permutation algorithm, where I remembered Professor Baron.


After meeting my old friend Math and Physics Professor Michael F. (worked also for finance in the City of London) and we talked about inversible matrixes, I was penetrated once in night with some gadgets and I spoke out that idea. But instead of giving the information only to unknown (maybe russian or far right spies), I wrote that article down, so that everybody also all partners in the US will recognize this.

plain text ⟶ 3DES PBox → AES → 2blowfish ⟶ cipher text
cipher text ⟶ 2blowfish → AES → 3DES SBox ⟶ plain text

plain text ⟶ AES ⟶ 2blowfish ⟶ 3DES PBox (scrambled) ⟶ cipher text
cipher text ⟶ 3DES  SBox(scrambled) → 2blowfish → AES ⟶ plain text

you also can remix it per good random numbers like
3DES = 0x1
AES = 0x2
2Fish = 0x4
Serpent = 0x8

So 0xBC for encryption would mean 0xCB for decryption
plain ⟶ (3DES→AES→Serpent) ⟶ (2Fish→Serpent) ⟶ encrypted
encrypted ⟶ (Serpent→2Fish) ⟶ (Serpent→AES→3DES) ⟶ plain 

with 2 bytes strong keys (negoatiated randomized at handshake) you're quiet secure.


Mathematical theorem in functional theory would be:
Consider that there are full bijective desterministic inversible functions, 
where inverse function to y=F(x,...) is 
x =f(y,..), => 
then inverse function to F( G( H( I( J( K( L( M( N(x, ...)))))))))
is x = n( m( l( k( j( i( h( g( f(y,...))))))))).

approach for a mathematical proof
You can see a mapping from ascii-8 → ascii-8 
also always as Matrix from R256 ➝ R256 
or hexadecimal from Rx100 ➝ Rx100
Functions also can be normal math operations of elements in 
e.g.

n ... number to symm crypt
k ... key to for encryptin
r ... result
n, k ∈ ℝ, n!=0,k!=0, n!=1, k!=1
E,e.F,f,G,h,H,h 

r0 = E(k) = k^n0  n0 = e(k) = ( ln(r0) / ln(k) )
r1 = F(k) = n1^k  n1 = f(k) = ( k√r1 )
r2 = G(k) = n2*k ⇔ n2 = g(k) = ( r2 / k )
r3 = H(k) = n3+k ⇔ n3 = h(k) = ( r3 - k) 

Try it out on area23: https://area23.at/net/Crypt/CoolCrypt.aspx
Github repository: github.com/heinrichelsigan/area23.at/


A simple matrix encryption algorithm by myself:

I found a simple matrix symmetric encryption algorithm, that works as simple symmetric cipher
with NxN Matrix trans, after asking that question here on  math.stackexchange.com/questions/4915786/ 
Later I developed a very simple Block Chipher Algorithm called ZenMatrix (to show, that I can write a very simple symmetric Block Cipher for encryption and decryption on my own),

R3 ➝ R3: v(3) x M(3,3) = v(3)

⎡ 1 ⎤    ⎡ 0 1 0 ⎤    ⎡ 2 ⎤ 
⎢ 2 ⎥ x  ⎢ 0 0 1 ⎥ =  ⎢ 3 ⎥  
⎣ 3 ⎦    ⎣ 1 0 0 ⎦    ⎣ 1 ⎦ 
The inverse matrix for reverse symmetric encryption would be:
⎡ 2 ⎤    ⎡ 0 0 1 ⎤    ⎡ 1 ⎤ 
⎢ 3 ⎥ x  ⎢ 1 0 0 ⎥ =  ⎢ 2 ⎥  
⎣ 1 ⎦    ⎣ 0 1 0 ⎦    ⎣ 3 ⎦ 
ZenMatrix symetric chiffre encryption

More symmetric cipher algos are now availible!

First I wanted to make the symmetric cipher pipe only with AES, Blowfish, 2-Fish, 3-DES and  ZenMatrix, but then I detected the Legion of Bouncy-Castle, which offered several encryptions in a opensource library also availible here at git: https://github.com/bcgit
I rewrote Area23.At.Mono with the Bouncy-Castle wrapper of for 3DES, 2FISH, 3FISH, AES, Rijndael (same as AES) and Serpent.

Later I added the following symmetric cipher encryption / decryption algorirhms to the symm cipher pipeline, because I have seen them in the bouncy-castle package:
Camellia, Cast[56], Gost28147, Idea, RC[26], RC532, Seed, Skipjack, Tea, Tnepres, XTea.

PermAgainCrypt [WinForm Demo]

I wrote a simple WinForm with a reduced framework code, to understand the basic symm cipher pipe encryption, here on git: https://github.com/heinrichelsigan/PermAgainCrypt

https://github.com/heinrichelsigan/PermAgainCrypt

How many variations are possible?

With a set of 2 symmetric cipher algos without reusing the same algo twice, it would be 2! = 2, with reusing same algo twice (e.g. blowfish => blowfish =>) 2^2 = 4. With 8 symmetric cipher algos without reusing the same algo, it would be 8! = 40.320, with reusing the same algo twice 8^8 = 16.777.216.
In the symmetric cipher pipe above with now 21 symmetric cipher algortihms it would be 21^8 = 37.822.859.361, because I limited the pipeline length to 8 stages.

Why I'm publishing this article?

Unfortunately, since I catched a schizoaffective disorder 2007, I have sometimes the tendency to talk loudly and am often paranoid about being wiretapped.
Existing even bigger companies, were I was employed, (I told them about my problem since 2007) meaned, that I didn't break the compliance in that case, because I can assume that we have not the GDR with Stasi here and loudly repeating fraud detection rules at home isn't a crime. Once I feeled very painful and a spoke out loudly my idea of better AES. To avoid, that only some people could get it, I wrote a simple prototype and then sended this article to old friends, who work at US companies.


Epilog

I learned the simplest blockcipher from my friend Helmar A., when we played Ninja at 12 years by making crypto pentacle:
Chiffre Pentacle


Keine Kommentare:

Kommentar veröffentlichen