1
$\begingroup$

I was wondering about an algorithm that would take a bitstring as an input, shuffle it and output it. You could use a deterministic RNG to select pairs of bits to swap, using the seed as some sort of password, handing it to people to let them reconstruct the shuffling process. Is this a good idea? Has anyone already thought of this? If not, are there any flaws I would have to bear in mind? I'm a newbie to cryptography and I don't really know how to approach this.

Excuse my poor English grammar and thank you for your time!

EDIT: I forgot to specify that this is for learning purposes.

$\endgroup$

closed as too broad by Ilmari Karonen, kelalaka, forest, fkraiem, Maarten Bodewes Apr 28 at 11:33

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ What exactly do you want with that? $\endgroup$ – Maeher Apr 27 at 18:09
  • 4
    $\begingroup$ No, nobody has yet thought of a transposition cipher. $\endgroup$ – Maarten Bodewes Apr 27 at 18:09
  • $\begingroup$ Transposition is a rather important part of ciphers. However, because it obviously leaks information at least on the values of the separate bits, it is not used on it's own in modern ciphers. Still, transposition is important for creating the avalanche effect to achieve confusion and diffusion. There are some terms to lookup for you. $\endgroup$ – Maarten Bodewes Apr 28 at 11:32
1
$\begingroup$

They call this a transposition cipher. Bits commonly have more semantic meaning assembled into characters and numbers, so you may be performing fractionation specifically. Also, in cryptography we'd use a CSPRNG for the shuffle rather than a plain RNG for invertability reasons detailed in the link. Frequency analysis means that it's fairly easy to break though. Stuff to think about then.

It's a lot to take in, and there are very subtle nuances that mean creating a cipher from scratch is pretty tough. It's better to stick to library functions/ standardised methods /primitives in non scholarly uses. Hi!

$\endgroup$

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