3

Notice: I'm doing this to learn. I know not to use a homemade cipher for anything that requires security. I also have heard before I'm not supposed to be trying this, but I learn best through trying to make things from scratch, even if I fail.

Ciphers are incredibly complex, to the point most people probably don't appreciate them, myself included. Trying to make one from scratch might help with this, so I'm looking for a list of qualities/achievables that can be worked towards for years to come.

This is the list so far, for a good block cipher at different learning levels:

Beginner :

  1. Encrypted output can not be broken by hand. The level of encryption during WW1 or so.

Intermediate :

  1. Changing a single bit in the input should have a 50% average chance of changing each bit of output.

  2. Each byte should have a 1/256 chance of not changing (basically #1 ^ 8)

  3. The number of bytes found in similar by search should be very few (I need to write down the math, but my estimate is around 5%)

Advanced:

  1. Not sure yet?

Expert :

  1. Immune to Differential cryptanalysis?

This list is very incomplete, but gives an example of what I'm looking for.

What is your list of achievable qualities for block cipher at different skill levels?

Ella Rose
  • 19,603
  • 6
  • 53
  • 101
Seph Reed
  • 205
  • 1
  • 7
  • 8
    "I learn best through trying to make things from scratch, even if I fail"; in my experience, you learn best by breaking your homemade ciphers; putting a cipher together teaches you not much at all; coming up with clever strategies to break stuff teaches you far more than putting them together... – poncho Aug 03 '16 at 19:39
  • @poncho I agree. I intend to do both, but am focusing on what's in grasp right now. – Seph Reed Aug 03 '16 at 19:43
  • 5
    Asking vague open-ended questions here probably won't get you very far. If you're interested in learning about crypto, there are some excellent courses available online. Try this one for example/ – r3mainer Aug 03 '16 at 19:55
  • I'd suggest to take a course (e.g. Cryptography on the Coursera site) or join a crypto challenge (e.g. the matasano crypto challenge). With this approach you'll be trying to learn step by step and breaking things. During that you will build the ciphers / hashes more or less the way you've described. For me - it was great to understand how things work and how much I still don't understand – gusto2 Aug 04 '16 at 07:37

1 Answers1

16

I don't think we can really separate things into skill levels as such, but there plenty of targets to aim for in terms of security goals. You'll want resistance to:

Some resistance can be achieved via:

Some other desirable traits:

Don't forget to obey Kerckhoffs Principle

After you've done all that, you might like to make your construction tweakable

Some of the mathematical concepts related to cipher design are:

Ella Rose
  • 19,603
  • 6
  • 53
  • 101
  • 1
    I am not a fan of "key agility" – Richie Frame Aug 04 '16 at 01:26
  • 1
    @RichieFrame May I ask for your reasons why? I can't seem to think of why that would be bad offhand. – Ella Rose Aug 04 '16 at 02:56
  • 2
    Instead of Timing attack, I would recommend Hardware Implementation attack -> Side Channel, Fault attack. Timing falls within Side Channel. – hola Jun 07 '17 at 05:14
  • 1
    I want to say, this is an amazing answer and I still come back to it. – Seph Reed Feb 27 '20 at 16:03
  • @EllaRose Key agility is just sort of pointless in modern constructions. It's like a related key attack in that it's irrelevant in most proper implementations. It's better to generate a new keystream by changing a nonce than it is to rekey the cipher, so having a (relatively) slow key schedule is not a gamer changer. – forest Mar 17 '22 at 22:14