Using Substitution Cipher Instead Of Aes


em5

Recommended Posts

On this forum, someone(RomanZ?) recomemded not to use encrypted secret keys (stars with "D" instead of "A") as they require more work (checksum) and hence more load on ARMs.

 

I just got an idea that if substitution cipher is used instead of AES, is there any way of not having to do more checksums (assuming sum of all bytes is the checksum, it wont change even after encryption).

And the encryption would be fast as well and it is compressible as well. And if another encryption is done after compression, it is more hard to break I guess.

 

I am not an expret, just some thoughts.

Any possibility?

 

Link to comment
Share on other sites

em5,

 

Encrypted nodes creates additional load to ARM CPUs not because of calculating some check sum, but because of the very fact of necessity to decrypt data. ARM CPUs has no built-in hardware decryption capability, therefore the decryption is done by CPU itself. While decrypting of humble amount of data may show no big difference, any significant amount will overload CPU greatly.

 

And it does not matter a lot which algorithm we are going to utilize unless it has hardware support.

Link to comment
Share on other sites

With substitution cipher (a 256 bytes key, which maps what byte swaps to what other byte), it is just a simple assignment like

*ciphertext++ = key[*plaintext++];

inside the loop. I don't know how much hardware support is going to help in this regard.

Is AES (with hardware support) faster than this?

Link to comment
Share on other sites

Oh, I see what you are saying now. I thought that you mean something else, like GOST28147-89, which is also sort of substitution cipher.

 

There is no much point in such encryption as it is extremely weak and the hack time is measured with seconds for average PC. As for the speed of hardware-accelerated AES - it is pretty much like putting some data in the memory and then reading it (from speed POV).

Link to comment
Share on other sites

Hack time in seconds? I don't think its that much easy. 256 byte key (256! comibations) gives 1684 bit entrophy, which is huge for a brute force attack. Although I am not an expert on encryption, I think the only attack on substitution cipher is frequency analysis, that too probably done on (uncompressed) english text. If text input is compressed (lightning fast compression exists: LZ4 or LZ4_HC) before substitution, even the odd frequency analysis can't be done.

Link to comment
Share on other sites

em5,

 

Several statements against direct substitution cypher:

1. The frequency analysis is extremely fast when you have a lot of encrypted data (and BTSync is intended to transfer gigs of data).

2. The computer data is strictly determined (99% of file types have a header, which is totally the same for same file types) which makes frequency analysis even easier.

3. The archived file still have some determined service data - which would be easy subject for attack

4. Keeping in mind that deflation algorithm is very fast - the frequency attack can be done on already archived data.

5. Finally, the AES known to be cryptographically strong, while direct substitution cypher - not.

 

I don't think it is worth to trade security for performance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.