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%)


  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?

  • 8
    $\begingroup$ "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... $\endgroup$
    – poncho
    Aug 3, 2016 at 19:39
  • $\begingroup$ @poncho I agree. I intend to do both, but am focusing on what's in grasp right now. $\endgroup$
    – Seph Reed
    Aug 3, 2016 at 19:43
  • 5
    $\begingroup$ 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/ $\endgroup$
    – r3mainer
    Aug 3, 2016 at 19:55
  • $\begingroup$ 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 $\endgroup$
    – gusto2
    Aug 4, 2016 at 7:37

1 Answer 1


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:

  • 1
    $\begingroup$ I am not a fan of "key agility" $\endgroup$ Aug 4, 2016 at 1:26
  • 1
    $\begingroup$ @RichieFrame May I ask for your reasons why? I can't seem to think of why that would be bad offhand. $\endgroup$
    – Ella Rose
    Aug 4, 2016 at 2:56
  • 2
    $\begingroup$ Instead of Timing attack, I would recommend Hardware Implementation attack -> Side Channel, Fault attack. Timing falls within Side Channel. $\endgroup$
    – hola
    Jun 7, 2017 at 5:14
  • 1
    $\begingroup$ I want to say, this is an amazing answer and I still come back to it. $\endgroup$
    – Seph Reed
    Feb 27, 2020 at 16:03
  • $\begingroup$ @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. $\endgroup$
    – forest
    Mar 17, 2022 at 22:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.